diff --git a/app/src/main/java/org/schabi/newpipe/ChannelActivity.java b/app/src/main/java/org/schabi/newpipe/ChannelActivity.java
index 71e02c197..e64605218 100644
--- a/app/src/main/java/org/schabi/newpipe/ChannelActivity.java
+++ b/app/src/main/java/org/schabi/newpipe/ChannelActivity.java
@@ -73,8 +73,9 @@ public class ChannelActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
- if (Objects.equals(PreferenceManager.getDefaultSharedPreferences(this)
- .getString("theme", getResources().getString(R.string.light_theme_title)), getResources().getString(R.string.dark_theme_title))) {
+ if (PreferenceManager.getDefaultSharedPreferences(this)
+ .getString("theme", getResources().getString(R.string.light_theme_title)).
+ equals(getResources().getString(R.string.dark_theme_title))) {
setTheme(R.style.DarkTheme_NoActionBar);
}
super.onCreate(savedInstanceState);
diff --git a/app/src/main/java/org/schabi/newpipe/ThemableActivity.java b/app/src/main/java/org/schabi/newpipe/ThemableActivity.java
index 425801676..81789ec1c 100644
--- a/app/src/main/java/org/schabi/newpipe/ThemableActivity.java
+++ b/app/src/main/java/org/schabi/newpipe/ThemableActivity.java
@@ -1,21 +1,19 @@
package org.schabi.newpipe;
+import android.os.Build;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.support.v7.app.AppCompatActivity;
-import java.util.Objects;
-
-import static org.schabi.newpipe.R.attr.theme;
-
public class ThemableActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- if (Objects.equals(PreferenceManager.getDefaultSharedPreferences(this)
- .getString("theme", getResources().getString(R.string.light_theme_title)), getResources().getString(R.string.dark_theme_title))) {
- setTheme(R.style.DarkTheme);
+ if (PreferenceManager.getDefaultSharedPreferences(this)
+ .getString("theme", getResources().getString(R.string.light_theme_title)).
+ equals(getResources().getString(R.string.dark_theme_title))) {
+ setTheme(R.style.DarkTheme);
}
}
}
\ No newline at end of file
diff --git a/app/src/main/java/org/schabi/newpipe/settings/SettingsActivity.java b/app/src/main/java/org/schabi/newpipe/settings/SettingsActivity.java
index be4dbfc03..7765f9653 100644
--- a/app/src/main/java/org/schabi/newpipe/settings/SettingsActivity.java
+++ b/app/src/main/java/org/schabi/newpipe/settings/SettingsActivity.java
@@ -46,9 +46,10 @@ public class SettingsActivity extends PreferenceActivity {
@Override
protected void onCreate(Bundle savedInstanceBundle) {
- if (Objects.equals(PreferenceManager.getDefaultSharedPreferences(this)
- .getString("theme", getResources().getString(R.string.light_theme_title)), getResources().getString(R.string.dark_theme_title))) {
- setTheme(R.style.DarkTheme);
+ if (PreferenceManager.getDefaultSharedPreferences(this)
+ .getString("theme", getResources().getString(R.string.light_theme_title)).
+ equals(getResources().getString(R.string.dark_theme_title))) {
+ setTheme(R.style.DarkTheme);
}
getDelegate().installViewFactory();
getDelegate().onCreate(savedInstanceBundle);
diff --git a/app/src/main/res/layout/activity_error.xml b/app/src/main/res/layout/activity_error.xml
index 478c5218c..891dfe548 100644
--- a/app/src/main/res/layout/activity_error.xml
+++ b/app/src/main/res/layout/activity_error.xml
@@ -42,7 +42,7 @@
android:id="@+id/errorMessageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:textColor="?android:attr/colorAccent"
+ android:textColor="?attr/colorAccent"
android:text="@string/info_labels"/>