I'm new on this forum so firstly I want to say hello to everyone
I try to build my new application and stuck on change layout on button click( I already created a nice graphic with some button and need to change layout from that button ) . FIst what I do is ask google and found this :
http://stackoverflow.com/questions/6121797/android-how-to-change-layout-on-button-click but it dont realy help me becouse it dont work could you please take a look on that and help me with creat this button
thanks in advice
android: how to change layout on button click?
Post a Reply
|Oldest Newest Rating|
Nii Ayite Aryeh
· January 14, 2015
Does the layout you want to change to come with its activity as well? If so you can just set an intent to take you to the activity of your new layout. for eg. you have mainActivity.java with its layout activity.xml and you have another class secondActivity.java with its layout second_activity.xml. You can move to your new layout using this code:
Intent in = new Intent(MainActivity.this, secondActivity.class);
Java / Android Development
Very popular language used to create desktop applications, website applets, and Android apps.
|Bucky Roberts Administrator|