![]() Hope you have already created a navigation drawer project.Ģ. MainActivity.java : The main java file where you write the code (Basically onClickListeners for navigation drawer menus and Tool bar menus.)ġ. ![]() menu/activity_main_drawer.xml : Contains the menu items for navigation drawer.menu/main.xml: Contains the menu items for App Tool Bar (By default it will contain only settings).activity_main.xml: Links app_bar_main & nav_header_main (the menu items are added from menu/activity_main_drawer.xml ).nav_header_main.xml: Contains a part of navigation drawer.app_bar_main.xml: Contains the Toolbar overlay and Floating button.content_main.xml : This is basically the First Screen i.e initially it contains only a TextView with Hello World!!We will replace the inner content with, so that we can display our fragments.Now let us examine the files that are automatically generated by Android studio. Create a new Android Project -> Minimum SDK: 15 -> Navigation Drawer Activity -> Finish.Ģ.To create Fragments in your main project i.e Right click on the project folder -> New -> Fragments -> Fragment (Blank).įragmentTransaction ft = getSupportFragmentManager().beginTransaction() įt.replace(R.id.mainFrame, new Fragment1()). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |