Skip to content

Commit 7528ae1

Browse files
BrayanDSOdavid-allison
authored andcommitted
feat(whiteboard): use Material Card style
not my favorite background color, but at least it isn't completely white
1 parent 4cdcc8f commit 7528ae1

3 files changed

Lines changed: 9 additions & 12 deletions

File tree

AnkiDroid/src/main/res/layout/fragment_whiteboard.xml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
app:layout_constraintStart_toStartOf="parent"
1515
app:layout_constraintTop_toTopOf="parent"/>
1616

17-
<androidx.cardview.widget.CardView
17+
<com.google.android.material.card.MaterialCardView
1818
android:id="@+id/controls_container"
1919
android:layout_width="wrap_content"
2020
android:layout_height="wrap_content"
@@ -24,8 +24,7 @@
2424
app:layout_constraintEnd_toEndOf="parent"
2525
app:layout_constraintStart_toStartOf="parent"
2626
app:layout_constrainedWidth="true"
27-
app:cardElevation="@dimen/study_screen_elevation"
28-
app:cardCornerRadius="16dp"
27+
style="@style/CardView.ViewerStyle"
2928
android:clickable="true"
3029
android:focusable="true"
3130
app:rippleColor="@android:color/transparent">
@@ -122,5 +121,5 @@
122121
</FrameLayout>
123122
</LinearLayout>
124123

125-
</androidx.cardview.widget.CardView>
124+
</com.google.android.material.card.MaterialCardView>
126125
</androidx.constraintlayout.widget.ConstraintLayout>

AnkiDroid/src/main/res/layout/popup_brush_options.xml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
2+
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
33
xmlns:app="http://schemas.android.com/apk/res-auto"
44
xmlns:tools="http://schemas.android.com/tools"
55
android:layout_width="wrap_content"
66
android:layout_height="wrap_content"
7-
app:cardCornerRadius="8dp"
8-
app:cardElevation="@dimen/study_screen_elevation">
7+
style="@style/CardView.ViewerStyle">
98

109
<androidx.constraintlayout.widget.ConstraintLayout
1110
android:layout_width="wrap_content"
@@ -52,4 +51,4 @@
5251
app:iconTint="@null" />
5352

5453
</androidx.constraintlayout.widget.ConstraintLayout>
55-
</androidx.cardview.widget.CardView>
54+
</com.google.android.material.card.MaterialCardView>

AnkiDroid/src/main/res/layout/popup_eraser_options.xml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
2+
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
33
xmlns:app="http://schemas.android.com/apk/res-auto"
44
xmlns:tools="http://schemas.android.com/tools"
55
android:layout_width="360dp"
66
android:layout_height="wrap_content"
7-
app:cardCornerRadius="8dp"
8-
app:cardElevation="@dimen/study_screen_elevation">
7+
style="@style/CardView.ViewerStyle">
98

109
<androidx.constraintlayout.widget.ConstraintLayout
1110
android:layout_width="match_parent"
@@ -72,5 +71,5 @@
7271
app:thumbHeight="24dp"
7372
app:tickVisible="false" />
7473
</androidx.constraintlayout.widget.ConstraintLayout>
75-
</androidx.cardview.widget.CardView>
74+
</com.google.android.material.card.MaterialCardView>
7675

0 commit comments

Comments
 (0)