Bug 1565488 - Wrong panel from welcome screen is highlighted after clearing data;r=VladBaicu

Differential Revision: https://phabricator.services.mozilla.com/D39797

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Brad Arant 2019-07-30 16:22:11 +00:00
Родитель 706d0e26b7
Коммит 31ac644a83
1 изменённых файлов: 5 добавлений и 6 удалений

Просмотреть файл

@ -123,6 +123,11 @@ class TabMenuStripLayout extends ThemedLinearLayout
}
void onPageSelected(final int position) {
if (selectedView != null) {
selectedView.setTextColor(inactiveTextColor);
}
selectedView = (TextView) getChildAt(position);
selectedView.setTextColor(activeTextColor);
// Callback to measure and draw the strip after the view is visible.
ViewTreeObserver vto = getViewTreeObserver();
if (vto.isAlive()) {
@ -135,12 +140,6 @@ class TabMenuStripLayout extends ThemedLinearLayout
}
// let's ensure that we are calling this only once
vto.removeOnGlobalLayoutListener(this);
if (selectedView != null) {
selectedView.setTextColor(inactiveTextColor);
}
selectedView = (TextView) getChildAt(position);
selectedView.setTextColor(activeTextColor);
if (strip != null) {
boolean isLayoutRtl = ViewCompat.getLayoutDirection(selectedView) == ViewCompat.LAYOUT_DIRECTION_RTL;