Skip to content

Commit

Permalink
Fix: button size and style
Browse files Browse the repository at this point in the history
  • Loading branch information
therajanmaurya committed Nov 27, 2020
1 parent 592404a commit f7de65c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class SweetPlayAppUpdaterBottomSheet(
headerImage = this@SweetPlayAppUpdaterBottomSheet.headerImage
bsBackground = this@SweetPlayAppUpdaterBottomSheet.background

/*typeface?.let {
typeface?.let {
tvUpdateAvailable.typeface = it
tvUpdateAvailableMessage.typeface = it
tvUpdateProgress.typeface = it
Expand All @@ -72,7 +72,7 @@ class SweetPlayAppUpdaterBottomSheet(
btnDownloadInstall.typeface = it
btnCancel.typeface = it
btnOk.typeface = it
}*/
}
}
return binding.root
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,17 +137,13 @@
<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"
android:onClick="@{() -> fragment.dismiss()}"
android:text="@string/later" />

<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"
android:text="@string/download" />

Expand Down Expand Up @@ -226,8 +222,6 @@
<com.google.android.material.button.MaterialButton
android:id="@+id/btnCancel"
style="@style/SweetButtonStyle.BorderedOutlined"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="@{() -> fragment.dismiss()}"
android:text="@string/cancel"
android:textAllCaps="false" />
Expand All @@ -249,8 +243,6 @@
<com.google.android.material.button.MaterialButton
android:id="@+id/btnOk"
style="@style/SweetButtonStyle.BorderedOutlined"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/layout_padding_8dp"
android:onClick="@{() -> fragment.dismiss()}"
android:text="@string/ok"
Expand Down
3 changes: 2 additions & 1 deletion SweetUpdate/src/main/res/values/sweet_play_update_styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
</style>

<style name="SweetButtonStyle.BorderedOutlined" parent="Widget.MaterialComponents.Button.OutlinedButton">
<item name="android:layout_height">48dp</item>
<item name="android:layout_height">40dp</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:insetTop">0dp</item>
<item name="android:insetBottom">0dp</item>
<item name="android:textAppearance">@style/TextAppearance.MaterialComponents.Body1</item>
Expand Down

0 comments on commit f7de65c

Please sign in to comment.