爲什麼標籤文本不重複的標籤中的繪製?有沒有辦法來防止這種情況?繪圖總是居中?如果能夠添加文本以及指示器給出該輸出,那麼它有什麼意義?爲什麼在我的TabView的重疊繪製文本
XML
<?xml version="1.0" encoding="utf-8"?>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
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">
<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"
android:padding="5dp" />
</LinearLayout>
</TabHost>
的Java
host.addTab(host.newTabSpec("_tab2")
.setIndicator("Authors",res.getDrawable(android.R.drawable.ic_menu_mapmode))
.setContent(new Intent(this, AuthorList.class)));
燦別人的幫助?我已經試過了我能想到的所有東西,它看起來像我的手機和我的模擬器。我以前使用過標籤,但沒有這樣做。
在我用這個每個實例
添加填充到什麼呢? – Falmarri 2010-10-20 21:50:00
你使用框架佈局的是什麼? – Samuel 2010-10-25 16:47:26
這就是如何定義tabhost佈局。該FrameLayout裏就是Android的把標籤 – Falmarri 2010-11-02 01:00:56