Skip to content

Commit

Permalink
fix(android): indicator issue
Browse files Browse the repository at this point in the history
  • Loading branch information
keerl committed Sep 18, 2023
1 parent 443ac1b commit 6ae8929
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/ui-pager/index.android.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,12 @@ export class Pager extends PagerBase {

setIndicator(indicator) {
super.setIndicator(indicator);
if (indicator) {
this.indicator.setCount(this.items ? this.items.length : 0);
this.indicator.setSelection(this.selectedIndex, false);
}
setTimeout(() => {
if (indicator) {
this.indicator.setCount(this.items ? this.items.length : 0);
this.indicator.setSelection(this.selectedIndex, false);
}
});
}

private enumerateViewHolders<T = any>(cb: (v: PagerViewHolder) => T) {
Expand Down

0 comments on commit 6ae8929

Please sign in to comment.