Android Open Source - easy-navigation-drawer Child Activity






From Project

Back to project page easy-navigation-drawer.

License

The source code is released under:

Apache License

If you think the Android project easy-navigation-drawer listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package name.roupsky.geno.project;
//from   w w  w.  java 2  s.  c  om
import name.roupsky.geno.easynavigationdrawer.EasyNavigationDrawerBuilder;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.widget.TextView;

public class ChildActivity extends ActionBarActivity {

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

        new EasyNavigationDrawerBuilder()
                .setContentView(R.layout.activity_child)
                .setLeftContentView(R.layout.navigation_menu)
                .disableDrawerIndicator()
                .install(this);

        getSupportActionBar().setDisplayHomeAsUpEnabled(true);

        // after install the content is accessible by simple findViewById
        ((TextView) findViewById(android.R.id.text1)).setText("Text from code");
    }
}




Java Source Code List

name.roupsky.geno.easynavigationdrawer.EasyNavigationDrawerBuilder.java
name.roupsky.geno.easynavigationdrawer.EasyNavigationDrawerFragment.java
name.roupsky.geno.project.ChildActivity.java
name.roupsky.geno.project.MainActivity.java