<commit_before>package cz.united121.android.testpupose;

import android.app.Activity;
import android.app.Fragment;
import android.app.FragmentManager;
import android.app.FragmentTransaction;
import android.content.res.Configuration;
import android.support.v4.widget.DrawerLayout;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.support.v7.app.ActionBarDrawerToggle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.animation.AnimationUtils;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.Toast;

import cz.united121.android.testpupose.Objects.CustomSmall;


public class NavigationDrawerTest extends ActionBarActivity  {

    private static String TAG = NavigationDrawerTest.class.getName();
    private static final String CUSTOM_SMALL = "CUSTOM_SMALL";

    private DrawerLayout mDrawerLayout;
    private ListView mListView;
    private ArrayAdapter<String> mArrayAdapter;


    private BlankFragment blankFragment;
    private BlankFragment2 blankFragment2;

    private Fragment currentFragment;

    private ActionBarDrawerToggle mActionBarDrawerToggle;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Log.d(TAG,"onCreate");

        setContentView(R.layout.activity_navigation_drawer_test);

        mListView = (ListView) findViewById(R.id.navList);
        mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);

        populateListView(new String[]{"Petr", "Pavel", "Sasa"});

        blankFragment = (BlankFragment) getFragmentManager().findFragmentById(R.id.fragment1);
        blankFragment2 = (BlankFragment2) getFragmentManager().findFragmentById(R.id.fragment2);

        getFragmentManager().beginTransaction()
                .hide(blankFragment2)
                .commit();
        currentFragment = blankFragment;

        //setActionBar();

        Bundle bundle = getIntent().getExtras();
        CustomSmall customSmall_1 = bundle.getParcelable(CUSTOM_SMALL + "1");
        //CustomSmall customSmall_2 = bundle.getParcelable(CUSTOM_SMALL + "2");
    }

    private void setActionBar(){
        mActionBarDrawerToggle = new ActionBarDrawerToggle(
                NavigationDrawerTest.this,
                mDrawerLayout,
                R.string.action_bar_open,
                R.string.action_bar_close){

                /** Called when a drawer has settled in a completely closed state. */
                public void onDrawerClosed(View view) {
                    super.onDrawerClosed(view);
                }

                /** Called when a drawer has settled in a completely open state. */
                public void onDrawerOpened(View drawerView) {
                    super.onDrawerOpened(drawerView);

                }
        };

        mDrawerLayout.setDrawerListener(mActionBarDrawerToggle);

    }<commit_msg>FEAT: Navigation drawer open icon<commit_after>package cz.united121.android.testpupose;

import android.app.Activity;
import android.app.Fragment;
import android.app.FragmentManager;
import android.app.FragmentTransaction;
import android.content.res.Configuration;

import android.support.v4.widget.DrawerLayout;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.support.v7.app.ActionBarDrawerToggle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.animation.AnimationUtils;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.Toast;

import cz.united121.android.testpupose.Objects.CustomSmall;


public class NavigationDrawerTest extends ActionBarActivity  {

    private static String TAG = NavigationDrawerTest.class.getName();
    private static final String CUSTOM_SMALL = "CUSTOM_SMALL";

    private DrawerLayout mDrawerLayout;
    private ListView mListView;
    private ArrayAdapter<String> mArrayAdapter;


    private BlankFragment blankFragment;
    private BlankFragment2 blankFragment2;

    private Fragment currentFragment;

    // for hamburger menu
    private ActionBarDrawerToggle mActionBarDrawerToggle;
    private String mActivityTitle;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Log.d(TAG,"onCreate");

        setContentView(R.layout.activity_navigation_drawer_test);

        mListView = (ListView) findViewById(R.id.navList);
        mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);

        populateListView(new String[]{"Petr", "Pavel", "Sasa"});

        blankFragment = (BlankFragment) getFragmentManager().findFragmentById(R.id.fragment1);
        blankFragment2 = (BlankFragment2) getFragmentManager().findFragmentById(R.id.fragment2);

        getFragmentManager().beginTransaction()
                .hide(blankFragment2)
                .commit();
        currentFragment = blankFragment;


        //for hamburger menu
        setActionBar();


        Bundle bundle = getIntent().getExtras();
        CustomSmall customSmall_1 = bundle.getParcelable(CUSTOM_SMALL + "1");
        //CustomSmall customSmall_2 = bundle.getParcelable(CUSTOM_SMALL + "2");
    }

    private void setActionBar(){

        mActivityTitle = getTitle().toString();

        getSupportActionBar().setDisplayHomeAsUpEnabled(true);
        getSupportActionBar().setHomeButtonEnabled(true);

        mActionBarDrawerToggle = new ActionBarDrawerToggle(
                NavigationDrawerTest.this,
                mDrawerLayout,
                R.string.action_bar_open,
                R.string.action_bar_close){

                /** Called when a drawer has settled in a completely closed state. */
                public void onDrawerClosed(View view) {
                    super.onDrawerClosed(view);
                    getSupportActionBar().setTitle("Otevreno");
                    invalidateOptionsMenu(); // creates call to onPrepareOptionsMenu()
                }

                /** Called when a drawer has settled in a completely open state. */
                public void onDrawerOpened(View drawerView) {
                    super.onDrawerOpened(drawerView);
                    getSupportActionBar().setTitle(mActivityTitle);
                    invalidateOptionsMenu();
                }
        };

        mActionBarDrawerToggle.setDrawerIndicatorEnabled(true);
        mDrawerLayout.setDrawerListener(mActionBarDrawerToggle);

    }
{'fraction_non_alphanumeric': 0.08631921824104234, 'fraction_numerical': 0.005922416345869114, 'mean_word_length': 3.1314984709480123, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '7662473', 'n_tokens_mistral': 1893, 'n_tokens_neox': 1754, 'n_words': 352}