mirror of
https://github.com/Tencent/QMUI_Android.git
synced 2026-10-28 19:16:55 +08:00
reset select info
This commit is contained in:
@@ -268,6 +268,17 @@ public class QMUIBasicTabSegment extends HorizontalScrollView implements IQMUILa
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* clear select info
|
||||||
|
*/
|
||||||
|
public void resetSelect() {
|
||||||
|
mCurrentSelectedIndex = NO_POSITION;
|
||||||
|
if (mSelectAnimator != null) {
|
||||||
|
mSelectAnimator.cancel();
|
||||||
|
mSelectAnimator = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* add a tab to QMUITabSegment
|
* add a tab to QMUITabSegment
|
||||||
@@ -285,7 +296,10 @@ public class QMUIBasicTabSegment extends HorizontalScrollView implements IQMUILa
|
|||||||
* notify dataChanged event to QMUITabSegment
|
* notify dataChanged event to QMUITabSegment
|
||||||
*/
|
*/
|
||||||
public void notifyDataChanged() {
|
public void notifyDataChanged() {
|
||||||
|
int current = mCurrentSelectedIndex;
|
||||||
|
resetSelect();
|
||||||
mTabAdapter.setup();
|
mTabAdapter.setup();
|
||||||
|
selectTab(current);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addOnTabSelectedListener(@NonNull OnTabSelectedListener listener) {
|
public void addOnTabSelectedListener(@NonNull OnTabSelectedListener listener) {
|
||||||
|
|||||||
Reference in New Issue
Block a user