<commit_before>/*
 * Copyright 2016 <NAME>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.app.material;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.FragmentActivity;
import android.view.Gravity;
import android.widget.LinearLayout;
import android.widget.ScrollView;

import org.app.material.widget.Toolbar;
import org.app.material.widget.LayoutHelper;

public class MaterialActivity extends FragmentActivity {

    public LinearLayout containerLayout;
    public ScrollView scrollView;
    public Toolbar toolbar;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        containerLayout = new LinearLayout(this);

        scrollView = new ScrollView(this);

        toolbar = new Toolbar(this);
        toolbar.setToolbarColor(AndroidUtilities.getContextColor(this, R.attr.colorPrimary));
        toolbar.initialise();

        containerLayout.addView(toolbar, LayoutHelper.makeLinear(this, LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.TOP));
        containerLayout.addView(scrollView, LayoutHelper.makeLinear(this, LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, 0, toolbar.getHeight(), 0, 0));
        setContentView(containerLayout, LayoutHelper.makeLinear(this, LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT));
    }
}<commit_msg>* improve activity, add coordinator layout, add toolbar and layout for content<commit_after>/*
 * Copyright 2016 <NAME>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.app.material;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.design.widget.CoordinatorLayout;
import android.support.v4.app.FragmentActivity;
import android.view.Gravity;
import android.view.View;
import android.widget.LinearLayout;

import org.app.material.widget.LayoutHelper;
import org.app.material.widget.Toolbar;

public class MaterialActivity extends FragmentActivity {

    public Toolbar toolbar;
    public LinearLayout viewLayout;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        CoordinatorLayout containerLayout = new CoordinatorLayout(this);
        containerLayout.setLayoutParams(LayoutHelper.makeCoordinator(this, LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT));

        toolbar = new Toolbar(this);
        toolbar.setToolbarColor(AndroidUtilities.getContextColor(this, R.attr.colorPrimary));
        toolbar.setLayoutParams(LayoutHelper.makeLinear(this, LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.TOP));
        containerLayout.addView(toolbar);

        viewLayout = new LinearLayout(this);
        viewLayout.setOrientation(LinearLayout.VERTICAL);
        viewLayout.setLayoutParams(LayoutHelper.makeLinear(this, LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, 0, 56, 0, 0));
        containerLayout.addView(viewLayout);

        setContentView(containerLayout);
    }

    public void addView(View view) {
        viewLayout.addView(view);
    }
}
{'fraction_non_alphanumeric': 0.08471720818291216, 'fraction_numerical': 0.006257521058965102, 'mean_word_length': 4.4255874673629245, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6887710', 'n_tokens_mistral': 1134, 'n_tokens_neox': 1060, 'n_words': 316}