mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-19 08:09:12 +01:00
Prevent media gallery tabs from compressing text in some locales.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user