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