fix some layout manager glitch at list view with horizontal scrolling

This commit is contained in:
tibbi 2017-10-01 00:03:17 +02:00
parent e4b77eacb0
commit 80b6279f83
2 changed files with 4 additions and 0 deletions

View file

@ -357,6 +357,8 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
val layoutManager = directories_grid.layoutManager as GridLayoutManager val layoutManager = directories_grid.layoutManager as GridLayoutManager
layoutManager.spanCount = 1 layoutManager.spanCount = 1
layoutManager.orientation = GridLayoutManager.VERTICAL
directories_refresh_layout.layoutParams = FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)
} }
private fun createNewFolder() { private fun createNewFolder() {

View file

@ -431,6 +431,8 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
val layoutManager = media_grid.layoutManager as GridLayoutManager val layoutManager = media_grid.layoutManager as GridLayoutManager
layoutManager.spanCount = 1 layoutManager.spanCount = 1
layoutManager.orientation = GridLayoutManager.VERTICAL
media_refresh_layout.layoutParams = FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)
} }
private fun increaseColumnCount() { private fun increaseColumnCount() {