简体   繁体   English

Android差距超过PagerTitleStrip

[英]Android gap above PagerTitleStrip

I'm having an issue with my layout where there is a gap between the PagerTitleStrip and the ActionBar. 我的布局存在问题,其中PagerTitleStrip和ActionBar之间存在差距。 Here's my layout and how it looks, it seems to display fine in the preview window but not on my device. 这是我的布局和它的外观,它似乎在预览窗口中显示,但不在我的设备上。

    <?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>

Gap.. 间隙..

I figured it out. 我想到了。 In my activity I had the action bar set to navigation tabs mode and it is deprecated/not available with the pager title strip. 在我的活动中,我将操作栏设置为导航标签模式,并且它已被弃用/不可用于寻呼机标题条。 Once I removed it the space went away. 一旦我将其移除,空间便消失了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM