更新界面
This commit is contained in:
1 parent
cd4caed170
commit
3908ff7cf2
76 files changed
+1586
-1393
No files matched your search
@@ -12,6 +12,7 @@ import androidx.activity.result.contract.ActivityResultContracts
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import io.legato.kazusa.R
|
||||
import io.legato.kazusa.constant.AppLog
|
||||
import io.legato.kazusa.exception.NoStackTraceException
|
||||
@@ -195,7 +196,7 @@ class PermissionActivity : AppCompatActivity() {
|
||||
finish()
|
||||
return
|
||||
}
|
||||
rationaleDialog = AlertDialog.Builder(this)
|
||||
rationaleDialog = MaterialAlertDialogBuilder(this)
|
||||
.setTitle(R.string.dialog_title)
|
||||
.setMessage(rationale)
|
||||
.setPositiveButton(R.string.dialog_setting) { _, _ ->
|
||||
|
||||
@@ -22,18 +22,6 @@ private constructor(private val mContext: Context) : ThemeStoreInterface {
|
||||
|
||||
private val mEditor = prefs(mContext).edit()
|
||||
|
||||
// override fun enableDynamicColors(context: Context, enable: Boolean): ThemeStore {
|
||||
// mEditor.putBoolean(ThemeStorePrefKeys.KEY_DYNAMIC_COLORS_ENABLED, enable)
|
||||
// if (enable && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||
// // 使用系统动态颜色
|
||||
// val dynamicColors = DynamicColorsOptions.Builder()
|
||||
// .setThemeOverlay(R.style.Theme_App_Dynamic)
|
||||
// .build()
|
||||
// DynamicColors.applyToActivitiesIfAvailable(context.applicationContext, dynamicColors)
|
||||
// }
|
||||
// return this
|
||||
// }
|
||||
|
||||
override fun primaryColor(@ColorInt color: Int): ThemeStore {
|
||||
mEditor.putInt(ThemeStorePrefKeys.KEY_PRIMARY_COLOR, color)
|
||||
if (autoGeneratePrimaryDark(mContext))
|
||||
|
||||
@@ -18,22 +18,6 @@ class ThemeBottomNavigationVIew(context: Context, attrs: AttributeSet) :
|
||||
BottomNavigationView(context, attrs) {
|
||||
|
||||
init {
|
||||
// val bgColor = context.bottomBackground
|
||||
// setBackgroundColor(bgColor)
|
||||
// val textIsDark = ColorUtils.isColorLight(bgColor)
|
||||
// val textColor = context.getSecondaryTextColor(textIsDark)
|
||||
//
|
||||
// val colorStateList = Selector.colorBuild()
|
||||
// .setDefaultColor(textColor)
|
||||
// .setSelectedColor(ThemeStore.accentColor(context)).create()
|
||||
// itemIconTintList = colorStateList
|
||||
// itemTextColor = colorStateList
|
||||
|
||||
if (AppConfig.isEInkMode) {
|
||||
isItemHorizontalTranslationEnabled = false
|
||||
itemBackground = Color.TRANSPARENT.toDrawable()
|
||||
}
|
||||
|
||||
ViewCompat.setOnApplyWindowInsetsListener(this, null)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user