refactor: readd drawables/animators used by our styles.xml
This commit is contained in:
30
mastodon/src/main/res/animator/m3_button_elevation.xml
Normal file
30
mastodon/src/main/res/animator/m3_button_elevation.xml
Normal file
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_enabled="false">
|
||||
<set>
|
||||
<objectAnimator
|
||||
android:propertyName="elevation"
|
||||
android:valueTo="0dp"
|
||||
android:duration="0"
|
||||
android:valueType="floatType" />
|
||||
</set>
|
||||
</item>
|
||||
<item android:state_hovered="true">
|
||||
<set>
|
||||
<objectAnimator
|
||||
android:propertyName="elevation"
|
||||
android:valueTo="2dp"
|
||||
android:duration="@android:integer/config_shortAnimTime"
|
||||
android:valueType="floatType" />
|
||||
</set>
|
||||
</item>
|
||||
<item>
|
||||
<set>
|
||||
<objectAnimator
|
||||
android:propertyName="elevation"
|
||||
android:valueTo="1dp"
|
||||
android:duration="@android:integer/config_shortAnimTime"
|
||||
android:valueType="floatType" />
|
||||
</set>
|
||||
</item>
|
||||
</selector>
|
||||
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="@color/m3_primary_overlay">
|
||||
<item android:gravity="center_vertical" android:height="40dp">
|
||||
<selector>
|
||||
<item android:state_enabled="true">
|
||||
<shape>
|
||||
<solid android:color="?colorM3SecondaryContainer"/>
|
||||
<stroke android:color="?colorM3OnSecondaryContainer" android:width="1dp"/>
|
||||
<corners android:radius="20dp"/>
|
||||
</shape>
|
||||
</item>
|
||||
<item>
|
||||
<shape>
|
||||
<solid android:color="?colorM3DisabledBackground"/>
|
||||
<corners android:radius="20dp"/>
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
</item>
|
||||
<item android:id="@android:id/mask" android:gravity="center_vertical" android:height="40dp">
|
||||
<shape>
|
||||
<solid android:color="#000"/>
|
||||
<corners android:radius="20dp"/>
|
||||
</shape>
|
||||
</item>
|
||||
</ripple>
|
||||
10
mastodon/src/main/res/drawable/bg_button_new_posts.xml
Normal file
10
mastodon/src/main/res/drawable/bg_button_new_posts.xml
Normal file
@@ -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>
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@drawable/ic_fluent_megaphone_24_regular" android:left="2dp" android:right="2dp" android:top="2dp" android:bottom="2dp"/>
|
||||
<item android:width="14dp" android:height="14dp" android:gravity="top|right">
|
||||
<shape android:shape="oval">
|
||||
<stroke android:color="?appkitToolbarBackground" android:width="2dp"/>
|
||||
<solid android:color="?android:colorAccent"/>
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
||||
10
mastodon/src/main/res/drawable/ic_settings_24_badged.xml
Normal file
10
mastodon/src/main/res/drawable/ic_settings_24_badged.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@drawable/ic_fluent_settings_24_regular" android:left="2dp" android:right="2dp" android:top="2dp" android:bottom="2dp"/>
|
||||
<item android:width="14dp" android:height="14dp" android:gravity="top|right">
|
||||
<shape android:shape="oval">
|
||||
<stroke android:color="?appkitToolbarBackground" android:width="2dp"/>
|
||||
<solid android:color="?android:colorAccent"/>
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
||||
Reference in New Issue
Block a user