Android 安卓4.3。滚动条和右边框之间的间隙
这里是我的xml布局:带ViewPager的表格布局:Android 安卓4.3。滚动条和右边框之间的间隙,android,Android,这里是我的xml布局:带ViewPager的表格布局: <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:la
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.design.widget.TabLayout
android:id="@+id/tabLayout"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:background="@android:color/white"
android:minHeight="@dimen/standard_min_height_container"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@+id/searchView"
app:tabGravity="fill"
app:tabIndicatorHeight="0dp"
app:tabMode="fixed"
app:tabSelectedTextColor="@color/colorPrimaryDark"
app:tabTextAppearance="@android:style/TextAppearance.Widget.TabWidget" />
<ViewPager
android:id="@+id/customViewPager"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@color/common_color_bg"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="@+id/tabLayout"
app:layout_constraintRight_toRightOf="@+id/tabLayout"
app:layout_constraintTop_toBottomOf="@+id/tabLayout" />
</android.support.constraint.ConstraintLayout>
这是安卓4.3的结果
为什么在Androdi4.3上。右边框和滚动条之间有间隙吗?
我需要显示滚动条以正确对齐。与Android 5.0+上一样,您应该将scrollbarStyle更改为所需的样式
android:scrollbarStyle:
insideInset //Inside the padding and inset.
insideOverlay //Inside the padding and overlaid.
outsideInset //Edge of the view and inset.
outsideOverlay //Edge of the view and overlaid.
看看这个