mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 12:53:55 +01:00
Add actions and click effects to detailled bottom sheet buttons
This commit is contained in:
parent
693ddef897
commit
b594c111b3
11 changed files with 105 additions and 16 deletions
8
app/src/main/res/color/button_color_selector.xml
Normal file
8
app/src/main/res/color/button_color_selector.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item
|
||||
android:state_enabled="false"
|
||||
android:color="@color/disabled_button_text_color_light" />
|
||||
<item
|
||||
android:color="@color/status_bar_blue" />
|
||||
</selector>
|
||||
8
app/src/main/res/color/text_color_selector.xml
Normal file
8
app/src/main/res/color/text_color_selector.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item
|
||||
android:state_enabled="false"
|
||||
android:color="@color/disabled_button_text_color_light" />
|
||||
<item
|
||||
android:color="@color/enabled_button_text_color_light" />
|
||||
</selector>
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item
|
||||
android:state_pressed="true"
|
||||
android:drawable="@color/pressed_button_background_light" />
|
||||
<item
|
||||
android:state_focused="true"
|
||||
android:drawable="@color/focused_button_background_light" />
|
||||
<item
|
||||
android:drawable="@android:color/transparent" />
|
||||
</selector>
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0"
|
||||
android:tint="@color/status_bar_blue"
|
||||
android:tint="@color/button_color_selector"
|
||||
>
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
android:viewportWidth="102.1415"
|
||||
android:width="24dp"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:tint="@color/status_bar_blue"
|
||||
android:tint="@color/button_color_selector"
|
||||
>
|
||||
<path android:fillColor="#990000" android:pathData="m0.83,77.62 l3.71,0 0,-61.79 -3.71,0 0,61.79zM8.24,77.62 L19.36,77.62 19.36,15.84 8.24,15.84 8.24,77.62zM23.07,15.84 L23.07,77.62 34.19,77.62 34.19,15.84 23.07,15.84z"/>
|
||||
<path android:fillColor="#339966" android:pathData="m89.8,77.62 l3.7,0 0,-61.79 -3.7,0 0,61.79zM97.21,15.84 L97.21,77.62 100.92,77.62 100.92,15.84 97.21,15.84zM37.9,77.62 L41.6,77.62 41.6,15.84 37.9,15.84 37.9,77.62zM45.31,15.84 L45.31,77.62 49.02,77.62 49.02,15.84 45.32,15.84z"/>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
android:viewportWidth="141.092"
|
||||
android:width="24dp"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:tint="@color/status_bar_blue"
|
||||
android:tint="@color/button_color_selector"
|
||||
>
|
||||
<path android:fillAlpha="1" android:fillColor="#000000"
|
||||
android:pathData="M91.5,116.05 L73.43,73.49c-7.16,14.05 -15.09,28.64 -21.88,42.54 -0.04,0.07 -3.28,0.03 -3.28,-0.01C37.9,91.8 27.14,67.75 16.72,43.56 14.3,37.65 5.83,28.14 0.04,28.19 0.04,27.5 0.01,25.97 0,25.04L35.71,25.03l-0.02,3.11c-4.19,0.2 -11.44,2.87 -9.57,7.5 5.04,10.87 22.86,52.97 27.67,63.66 3.36,-6.58 12.75,-24.12 16.61,-31.53 -3.03,-6.22 -13.04,-29.43 -16.04,-35.27 -2.26,-3.81 -7.94,-4.28 -12.32,-4.34 0,-0.98 0.05,-1.73 0.03,-3.07l31.4,0.1 0,2.85c-4.25,0.12 -8.28,1.7 -6.45,5.76 4.22,8.77 6.69,15.01 10.57,23.11 1.24,-2.37 7.58,-15.39 10.61,-22.27 1.83,-4.57 -0.9,-6.28 -8.55,-6.49 0.1,-0.75 0.03,-2.26 0.1,-2.98 9.76,-0.04 24.5,-0.07 27.11,-0.11l0.01,2.97c-4.98,0.19 -10.14,2.85 -12.83,6.97l-13.06,27.08c1.43,3.59 13.99,31.47 15.31,34.56L123.29,34.34c-1.92,-5.05 -8.05,-6.17 -10.44,-6.23 0.02,-0.8 0.02,-2.03 0.03,-3.05l28.18,0.21 0.04,0.14 -0.05,2.68c-6.18,0.19 -10.01,3.49 -12.29,8.91 -5.62,12.68 -22.78,52.86 -34.24,79.05 -0.01,0.01 -3,-0 -3.01,-0.01z"
|
||||
|
|
|
|||
|
|
@ -63,17 +63,21 @@
|
|||
android:layout_weight="1"
|
||||
android:padding="16dp"
|
||||
android:clickable="true"
|
||||
android:background="@drawable/button_background_selector"
|
||||
android:orientation="vertical"
|
||||
>
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:duplicateParentState="true"
|
||||
app:srcCompat="@drawable/ic_directions_black_24dp" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="8dp"
|
||||
android:duplicateParentState="true"
|
||||
android:textColor="@color/text_color_selector"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:text="@string/nearby_directions"
|
||||
/>
|
||||
|
|
@ -85,17 +89,21 @@
|
|||
android:layout_weight="1"
|
||||
android:padding="16dp"
|
||||
android:clickable="true"
|
||||
android:background="@drawable/button_background_selector"
|
||||
android:orientation="vertical"
|
||||
>
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:duplicateParentState="true"
|
||||
app:srcCompat="@drawable/ic_wikidata_logo_24dp" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="8dp"
|
||||
android:duplicateParentState="true"
|
||||
android:textColor="@color/text_color_selector"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:text="@string/nearby_wikidata"
|
||||
/>
|
||||
|
|
@ -108,18 +116,22 @@
|
|||
android:layout_weight="1"
|
||||
android:padding="16dp"
|
||||
android:clickable="true"
|
||||
android:background="@drawable/button_background_selector"
|
||||
android:orientation="vertical"
|
||||
>
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:duplicateParentState="true"
|
||||
app:srcCompat="@drawable/ic_wikipedia_logo_24dp"
|
||||
/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="8dp"
|
||||
android:duplicateParentState="true"
|
||||
android:textColor="@color/text_color_selector"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:text="@string/nearby_wikipedia"
|
||||
|
||||
|
|
|
|||
|
|
@ -31,4 +31,9 @@
|
|||
<color name="upload_overlay_background_dark">#77000000</color>
|
||||
<color name="upload_overlay_background_light">#44000000</color>
|
||||
|
||||
<color name="pressed_button_background_light">#64999999</color>
|
||||
<color name="focused_button_background_light">#32999999</color>
|
||||
<color name="disabled_button_text_color_light">#48000000</color>
|
||||
<color name="enabled_button_text_color_light">#B0000000</color>
|
||||
|
||||
</resources>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue