mirror of
https://github.com/M66B/FairEmail.git
synced 2025-03-15 08:29:24 +00:00
Added Material You hint
This commit is contained in:
parent
a29736deaf
commit
b1cad66ad1
3 changed files with 28 additions and 13 deletions
|
@ -27,6 +27,7 @@ public class FragmentDialogTheme extends FragmentDialogBase {
|
|||
private RadioGroup rgTheme;
|
||||
private SwitchCompat swReverse;
|
||||
private RadioButton rbThemeYou;
|
||||
private TextView tvYou;
|
||||
private RadioGroup rgThemeOptions;
|
||||
private TextView tvSystem;
|
||||
private SwitchCompat swBlack;
|
||||
|
@ -75,6 +76,7 @@ public class FragmentDialogTheme extends FragmentDialogBase {
|
|||
View dview = LayoutInflater.from(context).inflate(R.layout.dialog_theme, null);
|
||||
rgTheme = dview.findViewById(R.id.rgTheme);
|
||||
rbThemeYou = dview.findViewById(R.id.rbThemeYou);
|
||||
tvYou = dview.findViewById(R.id.tvYou);
|
||||
swReverse = dview.findViewById(R.id.swReverse);
|
||||
rgThemeOptions = dview.findViewById(R.id.rgThemeOptions);
|
||||
tvSystem = dview.findViewById(R.id.tvSystem);
|
||||
|
@ -91,7 +93,8 @@ public class FragmentDialogTheme extends FragmentDialogBase {
|
|||
}
|
||||
});
|
||||
|
||||
rbThemeYou.setVisibility((Build.VERSION.SDK_INT < Build.VERSION_CODES.S ? View.GONE : View.VISIBLE));
|
||||
rbThemeYou.setVisibility(Build.VERSION.SDK_INT < Build.VERSION_CODES.S ? View.GONE : View.VISIBLE);
|
||||
tvYou.setVisibility(Build.VERSION.SDK_INT < Build.VERSION_CODES.S ? View.GONE : View.VISIBLE);
|
||||
|
||||
swReverse.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
<RadioButton
|
||||
android:id="@+id/rbThemeBlueOrange"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="6dp"
|
||||
android:text="@string/title_setup_theme_blue_orange"
|
||||
|
@ -43,7 +43,7 @@
|
|||
|
||||
<RadioButton
|
||||
android:id="@+id/rbThemeRedGreen"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="6dp"
|
||||
android:text="@string/title_setup_theme_red_green"
|
||||
|
@ -51,7 +51,7 @@
|
|||
|
||||
<RadioButton
|
||||
android:id="@+id/rbThemeYellowPurple"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="6dp"
|
||||
android:text="@string/title_setup_theme_yellow_purple"
|
||||
|
@ -59,7 +59,7 @@
|
|||
|
||||
<RadioButton
|
||||
android:id="@+id/rbThemeGrey"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="6dp"
|
||||
android:text="@string/title_setup_theme_grey"
|
||||
|
@ -67,7 +67,7 @@
|
|||
|
||||
<RadioButton
|
||||
android:id="@+id/rbThemeSolarized"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="6dp"
|
||||
android:text="@string/title_setup_theme_solarized"
|
||||
|
@ -75,7 +75,7 @@
|
|||
|
||||
<RadioButton
|
||||
android:id="@+id/rbThemeBlack"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="6dp"
|
||||
android:text="@string/title_setup_theme_black"
|
||||
|
@ -83,7 +83,7 @@
|
|||
|
||||
<RadioButton
|
||||
android:id="@+id/rbThemeBlackAndWhite"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="6dp"
|
||||
android:text="@string/title_setup_theme_black_and_white"
|
||||
|
@ -91,13 +91,24 @@
|
|||
|
||||
<RadioButton
|
||||
android:id="@+id/rbThemeYou"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="6dp"
|
||||
android:text="@string/title_setup_theme_you"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
|
||||
</RadioGroup>
|
||||
|
||||
<eu.faircode.email.FixedTextView
|
||||
android:id="@+id/tvYou"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:text="@string/title_setup_theme_you_hint"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textStyle="italic"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/rgTheme" />
|
||||
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/swReverse"
|
||||
android:layout_width="0dp"
|
||||
|
@ -106,7 +117,7 @@
|
|||
android:text="@string/title_setup_theme_reverse"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/rgTheme" />
|
||||
app:layout_constraintTop_toBottomOf="@id/tvYou" />
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/rgThemeOptions"
|
||||
|
@ -120,7 +131,7 @@
|
|||
|
||||
<RadioButton
|
||||
android:id="@+id/rbThemeLight"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="6dp"
|
||||
android:text="@string/title_setup_theme_light"
|
||||
|
@ -128,7 +139,7 @@
|
|||
|
||||
<RadioButton
|
||||
android:id="@+id/rbThemeDark"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="6dp"
|
||||
android:text="@string/title_setup_theme_dark"
|
||||
|
@ -136,7 +147,7 @@
|
|||
|
||||
<RadioButton
|
||||
android:id="@+id/rbThemeSystem"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="6dp"
|
||||
android:text="@string/title_setup_theme_system"
|
||||
|
|
|
@ -298,6 +298,7 @@
|
|||
<string name="title_setup_theme_html_light">Light background for original message view</string>
|
||||
<string name="title_setup_theme_composer_light">Light background for message editor</string>
|
||||
|
||||
<string name="title_setup_theme_you_hint">The Material You colors can be configured in the Android system settings</string>
|
||||
<string name="title_setup_theme_system_hint">This will automatically switch to a light/dark theme on day/night mode, if supported by Android</string>
|
||||
<string name="title_setup_theme_more_colors">I want more colors</string>
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue