浏览代码

do not use primary color on edit fields

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
tobiasKaminsky 5 年之前
父节点
当前提交
33b337398b

+ 1 - 1
src/main/java/com/nextcloud/client/logger/ui/LogsActivity.kt

@@ -80,7 +80,7 @@ class LogsActivity : ToolbarActivity() {
         supportActionBar?.setDisplayHomeAsUpEnabled(true)
         supportActionBar?.apply { ThemeUtils.setColoredTitle(this, getString(R.string.logs_title), baseContext) }
 
-        ThemeUtils.tintBackButton(supportActionBar, baseContext);
+        ThemeUtils.tintBackButton(supportActionBar, baseContext)
     }
 
     override fun onCreateOptionsMenu(menu: Menu): Boolean {

+ 3 - 6
src/main/java/com/owncloud/android/utils/ThemeUtils.java

@@ -475,18 +475,15 @@ public final class ThemeUtils {
     public static void themeEditText(Context context, EditText editText, boolean themedBackground) {
         if (editText == null) { return; }
 
-        int color = primaryColor(context);
-        // Don't theme the view when it is already on a theme'd background
+        int color = ContextCompat.getColor(context, R.color.fg_default);
+
+        // Theme the view when it is already on a theme'd background according to dark / light theme
         if (themedBackground) {
             if (darkTheme(context)) {
                 color = ContextCompat.getColor(context, R.color.themed_fg);
             } else {
                 color = ContextCompat.getColor(context, R.color.themed_fg_inverse);
             }
-        } else {
-            if (lightTheme(context)) {
-                color = ContextCompat.getColor(context, R.color.fg_default);
-            }
         }
 
         editText.setHintTextColor(color);