Skip to content

Commit c8927e2

Browse files
committed
Add proper ripple animation
1 parent 15f7b0e commit c8927e2

File tree

3 files changed

+14
-8
lines changed

3 files changed

+14
-8
lines changed

app/src/main/java/org/wikipedia/donate/DonorHistoryActivity.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,14 @@ class DonorHistoryActivity : BaseActivity() {
6666
}
6767

6868
updateLastDonatedText()
69-
binding.lastDonationLabel.setOnClickListener {
69+
binding.lastDonationContainer.setOnClickListener {
7070
showLastDonatedDatePicker()
7171
}
7272

7373
binding.recurringDonorCheckbox.isChecked = viewModel.isRecurringDonor
74-
binding.recurringDonorCheckbox.setOnCheckedChangeListener { _, isChecked ->
75-
viewModel.isRecurringDonor = isChecked
74+
binding.recurringDonorContainer.setOnClickListener {
75+
viewModel.isRecurringDonor = !binding.recurringDonorCheckbox.isChecked
76+
binding.recurringDonorCheckbox.isChecked = viewModel.isRecurringDonor
7677
}
7778

7879
binding.donateButton.isVisible = Prefs.hasDonorHistorySaved

app/src/main/res/layout/activity_donor_history.xml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
android:drawablePadding="16dp"
3434
android:paddingVertical="16dp"
3535
android:layout_marginHorizontal="16dp"
36+
android:background="?android:selectableItemBackground"
3637
app:drawableStartCompat="@drawable/donor_icon"
3738
app:drawableTint="?attr/secondary_color" />
3839

@@ -43,10 +44,12 @@
4344
android:orientation="vertical">
4445

4546
<LinearLayout
47+
android:id="@+id/lastDonationContainer"
4648
android:layout_width="match_parent"
4749
android:layout_height="wrap_content"
4850
android:orientation="horizontal"
49-
android:layout_marginHorizontal="16dp">
51+
android:layout_marginHorizontal="16dp"
52+
android:background="?android:selectableItemBackground">
5053

5154
<TextView
5255
android:id="@+id/lastDonationLabel"
@@ -58,8 +61,8 @@
5861
android:textColor="?attr/primary_color"
5962
android:drawablePadding="16dp"
6063
android:paddingVertical="16dp"
61-
app:drawableStartCompat="@drawable/donor_icon"
62-
app:drawableTint="?attr/paper_color"/>
64+
app:drawableStartCompat="@drawable/outline_repeat_24"
65+
app:drawableTint="@android:color/transparent"/>
6366

6467
<TextView
6568
android:id="@+id/lastDonationDate"
@@ -78,10 +81,12 @@
7881
android:layout_marginVertical="12dp"/>
7982

8083
<LinearLayout
84+
android:id="@+id/recurringDonorContainer"
8185
android:layout_width="match_parent"
8286
android:layout_height="wrap_content"
8387
android:orientation="horizontal"
84-
android:layout_marginStart="16dp">
88+
android:layout_marginStart="16dp"
89+
android:background="?android:selectableItemBackground">
8590

8691
<TextView
8792
android:id="@+id/recurringDonorLabel"

app/src/main/res/values/styles.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@
425425
<item name="iconTint">?attr/placeholder_color</item>
426426
</style>
427427

428-
<style name="App.Button.Text.Outline">
428+
<style name="App.Button.Text.Outline" parent="Widget.Material3.Button.OutlinedButton">
429429
<item name="android:textColor">?attr/progressive_color</item>
430430
<item name="iconTint">?attr/inactive_color</item>
431431
<item name="cornerRadius">8dp</item>

0 commit comments

Comments
 (0)