pull/768/head
gedoor 4 years ago
parent 26f17a1341
commit a33e7c3aab
  1. 7
      app/src/main/java/io/legado/app/ui/book/search/SearchActivity.kt

@ -160,6 +160,13 @@ class SearchActivity : VMBaseActivity<ActivityBookSearchBinding, SearchViewModel
binding.recyclerView.scrollToPosition(0) binding.recyclerView.scrollToPosition(0)
} }
} }
override fun onItemRangeMoved(fromPosition: Int, toPosition: Int, itemCount: Int) {
super.onItemRangeMoved(fromPosition, toPosition, itemCount)
if (toPosition == 0) {
binding.recyclerView.scrollToPosition(0)
}
}
}) })
loadMoreView = LoadMoreView(this) loadMoreView = LoadMoreView(this)
binding.recyclerView.addOnScrollListener(object : RecyclerView.OnScrollListener() { binding.recyclerView.addOnScrollListener(object : RecyclerView.OnScrollListener() {

Loading…
Cancel
Save