Commit fb98b3e4 authored by Max Lv's avatar Max Lv

Fix fast scroller in per-app config

parent f629c432
...@@ -229,7 +229,6 @@ class AppManager extends AppCompatActivity with OnMenuItemClickListener { ...@@ -229,7 +229,6 @@ class AppManager extends AppCompatActivity with OnMenuItemClickListener {
appListView.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false)) appListView.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false))
appListView.setItemAnimator(new DefaultItemAnimator) appListView.setItemAnimator(new DefaultItemAnimator)
fastScroller = findViewById(R.id.fastscroller).asInstanceOf[FastScroller] fastScroller = findViewById(R.id.fastscroller).asInstanceOf[FastScroller]
fastScroller.setRecyclerView(appListView)
instance = this instance = this
loadAppsAsync() loadAppsAsync()
...@@ -246,6 +245,7 @@ class AppManager extends AppCompatActivity with OnMenuItemClickListener { ...@@ -246,6 +245,7 @@ class AppManager extends AppCompatActivity with OnMenuItemClickListener {
} while (!appsLoading.compareAndSet(true, false)) } while (!appsLoading.compareAndSet(true, false))
handler.post(() => { handler.post(() => {
appListView.setAdapter(adapter) appListView.setAdapter(adapter)
fastScroller.setRecyclerView(appListView)
val shortAnimTime = getResources.getInteger(android.R.integer.config_shortAnimTime) val shortAnimTime = getResources.getInteger(android.R.integer.config_shortAnimTime)
appListView.setAlpha(0) appListView.setAlpha(0)
appListView.setVisibility(View.VISIBLE) appListView.setVisibility(View.VISIBLE)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment