android - How I can go Activity to Layout Resource file by using Intent? -
when want go 1 activity activity can go using intent this,
intent gointent = new intent(home.this, another.class); startactivity(gointent); but when want go 1 activity layout resource (which has no activity.java) file, how can work?
if want change layout activity, best use viewflipper. need put both layouts in 1 xml file.
layout.xml
<viewflipper android:id="@+id/viewflipper"> <relativelayout> // here youre first layout </linearlayout> <relativelayout> // here youre second layout </relativelayout> </viewflipper> to switch layouts in youre activity, need call shownext():
viewflipper vf = (viewflipper) findviewbyid( r.id.viewflipper ); vf.shownext();
Comments
Post a Comment