Fixed light theme on A12
This commit is contained in:
parent
8cf092ab0b
commit
2e16994276
3 changed files with 5 additions and 3 deletions
|
@ -281,12 +281,13 @@ class TinyPlayerFragment : AbsPlayerFragment(R.layout.fragment_tiny_player),
|
||||||
return gestureDetector.onTouchEvent(event)
|
return gestureDetector.onTouchEvent(event)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Suppress("Deprecation")
|
||||||
private fun vibrate() {
|
private fun vibrate() {
|
||||||
val v = requireContext().getSystemService(Context.VIBRATOR_SERVICE) as Vibrator?
|
val v = requireContext().getSystemService(Context.VIBRATOR_SERVICE) as Vibrator?
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||||
v!!.vibrate(VibrationEffect.createOneShot(10, VibrationEffect.DEFAULT_AMPLITUDE))
|
v?.vibrate(VibrationEffect.createOneShot(10, VibrationEffect.DEFAULT_AMPLITUDE))
|
||||||
} else {
|
} else {
|
||||||
v!!.vibrate(10)
|
v?.vibrate(10)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,7 +92,7 @@ class MainSettingsFragment : Fragment(), View.OnClickListener {
|
||||||
ViewCompat.setOnApplyWindowInsetsListener(
|
ViewCompat.setOnApplyWindowInsetsListener(
|
||||||
requireActivity().rootView
|
requireActivity().rootView
|
||||||
) { _, insets ->
|
) { _, insets ->
|
||||||
binding.container.updatePadding(bottom = insets.safeGetBottomInsets())
|
_binding?.container?.updatePadding(bottom = insets.safeGetBottomInsets())
|
||||||
insets
|
insets
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,6 +28,7 @@ object ThemeManager {
|
||||||
fun getNightMode(
|
fun getNightMode(
|
||||||
context: Context
|
context: Context
|
||||||
): Int = when (context.generalThemeValue) {
|
): Int = when (context.generalThemeValue) {
|
||||||
|
LIGHT -> AppCompatDelegate.MODE_NIGHT_NO
|
||||||
DARK -> AppCompatDelegate.MODE_NIGHT_YES
|
DARK -> AppCompatDelegate.MODE_NIGHT_YES
|
||||||
BLACK -> {
|
BLACK -> {
|
||||||
if (PreferenceUtil.baseTheme == "dark") {
|
if (PreferenceUtil.baseTheme == "dark") {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue