Android PagerTitleStrip 上方的间隙
Android gap above PagerTitleStrip
我的布局有问题,PagerTitleStrip 和 ActionBar 之间存在间隙。这是我的布局及其外观,它在预览中似乎显示正常 window 但在我的设备上显示不正常。
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.view.ViewPager xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/fuelActivityViewPager"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical">
<android.support.v4.view.PagerTitleStrip
style="@style/titleStrip"
android:id="@+id/pagerTitleStrip"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="top"/>
</android.support.v4.view.ViewPager>
我想通了。在我的 activity 中,我将操作栏设置为导航选项卡模式,它 deprecated/not 可用于寻呼机标题条。一旦我删除它,space 就消失了。
我的布局有问题,PagerTitleStrip 和 ActionBar 之间存在间隙。这是我的布局及其外观,它在预览中似乎显示正常 window 但在我的设备上显示不正常。
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.view.ViewPager xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/fuelActivityViewPager"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical">
<android.support.v4.view.PagerTitleStrip
style="@style/titleStrip"
android:id="@+id/pagerTitleStrip"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="top"/>
</android.support.v4.view.ViewPager>
我想通了。在我的 activity 中,我将操作栏设置为导航选项卡模式,它 deprecated/not 可用于寻呼机标题条。一旦我删除它,space 就消失了。