fix tab layout horizontal paddings
This commit is contained in:
parent
ebbd56e3bc
commit
4975bde76f
|
@ -1715,7 +1715,9 @@ public class TabLayout extends HorizontalScrollView implements CustomViewHelper{
|
|||
child.getLayoutParams().height);
|
||||
|
||||
int childWidthMeasureSpec =
|
||||
MeasureSpec.makeMeasureSpec(getMeasuredWidth(), MeasureSpec.EXACTLY);
|
||||
MeasureSpec.makeMeasureSpec(
|
||||
getMeasuredWidth() - getPaddingLeft() - getPaddingRight(),
|
||||
MeasureSpec.EXACTLY);
|
||||
child.measure(childWidthMeasureSpec, childHeightMeasureSpec);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<org.joinmastodon.android.ui.tabs.TabLayout
|
||||
android:id="@+id/tabbar"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -56,6 +57,8 @@
|
|||
app:tabIndicatorFullWidth="false"
|
||||
app:tabMinWidth="90dp"
|
||||
app:tabMode="scrollable"
|
||||
android:clipToPadding="false"
|
||||
android:paddingHorizontal="4dp"
|
||||
android:background="?colorM3Surface"/>
|
||||
|
||||
<View
|
||||
|
|
|
@ -384,11 +384,12 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:background="@drawable/bg_onboarding_panel"
|
||||
android:clipToPadding="false"
|
||||
android:paddingHorizontal="4dp"
|
||||
app:tabGravity="start"
|
||||
app:tabIndicator="@drawable/tab_indicator_m3"
|
||||
app:tabIndicatorAnimationMode="elastic"
|
||||
app:tabIndicatorColor="?colorM3Primary"
|
||||
android:paddingHorizontal="4dp"
|
||||
app:tabIndicatorFullWidth="false"
|
||||
app:tabMinWidth="0dp"
|
||||
app:tabMode="scrollable" />
|
||||
|
|
Loading…
Reference in New Issue