mirror of
https://github.com/material-components/material-components-android.git
synced 2026-02-20 08:39:55 +08:00
am e29b33f2: am eb3f54ef: Merge "Fix TabLayout\'s flickering for good" into mnc-ub-dev
* commit 'e29b33f2c09dce897bafa81b889247f743dd50a8': Fix TabLayout's flickering for good GitOrigin-RevId=5966da4bb6264b54047f426334da33c212ca2e73 PiperOrigin-RevId: 140550088
This commit is contained in:
parent
928cc599c2
commit
f8d3ee10e6
@ -844,11 +844,11 @@ public class TabLayout extends HorizontalScrollView {
|
||||
animateToTab(tab.getPosition());
|
||||
}
|
||||
} else {
|
||||
final int newPosition = tab != null ? tab.getPosition() : Tab.INVALID_POSITION;
|
||||
if (newPosition != Tab.INVALID_POSITION) {
|
||||
setSelectedTabView(newPosition);
|
||||
}
|
||||
if (updateIndicator) {
|
||||
final int newPosition = tab != null ? tab.getPosition() : Tab.INVALID_POSITION;
|
||||
if (newPosition != Tab.INVALID_POSITION) {
|
||||
setSelectedTabView(newPosition);
|
||||
}
|
||||
if ((mSelectedTab == null || mSelectedTab.getPosition() == Tab.INVALID_POSITION)
|
||||
&& newPosition != Tab.INVALID_POSITION) {
|
||||
// If we don't currently have a tab, just draw the indicator
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user