mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
fix: android Tabs selected item color incorrectly applied (#9040)
* fix: selected-item-color gets applied to wrong TabStripItems * chore: Added selection colors to 2 ui examples. * chore: Removing used for testing.
This commit is contained in:
committed by
GitHub
parent
e16bc606ef
commit
b47ce0a97c
@@ -56,7 +56,7 @@ public class TabViewPager extends ViewPager {
|
||||
|
||||
@Override
|
||||
public void setCurrentItem(int item) {
|
||||
boolean smoothScroll = this.animationEnabled && this.swipePageEnabled;
|
||||
boolean smoothScroll = this.animationEnabled;
|
||||
super.setCurrentItem(item, smoothScroll);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -317,10 +317,6 @@ public class TabsBar extends HorizontalScrollView {
|
||||
return true;
|
||||
}
|
||||
|
||||
public void onSelectedPositionChange(int position, int prevPosition) {
|
||||
// to be overridden in JS
|
||||
}
|
||||
|
||||
private void populateTabStrip() {
|
||||
final PagerAdapter adapter = mViewPager.getAdapter();
|
||||
final OnClickListener tabClickListener = new TabClickListener();
|
||||
@@ -394,12 +390,6 @@ public class TabsBar extends HorizontalScrollView {
|
||||
return;
|
||||
}
|
||||
|
||||
int prevPosition = mTabStrip.getSelectedPosition();
|
||||
|
||||
if (prevPosition != position) {
|
||||
onSelectedPositionChange(position, prevPosition);
|
||||
}
|
||||
|
||||
mTabStrip.onTabsViewPagerPageChanged(position, positionOffset);
|
||||
|
||||
View selectedTitle = mTabStrip.getChildAt(position);
|
||||
|
||||
Reference in New Issue
Block a user