其他分享
首页 > 其他分享> > android-如何删除工具栏和TabLayout之间的分隔线

android-如何删除工具栏和TabLayout之间的分隔线

作者:互联网

我有一个布局:

<android.support.design.widget.TabLayout
        android:id="@+id/tabs"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@android:color/white"
        android:elevation="4dp"
        app:tabMode="fixed"
        app:tabGravity="fill"
        app:tabBackground="@color/colorPrimary"
        app:tabTextColor="@android:color/white"
        app:tabSelectedTextColor="@android:color/white"/>

和工具栏,但工具栏和分隔线之间仍然有一条小线.我尚未设置工具栏样式.如何卸下分隔线?

heres an image of the divider

解决方法:

请更新您的style.xml

 <item name="android:windowContentTransitions">true</item>
    <item name="android:windowAllowEnterTransitionOverlap">true</item>
    <item name="android:windowAllowReturnTransitionOverlap">true</item>
    <item name="android:windowSharedElementEnterTransition">@android:transition/move</item>
    <item name="android:windowSharedElementExitTransition">@android:transition/move</item>

标签:android-tablayout,android-toolbar,android
来源: https://codeday.me/bug/20191026/1939777.html