mirror of
https://github.com/rebelonion/Dantotsu.git
synced 2026-01-18 11:33:56 +00:00
3x grid for 360DP mobiles
This commit is contained in:
@@ -78,7 +78,7 @@ class SearchActivity : AppCompatActivity() {
|
||||
mediaAdaptor = MediaAdaptor(style, model.searchResults.results, this, matchParent = true)
|
||||
val headerAdaptor = SearchAdapter(this)
|
||||
|
||||
val gridSize = (screenWidth / 124f).toInt()
|
||||
val gridSize = (screenWidth / 120f).toInt()
|
||||
val gridLayoutManager = GridLayoutManager(this, gridSize)
|
||||
gridLayoutManager.spanSizeLookup = object : GridLayoutManager.SpanSizeLookup() {
|
||||
override fun getSpanSize(position: Int): Int {
|
||||
|
||||
@@ -46,7 +46,7 @@ class ListFragment : Fragment() {
|
||||
binding.listRecyclerView.layoutManager =
|
||||
GridLayoutManager(
|
||||
requireContext(),
|
||||
if (grid!!) (screenWidth / 124f).toInt() else 1
|
||||
if (grid!!) (screenWidth / 120f).toInt() else 1
|
||||
)
|
||||
binding.listRecyclerView.adapter = adapter
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user