5
我正在使用TabHost
,它工作正常,直到我更新支持庫。當我更新jar時,標籤內容不可見,只顯示標籤。我正在使用FragmentActivity
。當我升級android.support.v4時不顯示Tabhost內容
這裏的XML:
<android.support.v4.app.FragmentTabHost
android:id="@+id/tab_host"
style="@style/FillParentWrapContent"
android:layout_below="@id/view_location_card"
android:layout_marginLeft="@dimen/view_margin"
android:layout_marginRight="@dimen/view_margin" >
<FrameLayout
android:id="@android:id/tabcontent"
style="@style/FillParentWrapContent" />
<FrameLayout
android:id="@+id/tab_content"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:paddingTop="@dimen/view_margin_extra_large" />
</android.support.v4.app.FragmentTabHost>
代碼片段:
FragmentTabHost tabHost = (FragmentTabHost) findViewById(R.id.tab_host);
tabHost.setup(this, getSupportFragmentManager(), R.id.tab_content);
Bundle bundle = new Bundle();
bundle.putInt(CommonConstants.TAB_ID, tabTitleId);
tabHost.addTab(tabHost.newTabSpec("Title").setIndicator(tabView), Fragment.class, bundle);
請幫我解決這個問題。我需要更新庫,因爲我正在使用像Marshmallow GPS權限這樣的新功能。
我認爲這個問題是由於製表符是全寬,所以我們的ListView
沒有空間來顯示內容。
? – Saveen