У меня есть макет, и в этом есть рамка.Framelayout вызывать новую активность при нажатии кнопки
Я положил 2 кнопки. и я хочу вызвать activity1 в framelayout при нажатии кнопки1. и поэтому нажмите кнопку2 для вызова activity2 в framelayout.
это возможно?
layout1.xml
<Button
android:id="@+id/button1"
android:layout_width="80dp"
android:layout_height="35dp"
android:background="@drawable/tab_buton"
android:text="@string/turlar"
android:textColor="#ffffff"
android:textSize="12sp"
android:textStyle="bold" android:layout_weight="1"/>
<Button
android:id="@+id/button2"
android:layout_width="80dp"
android:layout_height="35dp"
android:background="@drawable/tab_buton"
android:text="@string/alisveris"
android:textColor="#ffffff"
android:textSize="12sp"
android:textStyle="bold" android:layout_weight="1"/>
</LinearLayout>
<FrameLayout
android:id="@+id/frameLayout1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentLeft="true"
android:layout_below="@+id/linearLayout2"
android:layout_marginLeft="5dp"
android:layout_weight="0.59" android:layout_marginRight="5dp">
</FrameLayout>
activity1.java
public class Firsat extends Base {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.layout1);
}
, когда я нажимаю button1 вызвать другую деятельность в framlayout.