mirror of
https://github.com/kvorschk/Magisk.git
synced 2026-12-06 07:20:47 -05:00
Remove usage of grid layouts
This commit is contained in:
@@ -47,7 +47,7 @@ abstract class BaseUIActivity<ViewModel : BaseViewModel, Binding : ViewDataBindi
|
||||
open val snackbarView get() = binding.root
|
||||
|
||||
init {
|
||||
val theme = Config.darkThemeExtended
|
||||
val theme = Config.darkTheme
|
||||
AppCompatDelegate.setDefaultNightMode(theme)
|
||||
}
|
||||
|
||||
|
||||
@@ -21,8 +21,6 @@ import com.topjohnwu.magisk.model.entity.recycler.SettingsItem
|
||||
import com.topjohnwu.magisk.utils.asTransitive
|
||||
import com.topjohnwu.superuser.Shell
|
||||
import java.io.File
|
||||
import kotlin.math.max
|
||||
import kotlin.math.min
|
||||
|
||||
// --- Customization
|
||||
|
||||
@@ -123,17 +121,6 @@ object DownloadPath : SettingsItem.Input() {
|
||||
.inflate(LayoutInflater.from(context)).also { it.data = this }.root
|
||||
}
|
||||
|
||||
object GridSize : SettingsItem.Selector() {
|
||||
override var value by bindableValue(Config.listSpanCount - 1) {
|
||||
Config.listSpanCount = max(1, min(2, it + 1))
|
||||
}
|
||||
|
||||
override val title = R.string.settings_grid_column_count_title.asTransitive()
|
||||
override val description = R.string.settings_grid_column_count_summary.asTransitive()
|
||||
override val entryRes = R.array.span_count
|
||||
override val entryValRes = R.array.value_array
|
||||
}
|
||||
|
||||
object UpdateChannel : SettingsItem.Selector() {
|
||||
override var value by bindableValue(Config.updateChannel) { Config.updateChannel = it }
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ class SettingsViewModel(
|
||||
// Customization
|
||||
val list = mutableListOf(
|
||||
Customization,
|
||||
Theme, Language, GridSize
|
||||
Theme, Language
|
||||
)
|
||||
if (Build.VERSION.SDK_INT < 21) {
|
||||
// Pre 5.0 does not support getting colors from attributes,
|
||||
|
||||
Reference in New Issue
Block a user