mirror of
https://github.com/SimpleMobileTools/Simple-Launcher.git
synced 2025-06-05 21:59:15 +02:00
properly calculate scrollbar height
This commit is contained in:
@ -1,6 +1,16 @@
|
||||
package com.simplemobiletools.launcher.extensions
|
||||
|
||||
import android.content.Context
|
||||
import com.simplemobiletools.commons.extensions.portrait
|
||||
import com.simplemobiletools.launcher.R
|
||||
import com.simplemobiletools.launcher.helpers.Config
|
||||
|
||||
val Context.config: Config get() = Config.newInstance(applicationContext)
|
||||
|
||||
fun Context.getColumnCount(): Int {
|
||||
return if (portrait) {
|
||||
resources.getInteger(R.integer.portrait_column_count)
|
||||
} else {
|
||||
resources.getInteger(R.integer.landscape_column_count)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user