Remove usage of grid layouts

This commit is contained in:
topjohnwu
2020-07-04 03:28:21 -07:00
parent bd14994eb9
commit 0f7caa66fb
8 changed files with 7 additions and 31 deletions
@@ -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,