Bring black black theme

pull/171/head
M66B 5 years ago
parent a04609d7b4
commit 851c099d8a

@ -158,11 +158,15 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc
case "grey_light":
setTheme(R.style.AppThemeGreySteelBlueLight);
break;
case "black":
case "grey_dark":
setTheme(R.style.AppThemeGreySteelBlueDark);
break;
// Black
case "black":
setTheme(R.style.AppThemeBlack);
break;
// System
case "system":
case "blue_orange_system":

@ -716,8 +716,6 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
String theme = prefs.getString("theme", "light");
if ("black".equals(theme))
theme = "grey_dark";
itten.setOnClickListener(new View.OnClickListener() {
@Override
@ -767,7 +765,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
theme.startsWith("purple_yellow") ||
theme.startsWith("green_red"));
boolean dark = theme.endsWith("dark");
boolean black = theme.endsWith("black");
boolean black = (!"black".equals(theme) && theme.endsWith("black"));
boolean system = theme.endsWith("system");
swReverse.setChecked(colored);
@ -811,6 +809,10 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
case "grey_dark":
rgTheme.check(R.id.rbThemeGrey);
break;
case "black":
rgTheme.check(R.id.rbThemeBlack);
break;
}
return new AlertDialog.Builder(getContext())
@ -859,6 +861,9 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
prefs.edit().putString("theme",
"grey" + (dark ? "_dark" : "_light")).apply();
break;
case R.id.rbThemeBlack:
prefs.edit().putString("theme", "black").apply();
break;
}
}
})

@ -71,6 +71,14 @@
android:padding="6dp"
android:text="@string/title_setup_theme_grey"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
<RadioButton
android:id="@+id/rbThemeBlack"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="6dp"
android:text="@string/title_setup_theme_black"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
</RadioGroup>
<androidx.appcompat.widget.SwitchCompat
@ -98,7 +106,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="@string/title_setup_theme_black"
android:text="@string/title_setup_theme_black_background"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/swDark" />

@ -325,7 +325,7 @@
<!-- Other -->
<style name="_AppThemeBlack" parent="AppThemeBlueOrangeDark">
<style name="AppThemeBlack" parent="AppThemeBlueOrangeDark">
<item name="themeName">black</item>
<item name="colorPrimary">@color/blackPrimary</item>
<item name="colorPrimaryDark">@color/blackPrimaryDark</item>

Loading…
Cancel
Save