내 앱에 TabHost가 있고 인스턴트 이미지를 넣으려고합니다. 제 문제는 이미지가 실제 크기가 아닌 전체 화면으로 늘어나고 있다는 것입니다. 메신저 hight과 너비에서 "wrap_content"를 사용하여 여전히 그것을하고 있습니다. 인스턴트 메신저 때 같은 이미지를 다른 물건을 "wrap_content"그 괜찮아. 탭에서만 이상합니다. 그것은 본다 그게 전부 방법 :이미지가 탭에서 펼쳐져 있습니다. android
<TabHost
android:id="@+id/tabhost"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TabWidget
android:id="@android:id/tabs"
android:layout_width="wrap_content"
android:layout_height="60dp"
android:gravity="center_vertical"
android:showDividers="none" >
</TabWidget>
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<LinearLayout
android:id="@+id/tab1"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="start" />
<Button
android:id="@+id/button2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="stop" />
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="first tab" />
</LinearLayout>
<LinearLayout
android:id="@+id/tab2"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<Button
android:id="@+id/button3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="second tab B" />
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Secont tab" />
</LinearLayout>
</FrameLayout>
</LinearLayout>
</TabHost>
감사 :
내 코드를 먹으 렴 :
대신 다음과 같이 보는
!