i have an layout consisting of two frame layout, my first Frame layout consist of the buttons,and another Frame layout is blank ,on click event on the button in first frame layout i wish to load the Activity layout in the second Frame layout? This is my XML LAYOUT
<FrameLayout
android:id="@+id/mainframelayout"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity" >
<LinearLayout
android:id="@+id/mainliner"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal"
android:background="#565765">
<FrameLayout
android:id="@+id/leftlayout"
android:layout_width="wrap_content"
android:layout_height="350dp"
android:layout_marginTop="30dp"
android:background="#321324">
<LinearLayout
android:id="@+id/liner"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_marginTop="50dp"
android:orientation="vertical">
<Button
android:id="@+id/btn1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="firstButton"
android:text="A"/>
<Button
android:id="@+id/btn5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="fifthButton"
android:text="B"/>
<Button
android:id="@+id/btn2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="secondButton"
android:text="C"/>
<Button
android:id="@+id/btn3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="thirdButton"
android:text="D"/>
<Button
android:id="@+id/btn4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="fourthButton"
android:text="E"/>
</LinearLayout>
</FrameLayout>
<FrameLayout
android:id="@+id/rightframe"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#565765">
</FrameLayout>
</LinearLayout>
</FrameLayout>
you have to use fragment for that.