0
Tab이 변경되었을 때 ActivityL이 FrameLayout에로드되면 X가 TabHost 외부에있는 tmp
LinearLayout에 액세스 할 수 있기를 원합니다. 일부 탭을 클릭 한 때 활동에 나는이 작업을 수행 할 수있는 방법이TabHost의 FrameLayout 외부에있는보기에 액세스하는 방법?
public void onCreate(Bundle savedInstanceState) {
LinearLayout ll = (LinearLayout)findViewById(R.id.tmp);
}
그런 짓을 할 수 있도록 , TmpActivity는 FrameLayout이에로드되는 것을 가정?
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:id="@+id/tmp"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="50px"
android:background="#00FF00">
</LinearLayout>
<TabHost
android:id="@android:id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="5dp">
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="500px"
android:padding="5dp"
android:background="#FF0000"/>
<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#FF00FF" />
</LinearLayout>
</TabHost>
</LinearLayout>