Skip to content

Commit

Permalink
fix demo
Browse files Browse the repository at this point in the history
  • Loading branch information
biezhihua committed Jun 26, 2024
1 parent 971381d commit 0a620a5
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,27 +51,26 @@ class ScrollTemplateActivity : AppCompatActivity() {
}
scroller.targetPosition = scrollIndex
recyclerView.layoutManager?.startSmoothScroll(scroller)
return
} else {
val smooth = extend?.getBooleanValue(GXTemplateKey.GAIAX_SCROLL_ANIMATED) ?: false
if (smooth) {
recyclerView.smoothScrollToPosition(scrollIndex)
} else {
recyclerView.scrollToPosition(scrollIndex)
}
return
}
} else {
// no process
}
return
}

// scroll item to position
gxTemplateContext.templateData?.scrollIndex?.let {
if (it != -1) {
recyclerView.scrollToPosition(it)
return
}
return
}
}
}
Expand Down

0 comments on commit 0a620a5

Please sign in to comment.