Skip to content

Commit

Permalink
Fix: button background style
Browse files Browse the repository at this point in the history
  • Loading branch information
therajanmaurya committed Nov 27, 2020
1 parent ffc2d21 commit 592404a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
9 changes: 9 additions & 0 deletions SweetUpdate/src/main/res/drawable/background_button.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:angle="0"
android:endColor="#FFFFFF"
android:startColor="@color/white" />
<corners android:radius="10dp" />
</shape>
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@

<com.google.android.material.button.MaterialButton
android:id="@+id/btnLater"
style="@style/SweetButtonStyle.BorderedOutlined"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/layout_padding_16dp"
Expand All @@ -144,6 +145,7 @@

<com.google.android.material.button.MaterialButton
android:id="@+id/btnDownloadInstall"
style="@style/SweetButtonStyle.BorderedOutlined"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/layout_padding_16dp"
Expand Down Expand Up @@ -228,8 +230,7 @@
android:layout_height="wrap_content"
android:onClick="@{() -> fragment.dismiss()}"
android:text="@string/cancel"
android:textAllCaps="false"
android:textColor="@color/text_color" />
android:textAllCaps="false" />

</LinearLayout>

Expand All @@ -253,8 +254,7 @@
android:layout_marginTop="@dimen/layout_padding_8dp"
android:onClick="@{() -> fragment.dismiss()}"
android:text="@string/ok"
android:textAllCaps="false"
android:textColor="@color/text_color" />
android:textAllCaps="false" />

</LinearLayout>

Expand Down
7 changes: 4 additions & 3 deletions SweetUpdate/src/main/res/values/sweet_play_update_styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@
<item name="android:insetTop">0dp</item>
<item name="android:insetBottom">0dp</item>
<item name="android:textAppearance">@style/TextAppearance.MaterialComponents.Body1</item>
<item name="android:textColor">@color/text_color</item>
<item name="backgroundTint">@color/white</item>
<item name="cornerRadius">@dimen/corner_radius</item>
<item name="android:textColor">@color/blue_start</item>
<item name="android:background">@drawable/background_button</item>
<item name="backgroundTint">@null</item>
<item name="cornerRadius">10dp</item>
<item name="iconGravity">textStart</item>
<item name="iconPadding">8dp</item>
<!-- <item name="android:fontFamily">@font/nunito_medium</item>-->
Expand Down

0 comments on commit 592404a

Please sign in to comment.