저는 레이아웃이 있으며 여기에 framelayout이 있습니다.Framelayout은 버튼을 클릭 할 때 새로운 활동을 호출합니다.
두 개의 버튼이 있습니다. button1을 클릭하면 framelayout에서 activity1을 호출하고 싶습니다. 그리고 framelayout에서 button2 call activity2를 클릭하십시오.
이 가능합니까?
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);
}
내가 framlayout 다른 활동을 호출 Button1을 클릭
.