do not remeasure recyclerview size at column count change, we set it manually

This commit is contained in:
tibbi 2018-06-24 18:11:30 +02:00
parent 92fc3ec90c
commit 8e4aa5b438
1 changed files with 0 additions and 4 deletions

View File

@ -649,8 +649,6 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
} }
private fun increaseColumnCount() { private fun increaseColumnCount() {
media_vertical_fastscroller.measureRecyclerViewOnRedraw()
media_horizontal_fastscroller.measureRecyclerViewOnRedraw()
config.mediaColumnCnt = ++(media_grid.layoutManager as MyGridLayoutManager).spanCount config.mediaColumnCnt = ++(media_grid.layoutManager as MyGridLayoutManager).spanCount
invalidateOptionsMenu() invalidateOptionsMenu()
media_grid.adapter?.notifyDataSetChanged() media_grid.adapter?.notifyDataSetChanged()
@ -658,8 +656,6 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
} }
private fun reduceColumnCount() { private fun reduceColumnCount() {
media_vertical_fastscroller.measureRecyclerViewOnRedraw()
media_horizontal_fastscroller.measureRecyclerViewOnRedraw()
config.mediaColumnCnt = --(media_grid.layoutManager as MyGridLayoutManager).spanCount config.mediaColumnCnt = --(media_grid.layoutManager as MyGridLayoutManager).spanCount
invalidateOptionsMenu() invalidateOptionsMenu()
media_grid.adapter?.notifyDataSetChanged() media_grid.adapter?.notifyDataSetChanged()