Migrate CardView to MaterialCardView

This commit is contained in:
proletarius101 2021-05-18 01:08:26 +08:00 committed by Hans-Christoph Steiner
parent 03c16e3f1b
commit 2530487483
8 changed files with 20 additions and 35 deletions

View File

@ -1,13 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/details_activity_padding"
app:cardBackgroundColor="?attr/appDetailsCardBackground"
app:cardCornerRadius="3dp"
app:cardElevation="3dp"
android:animateLayoutChanges="true">
<LinearLayout
@ -262,4 +259,4 @@
android:text="@string/more" />
</LinearLayout>
</androidx.cardview.widget.CardView>
</com.google.android.material.card.MaterialCardView>

View File

@ -8,14 +8,12 @@
android:layout_height="match_parent"
android:fitsSystemWindows="true">
<androidx.cardview.widget.CardView
<com.google.android.material.card.MaterialCardView
android:id="@+id/search_card"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginLeft="16dp"
android:layout_marginStart="4dp"
android:layout_marginEnd="0dp"
android:layout_marginRight="0dp"
android:layout_marginTop="16dp"
android:layout_marginBottom="16dp"
app:layout_constraintEnd_toStartOf="@+id/sort"
@ -68,7 +66,7 @@
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
</com.google.android.material.card.MaterialCardView>
<ImageView
android:id="@+id/sort"

View File

@ -1,10 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:foreground="?attr/selectableItemBackground"
android:clickable="true"
android:focusable="true">
@ -52,4 +51,4 @@
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
</com.google.android.material.card.MaterialCardView>

View File

@ -1,10 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="220dp"
android:foreground="?attr/selectableItemBackground"
android:clickable="true"
android:focusable="true">
@ -58,4 +57,4 @@
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
</com.google.android.material.card.MaterialCardView>

View File

@ -1,10 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:foreground="?attr/selectableItemBackground"
android:clickable="true"
android:focusable="true">
@ -53,4 +52,4 @@
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
</com.google.android.material.card.MaterialCardView>

View File

@ -1,13 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/details_activity_padding"
app:cardBackgroundColor="?attr/appDetailsCardBackground"
app:cardCornerRadius="3dp"
app:cardElevation="3dp">
android:layout_margin="@dimen/details_activity_padding">
<LinearLayout
android:layout_width="fill_parent"
@ -32,4 +29,4 @@
app:columnCount="2" />
</LinearLayout>
</androidx.cardview.widget.CardView>
</com.google.android.material.card.MaterialCardView>

View File

@ -1,13 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/details_activity_padding"
app:cardBackgroundColor="?attr/appDetailsCardBackground"
app:cardCornerRadius="3dp"
app:cardElevation="3dp"
android:animateLayoutChanges="true">
<LinearLayout
@ -263,4 +260,4 @@
android:text="@string/more" />
</LinearLayout>
</androidx.cardview.widget.CardView>
</com.google.android.material.card.MaterialCardView>

View File

@ -1,12 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_margin="@dimen/details_screenshot_margin"
android:padding="10dp"
app:cardCornerRadius="0dp"
app:cardElevation="3dp">
android:padding="12dp"
app:cardCornerRadius="0dp">
<ImageView
android:id="@+id/image"
@ -16,4 +15,4 @@
android:minWidth="@dimen/details_screenshot_width"
android:scaleType="centerCrop" />
</androidx.cardview.widget.CardView>
</com.google.android.material.card.MaterialCardView>