mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 22:47:59 +01:00
properly handle horizontal scrolling at search results
This commit is contained in:
parent
8691f4ea68
commit
49510884b7
1 changed files with 6 additions and 4 deletions
|
@ -6,6 +6,8 @@ import android.content.Intent
|
|||
import android.os.Bundle
|
||||
import android.view.Menu
|
||||
import android.view.MenuItem
|
||||
import android.view.ViewGroup
|
||||
import android.widget.RelativeLayout
|
||||
import androidx.appcompat.widget.SearchView
|
||||
import androidx.core.view.MenuItemCompat
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
|
@ -153,13 +155,13 @@ class SearchActivity : SimpleActivity(), MediaOperationsListener {
|
|||
|
||||
private fun setupGridLayoutManager() {
|
||||
val layoutManager = media_grid.layoutManager as MyGridLayoutManager
|
||||
/*if (config.scrollHorizontally) {
|
||||
if (config.scrollHorizontally) {
|
||||
layoutManager.orientation = RecyclerView.HORIZONTAL
|
||||
media_refresh_layout.layoutParams = FrameLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.MATCH_PARENT)
|
||||
media_grid.layoutParams = RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.MATCH_PARENT)
|
||||
} else {
|
||||
layoutManager.orientation = RecyclerView.VERTICAL
|
||||
media_refresh_layout.layoutParams = FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)
|
||||
}*/
|
||||
media_grid.layoutParams = RelativeLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)
|
||||
}
|
||||
|
||||
layoutManager.spanCount = config.mediaColumnCnt
|
||||
val adapter = getMediaAdapter()
|
||||
|
|
Loading…
Reference in a new issue