0

I want to create an android application where I have a home page which contains a Drawer Layout.When I click the Item1 in the Drawer layout I want to go to Screen for Item1 where its data entry occur.I want the same Drawer Layout here also but need to show the action bar back button instead of the drawer icon which on click saves the data in the screen and back to the home screen.Also if I click on the plus button on the right bottom corner of the Item1 screen the open a new screen(that is, Screen with name Item A) with the same drawer layout and back button.Here also if I click the back button I need to save the data in that screen and back to the Item1 screen.Below is the screens that I want. Screens

I think google playstore works like this.it will show the drawer icon in the home screen only and in subsequent screens shows the up/back button along with the drawer layout.I want exactly the same. How can I create screen structure like this.Which one to use for Item1 and Item A screen? Whether to use Fragments or Activity which extends a Base Activity in which drawer is defined.If fragments how can I get back to Item1 on back button click from Item A screen and then to home from Item1 screen.I am really confused by these fragments and Activity.

KJEjava48
  • 1,967
  • 7
  • 40
  • 69
  • have you tried anything ? – Amit Vaghela Mar 02 '16 at 12:11
  • @AmitVaghela yes i have tried it with activities.But the problem is the don't know how to show the back button instead of the drawer icon from the second screen.I have implemented the home screen activity with the drawer layout and then extends this home screen activity in the second screen so that i can see the drawe layout in the second screen.But how to change the icon to back button of toolbar – KJEjava48 Mar 02 '16 at 12:14
  • you need not to replace just put that button in right or left of drawer – Amit Vaghela Mar 02 '16 at 12:20
  • sorry i didn't understood what u said – KJEjava48 Mar 02 '16 at 12:22
  • @AmitVaghela can u explain it clearly..pls.. – KJEjava48 Mar 02 '16 at 12:30
  • Have a look at [this](http://stackoverflow.com/questions/26468634/how-animate-burger-to-arrow-with-appcompat-v7-21-toolbar-and-drawerlayout) – iSrinivasan27 Mar 02 '16 at 12:31
  • what you can do is, do not replace icon of drawer just put it on left or right side of backbutton icon. – Amit Vaghela Mar 02 '16 at 12:31
  • @AmitVaghela How can i do that?? the back button comes from code below android:uiOptions="splitActionBarWhenNarrow" android:parentActivityName="com.fortune.saveitmoneyAndroid.view.IncomeTabs" – KJEjava48 Mar 02 '16 at 12:33
  • how can i access the drawer layout in child activity?? – KJEjava48 Mar 02 '16 at 13:19
  • i know that if i set ActionBarDrawerToggle.setDrawerIndicatorEnabled(false); it will hide the drawer icon and will show the back button.But how can i access this ActionBarDrawerToggle object from the home activity in the childactivity? – KJEjava48 Mar 02 '16 at 13:21

0 Answers0