나는 다른 요소가있는 탭이 3 개 있고 싶습니다. 이 작업을 수행하는 방법을 찾았지만 필요한 항목을 찾을 수없는 것 같습니다.안드로이드의 탭 안의 여러 항목 설정하기 Tabhost
Basicly 내가이 원하는 :
탭 1, 4 개 버튼과 텍스트 뷰
탭 2를 포함 스크롤 이미지 뷰
탭 (3)을 포함,
가싶습니다 웹보기를 포함 3 개의 탭 모두가 동일한 데이터에 액세스해야하기 때문에 활동을 사용하지 않고이 문제를 해결할 수 있습니다.
은 현재 내가 레이아웃으로이 XML을 사용
Java.Lang.RuntimeException: Binary XML file line #1: You must supply a layout_width attribute.
어떤 도움이를 해결하기 위해 :
<?xml version="1.0" encoding="utf-8"?>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+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">
<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/photoLayout">
<Button
android:text="@string/photoButton"
android:layout_column="0"
android:id="@+id/photoButton"
android:textSize="10dp" />
<Button
android:text="@string/locateButton"
android:layout_column="1"
android:id="@+id/locateButton"
android:textSize="10dp" />
<Button
android:text="@string/cropButton"
android:layout_column="2"
android:id="@+id/cropButton"
android:textSize="10dp" />
<Button
android:text="reset"
android:layout_column="3"
android:id="@+id/resetButton"
android:textSize="10dp" />
<ScrollView
android:minWidth="25px"
android:minHeight="25px"
android:layout_width="fill_parent"
android:layout_height="370dp"
android:id="@+id/scrollView1"
android:fillViewport="true">
<TextView
android:text="Text"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/textView1" />
</ScrollView>
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/webviewLayout">
<WebView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/webView1" />
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/imageLayout">
<ScrollView
android:minWidth="25px"
android:minHeight="25px"
android:layout_width="fill_parent"
android:layout_height="412dp"
android:id="@+id/scrollView2"
android:fillViewport="true">
<ImageView
android:src="@android:drawable/ic_menu_gallery"
android:layout_column="0"
android:id="@+id/imageView1"
android:layout_height="411.6dp"
android:layout_width="316.7dp"
android:scaleType="centerInside" />
</ScrollView>
</LinearLayout>
</FrameLayout>
</LinearLayout>
이 문제는 내가 말을 런타임 예외를 얻을 수 있다는 것입니다 문제는 인정 될 것이다!
흠, 나는 어제 시도 했었지만 어쩌면 그렇게 생각하지 않았을 수 있습니다. 왜냐하면 두 번째 전에 시도 했으므로 고맙습니다. – jHogen
문제 없으므로 기꺼이 도와 줬습니다. –