I am using TabHost
and it was working fine till I updated the support library. When I updated the jar then tab content is not visible, only showing tab.
I am using FragmentActivity
.
Here's the 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>
Code snippet:
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);
Please help me around this. I need to update the lib because I am using new feature like Marshmallow GPS permission.
I think this issue is due to because tabs are taking full width and so our ListView
don't have space to show the content.