Prevent media gallery tabs from compressing text in some locales.

This commit is contained in:
Greyson Parrelli
2026-03-27 14:43:07 +00:00
parent 2cca01d30f
commit 4b768419da
2 changed files with 7 additions and 4 deletions

View File

@@ -250,8 +250,11 @@ public final class MediaOverviewActivity extends PassphraseRequiredActivity {
maxWidth = Math.max(maxWidth, tabWidth);
}
int viewWidth = right - left;
if (totalWidth < viewWidth) {
int viewWidth = right - left;
int tabCount = tabLayout.getTabCount();
int fixedTabSize = tabCount > 0 ? viewWidth / tabCount : 0;
if (totalWidth < viewWidth && maxWidth <= fixedTabSize) {
tabLayout.setTabMode(TabLayout.MODE_FIXED);
}
});