diff options
Diffstat (limited to 'app/src/main/res')
-rw-r--r-- | app/src/main/res/drawable/cust_button_primary_rect.xml | 82 | ||||
-rw-r--r-- | app/src/main/res/values/colors.xml | 2 |
2 files changed, 72 insertions, 12 deletions
diff --git a/app/src/main/res/drawable/cust_button_primary_rect.xml b/app/src/main/res/drawable/cust_button_primary_rect.xml index 93be5c18..cb77b578 100644 --- a/app/src/main/res/drawable/cust_button_primary_rect.xml +++ b/app/src/main/res/drawable/cust_button_primary_rect.xml @@ -1,21 +1,79 @@ <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android" > <item android:state_pressed="true" > - <shape android:shape="rectangle" > - <padding android:left="8dp" android:right="8dp"/> - <solid android:color="@color/colorPrimaryDark"/> - </shape> + <layer-list + android:paddingLeft="@dimen/button_bevel" + android:paddingRight="@dimen/button_bevel"> + <item> + <shape android:shape="rectangle"> + <solid android:color="@color/colorPrimaryDark"/> + <corners android:radius="@dimen/stdpadding"/> + </shape> + </item> + <item> + <shape android:shape="rectangle"> + <solid android:color="@color/black_transparent"/> + <corners android:radius="@dimen/stdpadding"/> + </shape> + </item> + </layer-list> </item> <item android:state_focused="true"> - <shape android:shape="rectangle" > - <padding android:left="8dp" android:right="8dp"/> - <solid android:color="@color/colorPrimaryDark"/> - </shape> + <layer-list + android:paddingLeft="@dimen/button_bevel" + android:paddingRight="@dimen/button_bevel"> + <item> + <shape android:shape="rectangle" > + <solid android:color="@color/colorPrimaryDark"/> + <corners android:radius="@dimen/stdpadding"/> + </shape> + </item> + <item> + <shape android:shape="rectangle"> + <solid android:color="@color/black_transparent"/> + <corners android:radius="@dimen/stdpadding"/> + </shape> + </item> + + </layer-list> </item> <item > - <shape android:shape="rectangle" > - <padding android:left="8dp" android:right="8dp"/> - <solid android:color="@color/colorPrimary"/> - </shape> + <layer-list + android:paddingLeft="@dimen/button_bevel" + android:paddingRight="@dimen/button_bevel"> + <!-- shadow --> + <item + android:top="@dimen/button_bevel" + android:left="1dp" + > + <shape android:shape="rectangle" > + <corners android:radius="10dp" /> + <solid android:color="@color/colorPrimary_transparent"/> + </shape> + </item> + <!-- fill --> + <item + android:bottom="@dimen/button_bevel" + android:right="1dp" + > + <shape android:shape="rectangle" > + <solid android:color="@color/colorPrimary"/> + <corners android:radius="@dimen/stdpadding"/> + </shape> + </item> + <!-- gradient --> + <item + android:bottom="@dimen/button_bevel" + android:right="1dp" + > + <shape android:shape="rectangle"> + <gradient android:startColor="@color/black_transparent" + android:endColor="@color/white_transparent" + android:angle="90" + /> + <corners android:radius="@dimen/stdpadding"/> + </shape> + </item> + </layer-list> </item> </selector>
\ No newline at end of file diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index bba7f1b5..f1da0785 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -33,6 +33,8 @@ <color name="deepOrange200">#ffab91</color> <color name="white">#ffffff</color> + <color name="white_transparent">#20ffffff</color> + <color name="black_transparent">#20000000</color> <color name="colorActionBarTitleFont">@color/white</color> <color name="colorActionBarSubtitleFont">@color/black800</color> |