зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1432854 - Fix Tab counter doesn't show native numbers for non-arabic numeral languages r=JanH
MozReview-Commit-ID: 3STmgEGAbJG --HG-- extra : rebase_source : be198c358e765471c95a7ec678848b04f768111f
This commit is contained in:
Родитель
99dff2319c
Коммит
b2174ae597
|
@ -19,6 +19,8 @@ import org.mozilla.gecko.widget.themed.ThemedImageView;
|
|||
import org.mozilla.gecko.widget.themed.ThemedRelativeLayout;
|
||||
import org.mozilla.gecko.widget.themed.ThemedTextView;
|
||||
|
||||
import java.text.NumberFormat;
|
||||
|
||||
public class TabCounter extends ThemedRelativeLayout {
|
||||
|
||||
private final ThemedImageView box;
|
||||
|
@ -193,7 +195,7 @@ public class TabCounter extends ThemedRelativeLayout {
|
|||
if (count > MAX_VISIBLE_TABS) {
|
||||
return SO_MANY_TABS_OPEN;
|
||||
}
|
||||
return String.valueOf(count);
|
||||
return NumberFormat.getInstance().format(count);
|
||||
}
|
||||
|
||||
private void adjustTextSize(int newCount) {
|
||||
|
|
|
@ -2915,6 +2915,7 @@ public class BrowserApp extends GeckoApp
|
|||
super.onLocaleReady(locale);
|
||||
|
||||
HomePanelsManager.getInstance().onLocaleReady(locale);
|
||||
mBrowserToolbar.onLocaleReady(locale);
|
||||
|
||||
if (mMenu != null) {
|
||||
mMenu.clear();
|
||||
|
|
|
@ -541,6 +541,11 @@ public abstract class BrowserToolbar extends ThemedRelativeLayout
|
|||
}
|
||||
}
|
||||
|
||||
public void onLocaleReady(final String locale) {
|
||||
final Tabs tabs = Tabs.getInstance();
|
||||
tabsCounter.setCount(tabs.getDisplayCount());
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the progress bar percentage and hides/shows it depending on the loading state of the
|
||||
* currently selected tab.
|
||||
|
|
Загрузка…
Ссылка в новой задаче