I have a basic Android question here:
I have a main.xml layout that loads when the application starts. There is a menu button on this page that I would like (when pressed) to send the user to another layout (about.xml).
I doubt it is correct. When you click this command, it is called:
setContentView(R.layout.about);
And it seems to work, I see the page about.xml, but I canβt go back to the main.xml layout, when I press the BACK button on my Android device, the application just closes.
I doubt this is the correct way to navigate between xml layout files. Could you help or point me to a page that talks about this for a novice programmer, like me?
Many thanks,
Pat
EDIT: Thanks for all the answers you helped me point in the right direction. To help future noob programmers like me understand actions, here is a great simple tutorial that I found on the Internet that displayed it for us newbies!
http://www.warriorpoint.com/blog/2009/05/24/android-how-to-switch-between-activities/
android xml switch-statement layout
PAMUNOZ
source share