Change screens on Android app -


what best way switch screens on android app, have main activity page 4 buttons, first 2 go websites , want too, , other 2 buttons go other app pages have built.

i have new pages in /layout/activity_two.xml

desired: click "button3" on main page, screen switches new page

thanks help

the best way switch 'screens' (which called 'views', , refer rectangular area of screen, may or may not entire screen) use fragments (which contain views cover whole screen).

when using fragments, can have 1 main activity switches between various fragments.

here little spiel android developer website: http://developer.android.com/training/basics/fragments/index.html

i found helpful, , example kind similar trying accomplish (minus web pages): http://www.youtube.com/watch?v=kyxvq_kwfzg


Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

VBA function to include CDATA -