diff --git a/mastodon/src/main/java/org/joinmastodon/android/ui/tabs/TabLayout.java b/mastodon/src/main/java/org/joinmastodon/android/ui/tabs/TabLayout.java
index 1528f0ea4..0912b60c5 100644
--- a/mastodon/src/main/java/org/joinmastodon/android/ui/tabs/TabLayout.java
+++ b/mastodon/src/main/java/org/joinmastodon/android/ui/tabs/TabLayout.java
@@ -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);
}
}
diff --git a/mastodon/src/main/res/layout/fragment_discover.xml b/mastodon/src/main/res/layout/fragment_discover.xml
index 4b4d8ae66..2b4d7c31c 100644
--- a/mastodon/src/main/res/layout/fragment_discover.xml
+++ b/mastodon/src/main/res/layout/fragment_discover.xml
@@ -45,6 +45,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
+