mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2025-01-18 06:17:59 +01:00
setup listLayoutManager too
This commit is contained in:
parent
559469e7b8
commit
c17e6833e2
2 changed files with 18 additions and 18 deletions
|
@ -648,10 +648,10 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
|
|||
}
|
||||
|
||||
private fun setupListLayoutManager() {
|
||||
/*val layoutManager = directories_grid.layoutManager as MyGridLayoutManager
|
||||
val layoutManager = directories_grid.layoutManager as MyGridLayoutManager
|
||||
layoutManager.spanCount = 1
|
||||
layoutManager.orientation = RecyclerView.VERTICAL
|
||||
directories_refresh_layout.layoutParams = FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)
|
||||
directories_refresh_layout.layoutParams = RelativeLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)
|
||||
|
||||
val smallMargin = resources.getDimension(R.dimen.small_margin).toInt()
|
||||
(directories_grid.layoutParams as RelativeLayout.LayoutParams).apply {
|
||||
|
@ -659,7 +659,7 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
|
|||
bottomMargin = smallMargin
|
||||
}
|
||||
|
||||
mZoomListener = null*/
|
||||
mZoomListener = null
|
||||
}
|
||||
|
||||
private fun measureRecyclerViewContent(directories: ArrayList<Directory>) {
|
||||
|
|
|
@ -690,6 +690,21 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener {
|
|||
}
|
||||
}
|
||||
|
||||
private fun setupListLayoutManager() {
|
||||
val layoutManager = media_grid.layoutManager as MyGridLayoutManager
|
||||
layoutManager.spanCount = 1
|
||||
layoutManager.orientation = RecyclerView.VERTICAL
|
||||
media_refresh_layout.layoutParams = RelativeLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)
|
||||
|
||||
val smallMargin = resources.getDimension(R.dimen.small_margin).toInt()
|
||||
(media_grid.layoutParams as RelativeLayout.LayoutParams).apply {
|
||||
topMargin = smallMargin
|
||||
bottomMargin = smallMargin
|
||||
}
|
||||
|
||||
mZoomListener = null
|
||||
}
|
||||
|
||||
private fun measureRecyclerViewContent(media: ArrayList<ThumbnailItem>) {
|
||||
media_grid.onGlobalLayout {
|
||||
if (config.scrollHorizontally) {
|
||||
|
@ -784,21 +799,6 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener {
|
|||
}
|
||||
}
|
||||
|
||||
private fun setupListLayoutManager() {
|
||||
/*val layoutManager = media_grid.layoutManager as MyGridLayoutManager
|
||||
layoutManager.spanCount = 1
|
||||
layoutManager.orientation = RecyclerView.VERTICAL
|
||||
media_refresh_layout.layoutParams = FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)
|
||||
|
||||
val smallMargin = resources.getDimension(R.dimen.small_margin).toInt()
|
||||
(media_grid.layoutParams as RelativeLayout.LayoutParams).apply {
|
||||
topMargin = smallMargin
|
||||
bottomMargin = smallMargin
|
||||
}
|
||||
|
||||
mZoomListener = null*/
|
||||
}
|
||||
|
||||
private fun increaseColumnCount() {
|
||||
config.mediaColumnCnt = ++(media_grid.layoutManager as MyGridLayoutManager).spanCount
|
||||
columnCountChanged()
|
||||
|
|
Loading…
Reference in a new issue