Update UI: complete change for dark mode
This commit is contained in:
1 parent
ccfdf096f9
commit
4d334929c9
7 files changed
+16
-8
No files matched your search
@@ -39,7 +39,9 @@ class ServerCustomConfigActivity : BaseActivity() {
|
||||
setContentView(view)
|
||||
title = getString(R.string.title_server)
|
||||
|
||||
binding.editor.colorScheme = EditorTheme.INTELLIJ_LIGHT
|
||||
if (!Utils.getDarkModeStatus(this)) {
|
||||
binding.editor.colorScheme = EditorTheme.INTELLIJ_LIGHT
|
||||
}
|
||||
binding.editor.language = JsonLanguage()
|
||||
val config = MmkvManager.decodeServerConfig(editGuid)
|
||||
if (config != null) {
|
||||
|
||||
@@ -9,7 +9,7 @@ import android.content.ClipData
|
||||
import android.content.Intent
|
||||
import android.content.pm.PackageManager
|
||||
import android.content.res.Configuration.UI_MODE_NIGHT_MASK
|
||||
import android.content.res.Configuration.UI_MODE_NIGHT_YES
|
||||
import android.content.res.Configuration.UI_MODE_NIGHT_NO
|
||||
import android.net.Uri
|
||||
import android.os.Build
|
||||
import android.os.LocaleList
|
||||
@@ -356,7 +356,7 @@ object Utils {
|
||||
|
||||
fun getDarkModeStatus(context: Context): Boolean {
|
||||
val mode = context.resources.configuration.uiMode and UI_MODE_NIGHT_MASK
|
||||
return mode == UI_MODE_NIGHT_YES
|
||||
return mode != UI_MODE_NIGHT_NO
|
||||
}
|
||||
|
||||
fun getIpv6Address(address: String): String {
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:background="@color/colorPrimary"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true">
|
||||
|
||||
|
||||
@@ -19,7 +19,8 @@
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:nextFocusRight="@+id/layout_share"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:background="@color/colorPrimary"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/server_height"
|
||||
android:layout_gravity="center"
|
||||
|
||||
@@ -18,7 +18,8 @@
|
||||
android:id="@+id/info_container"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:background="@color/colorPrimary"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:nextFocusRight="@+id/layout_edit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/server_height"
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center"
|
||||
android:background="@color/colorPrimary"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:padding="@dimen/nav_header_vertical_spacing">
|
||||
|
||||
<LinearLayout
|
||||
|
||||
@@ -8,8 +8,9 @@
|
||||
<item name="colorAccent">@color/colorAccent</item>
|
||||
<item name="colorMainBg">@color/colorBg</item>
|
||||
<item name="colorMainText">@color/colorText</item>
|
||||
<item name="android:statusBarColor">@color/colorPrimary</item>
|
||||
<item name="android:navigationBarColor">@color/colorPrimary</item>
|
||||
<item name="android:statusBarColor">@color/colorBg</item>
|
||||
<item name="android:navigationBarColor">@color/colorBg</item>
|
||||
<item name="android:windowBackground">@color/colorBg</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
Reference in new issue
Block a user