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