我想删除上图中的分隔线。我已经尝试过任何事情,但仍然没有运气。这是我迄今为止所尝试的。
样式文件
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="MaterialDrawerTheme.Light.DarkToolbar">
<item name="android:windowContentOverlay">@null</item>
<item name="actionBarDivider">@null</item>
<item name="android:actionBarDivider">@null</item>
</style>
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar">
<item name="android:windowContentOverlay">@null</item></style>
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
</resources>
fragment .xml
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true">
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay"
android:fitsSystemWindows="true"
app:elevation="0dp">
<android.support.design.widget.TabLayout
android:id="@+id/tab_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabMode="fixed"
app:tabGravity="fill"
android:fillViewport="false" />
<com.jaredrummler.materialspinner.MaterialSpinner
android:id="@+id/spinner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="#000000"
/>
</android.support.design.widget.AppBarLayout>
<android.support.v4.view.ViewPager
android:id="@+id/view_pager"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
</android.support.design.widget.CoordinatorLayout>
</layout>
有没有人有这个问题的解决方案?抱歉我的英语不好,提前致谢!
最佳答案
最后,我尝试将 minSdkVersion 从 15 提高到 21,并将 app:elevation="0dp"添加到代码中。它工作得很好。感谢大家的反馈!
关于android - 如何删除 AppBarLayout 底部的分隔线,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/37519647/