1
是否有可能把旗幟下面的標籤主機,並在該旗幟有兩個按鈕,我想從當前可見的活動訪問該兩個按鈕?把旗幟下面的標籤主機只有一個活動
例如有兩個xml文件,一個是tab-host,另一個是活動xml文件。在製表主機xml文件我寫了這樣的代碼
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="0dip"
android:layout_weight="1" />
<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="0" />
<TextView
android:id="@+id/textView1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/seekBar1"
android:background="#FFB5C5"
android:gravity="center_horizontal"
android:marqueeRepeatLimit="marquee_forever"
android:singleLine="true"
android:text="No track info available..."
android:textColor="@android:color/black" />
</LinearLayout>
現在如果我想提出以下接頭主機的旗幟,我有這個文件對於編寫代碼橫幅...
現在但主要問題是在橫幅中有兩個按鈕正在訪問的活動有
setContentView(R.layout.activity);
不
setContentView(R.layout.tabhost);
,所以我不會從
setContentView(R.layout.activity);
因此獲得旗幟可以有人建議我該怎麼做的事情
下面是圖像
u能看到下面的旗幟從接頭主機
,現在我想從第一項活動訪問旗幟.....Ø
橫幅駐留在tabActivity中,並且您希望從選項卡訪問內容活動? – moDev
請仔細閱讀http://d.android.com/design,不要使用設計爲iOS標籤的「TabHost」。 – Leandros