I suggest ViewFlipper
inside RelativeLayout
of your include
statements. Try like this:
<ViewFlipper xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/vf"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<include android:id="@+id/include1" layout="@layout/ikinci" />
<include android:id="@+id/map" layout="@layout/third_layout" />
</ViewFlipper>
Access ViewFlipper as below.
Initially first layout is output:
ViewFlipper vf = (ViewFlipper)findViewById(R.id.vf);
For Button onClickListener:
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
vf.setDisplayedChild(1);
}
});
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…