I started Android devlopment a few days ago and it’s going great. I haven’t coded a part because I didn’t know the best way to do it. Here it goes :
I have multiple activities. My main activity has multiple buttons that use intents to display the concerned activities. I’d like to have a global button that reaches back to the main activity. This button should be accessible from all the other activities.
I’m not sure if there’s a global toolbar or something I can do to avoid declaring the same button in different XML’s.
Thanks
You can use an Action Bar in your application. Generally many apps have action bar. The action bar has common functionalities that are required throughout the app. In the action bar generally on the leftmost side there is your app icon image, clicking on which the user is redirected to the main page. There is an Action Bar Sherlock that is very easy to implement in your app.