Use fixed colors for SplashFragment

fixes #561
This commit is contained in:
Grishka 2023-04-12 18:47:02 +03:00
parent eef33266fc
commit 0de227ab9c
4 changed files with 51 additions and 4 deletions

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple android:color="#1effffff" xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<selector>
<item android:state_enabled="true">
<shape>
<stroke android:color="?colorM3Outline" android:width="1dp"/>
<corners android:radius="20dp"/>
</shape>
</item>
<item>
<shape>
<stroke android:color="@color/m3_on_surface_overlay" android:width="1dp"/>
<corners android:radius="20dp"/>
</shape>
</item>
</selector>
</item>
<item android:id="@android:id/mask">
<shape>
<solid android:color="#000"/>
<corners android:radius="20dp"/>
</shape>
</item>
</ripple>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple android:color="#1effffff" xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@android:id/mask">
<shape>
<solid android:color="#000"/>
<corners android:radius="20dp"/>
</shape>
</item>
</ripple>

View File

@ -6,7 +6,7 @@
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:clipToPadding="false"
android:theme="@style/Theme.Mastodon.Dark">
android:theme="@style/Theme.Mastodon.Dark.SplashFragment">
<View
android:id="@+id/blue_fill"
@ -120,7 +120,9 @@
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginTop="8dp"
android:textColor="#FFF"
style="@style/Widget.Mastodon.M3.Button.Outlined"
android:background="@drawable/bg_button_m3_outlined_white"
android:text="@string/pick_server"/>
@ -137,7 +139,7 @@
android:layout_height="1dp"
android:layout_weight="1"
android:layout_gravity="center_vertical"
android:background="?colorM3Secondary"/>
android:background="#B2FFFFFF"/>
<TextView
android:layout_width="wrap_content"
@ -146,7 +148,7 @@
android:layout_marginRight="8dp"
android:textAllCaps="true"
android:textAppearance="@style/m3_label_large"
android:textColor="?colorM3Secondary"
android:textColor="#B2FFFFFF"
android:layout_gravity="center_vertical"
android:text="@string/signup_or_login"/>
@ -155,7 +157,7 @@
android:layout_height="1dp"
android:layout_weight="1"
android:layout_gravity="center_vertical"
android:background="?colorM3Secondary"/>
android:background="#B2FFFFFF"/>
</LinearLayout>
@ -172,7 +174,9 @@
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:layout_weight="1"
android:textColor="#FFF"
style="@style/Widget.Mastodon.M3.Button.Text"
android:background="@drawable/bg_button_m3_text_white"
android:text="@string/learn_more"/>
<Button
@ -181,7 +185,9 @@
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:layout_weight="1"
android:textColor="#FFF"
style="@style/Widget.Mastodon.M3.Button.Text"
android:background="@drawable/bg_button_m3_text_white"
android:text="@string/log_in"/>
</LinearLayout>

View File

@ -146,6 +146,13 @@
<item name="colorM3OnErrorContainer">#F9DEDC</item>
</style>
<style name="Theme.Mastodon.Dark.SplashFragment">
<item name="colorM3Primary">#563ACC</item>
<item name="colorM3OnPrimary">#FFF</item>
<item name="colorM3Outline">#FFF</item>
<item name="colorM3OnSurface">#FFF</item>
</style>
<style name="Theme.Mastodon.Dark.TrueBlack">
<item name="colorWindowBackground">#000</item>