fix see new posts button design
This commit is contained in:
parent
c33c3d9112
commit
47d1b182ac
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:color="@color/m3_pressed_overlay">
|
||||||
|
<item android:gravity="center_vertical" android:height="36dp">
|
||||||
|
<shape>
|
||||||
|
<solid android:color="?colorM3Primary"/>
|
||||||
|
<corners android:radius="18dp"/>
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
</ripple>
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:color="@color/m3_pressed_overlay">
|
||||||
|
<item android:gravity="center_vertical" android:height="36dp">
|
||||||
|
<shape>
|
||||||
|
<stroke android:color="@color/m3_on_surface_overlay" android:width="1dp"/>
|
||||||
|
<corners android:radius="18dp"/>
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
</ripple>
|
|
@ -1,11 +1,11 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/switcher_btn"
|
android:id="@+id/switcher_btn"
|
||||||
style="@style/Widget.Mastodon.M3.Button.Text"
|
style="@style/Widget.Mastodon.M3.Button.Text"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_gravity="center_vertical|start"
|
android:layout_gravity="center_vertical|start"
|
||||||
|
@ -14,54 +14,44 @@
|
||||||
android:tooltipText="@string/sk_switch_timeline"
|
android:tooltipText="@string/sk_switch_timeline"
|
||||||
android:paddingStart="12dp"
|
android:paddingStart="12dp"
|
||||||
android:paddingEnd="12dp">
|
android:paddingEnd="12dp">
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/timeline_icon"
|
android:id="@+id/timeline_icon"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:src="@drawable/ic_fluent_home_24_regular" />
|
android:src="@drawable/ic_fluent_home_24_regular"/>
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_vertical">
|
android:layout_gravity="center_vertical">
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/collapsed_chevron"
|
android:id="@+id/collapsed_chevron"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="8dp"
|
android:layout_marginStart="8dp"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:src="@drawable/ic_fluent_chevron_down_16_filled"
|
android:src="@drawable/ic_fluent_chevron_down_16_filled"
|
||||||
android:visibility="gone" />
|
android:visibility="gone"/>
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/timeline_title"
|
style="@style/action_bar_title"
|
||||||
style="@style/action_bar_title"
|
android:id="@+id/timeline_title"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="16dp"
|
android:layout_marginStart="16dp"
|
||||||
android:drawablePadding="8dp"
|
android:drawablePadding="8dp"
|
||||||
android:drawableEnd="@drawable/ic_fluent_chevron_down_16_filled" />
|
android:drawableEnd="@drawable/ic_fluent_chevron_down_16_filled"/>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/show_new_posts_btn"
|
style="?toolbarActionButtonStyle"
|
||||||
style="@style/Widget.Mastodon.M3.Button.Tonal.Icon"
|
android:id="@+id/show_new_posts_btn"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@drawable/bg_button_m3_tonal_selector"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:textAppearance="@style/m3_title_medium"
|
|
||||||
android:textSize="16sp"
|
|
||||||
android:text="@string/see_new_posts"
|
android:text="@string/see_new_posts"
|
||||||
android:drawableStart="@drawable/ic_fluent_arrow_up_16_filled"
|
android:drawableStart="@drawable/ic_fluent_arrow_up_16_filled"
|
||||||
android:layout_gravity="center" />
|
android:layout_gravity="center"/>
|
||||||
<!--
|
</FrameLayout>
|
||||||
using the selector background because..
|
|
||||||
the selected=false state's border looks better than the one from the outline style
|
|
||||||
(as per m3 spec) :( i should probably fix this at some point
|
|
||||||
-->
|
|
||||||
</FrameLayout>
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
|
@ -37,6 +37,7 @@
|
||||||
<attr name="colorM3DarkOnSurface" format="color" />
|
<attr name="colorM3DarkOnSurface" format="color" />
|
||||||
<attr name="colorTabBarAlpha" format="color" />
|
<attr name="colorTabBarAlpha" format="color" />
|
||||||
<attr name="colorFilledCardAlpha" format="color" />
|
<attr name="colorFilledCardAlpha" format="color" />
|
||||||
|
<attr name="toolbarActionButtonStyle" format="reference" />
|
||||||
|
|
||||||
<attr name="colorPrimary25" format="color" />
|
<attr name="colorPrimary25" format="color" />
|
||||||
<attr name="colorPrimary50" format="color" />
|
<attr name="colorPrimary50" format="color" />
|
||||||
|
|
|
@ -67,6 +67,7 @@
|
||||||
<item name="colorM3OnErrorContainer">#410E0B</item>
|
<item name="colorM3OnErrorContainer">#410E0B</item>
|
||||||
<item name="colorWhite">#FFF</item>
|
<item name="colorWhite">#FFF</item>
|
||||||
<item name="colorSensitiveOverlay">#a6ffffff</item>
|
<item name="colorSensitiveOverlay">#a6ffffff</item>
|
||||||
|
<item name="toolbarActionButtonStyle">@style/Widget.Mastodon.M3.Button.ToolbarAction</item>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
custom themes generally don't have secondary/tertiary accent colors -
|
custom themes generally don't have secondary/tertiary accent colors -
|
||||||
|
@ -155,6 +156,7 @@
|
||||||
<item name="colorM3SecondaryContainer">?colorNeutral800</item>
|
<item name="colorM3SecondaryContainer">?colorNeutral800</item>
|
||||||
<item name="colorTabBarAlpha">#00000000</item>
|
<item name="colorTabBarAlpha">#00000000</item>
|
||||||
<item name="colorFilledCardAlpha">#00000000</item>
|
<item name="colorFilledCardAlpha">#00000000</item>
|
||||||
|
<item name="toolbarActionButtonStyle">@style/Widget.Mastodon.M3.Button.ToolbarAction.Black</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="ColorPalette.Material3">
|
<style name="ColorPalette.Material3">
|
||||||
|
|
|
@ -243,6 +243,25 @@
|
||||||
<item name="android:paddingStart">16dp</item>
|
<item name="android:paddingStart">16dp</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="Widget.Mastodon.M3.Button.ToolbarAction">
|
||||||
|
<item name="android:paddingStart">14dp</item>
|
||||||
|
<item name="android:paddingEnd">20dp</item>
|
||||||
|
<item name="android:textAppearance">@style/m3_title_medium</item>
|
||||||
|
<item name="android:ellipsize">end</item>
|
||||||
|
<item name="android:maxLines">1</item>
|
||||||
|
<item name="android:textSize">16sp</item>
|
||||||
|
<item name="android:stateListAnimator">@animator/m3_button_elevation</item>
|
||||||
|
|
||||||
|
<item name="android:background">@drawable/bg_button_new_posts</item>
|
||||||
|
<item name="android:textColor">@color/button_text_m3_filled</item>
|
||||||
|
<item name="android:drawableTint">@color/button_text_m3_filled</item>
|
||||||
|
</style>
|
||||||
|
<style name="Widget.Mastodon.M3.Button.ToolbarAction.Black">
|
||||||
|
<item name="android:background">@drawable/bg_button_new_posts_outlined</item>
|
||||||
|
<item name="android:textColor">@color/button_text_m3_tonal</item>
|
||||||
|
<item name="android:drawableTint">@color/button_text_m3_tonal</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
<style name="Widget.Mastodon.M3.EditText" parent="android:Widget.Material.EditText">
|
<style name="Widget.Mastodon.M3.EditText" parent="android:Widget.Material.EditText">
|
||||||
<item name="android:background">@drawable/bg_m3_outlined_text_field_nopad</item>
|
<item name="android:background">@drawable/bg_m3_outlined_text_field_nopad</item>
|
||||||
<item name="android:textAppearance">@style/m3_body_large</item>
|
<item name="android:textAppearance">@style/m3_body_large</item>
|
||||||
|
|
Loading…
Reference in New Issue