1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-02 23:12:57 +01:00

Upgrade remaining CardViews to MaterialCardView

This commit is contained in:
Arjan Schrijver 2023-08-01 20:48:34 +02:00 committed by Arjan Schrijver
parent fa20d04ff4
commit 73f949fc8c
11 changed files with 72 additions and 65 deletions

View File

@ -28,9 +28,10 @@ import android.widget.Switch;
import android.widget.TextView; import android.widget.TextView;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.cardview.widget.CardView;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
import com.google.android.material.card.MaterialCardView;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -124,7 +125,7 @@ public class GBAlarmListAdapter extends RecyclerView.Adapter<GBAlarmListAdapter.
static class ViewHolder extends RecyclerView.ViewHolder { static class ViewHolder extends RecyclerView.ViewHolder {
CardView container; MaterialCardView container;
TextView alarmTime; TextView alarmTime;
Switch isEnabled; Switch isEnabled;

View File

@ -24,9 +24,9 @@ import android.view.ViewGroup;
import android.widget.TextView; import android.widget.TextView;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.cardview.widget.CardView;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
import com.google.android.material.card.MaterialCardView;
import com.google.android.material.dialog.MaterialAlertDialogBuilder; import com.google.android.material.dialog.MaterialAlertDialogBuilder;
import java.util.ArrayList; import java.util.ArrayList;
@ -93,7 +93,7 @@ public class GBContactListAdapter extends RecyclerView.Adapter<GBContactListAdap
} }
static class ViewHolder extends RecyclerView.ViewHolder { static class ViewHolder extends RecyclerView.ViewHolder {
final CardView container; final MaterialCardView container;
final TextView contactName; final TextView contactName;
final TextView contactNumber; final TextView contactNumber;

View File

@ -60,7 +60,6 @@ import android.widget.Toast;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.annotation.RequiresApi; import androidx.annotation.RequiresApi;
import androidx.appcompat.app.AlertDialog; import androidx.appcompat.app.AlertDialog;
import androidx.cardview.widget.CardView;
import androidx.coordinatorlayout.widget.CoordinatorLayout; import androidx.coordinatorlayout.widget.CoordinatorLayout;
import androidx.localbroadcastmanager.content.LocalBroadcastManager; import androidx.localbroadcastmanager.content.LocalBroadcastManager;
import androidx.recyclerview.widget.DiffUtil; import androidx.recyclerview.widget.DiffUtil;
@ -73,6 +72,7 @@ import com.github.mikephil.charting.data.PieDataSet;
import com.github.mikephil.charting.data.PieEntry; import com.github.mikephil.charting.data.PieEntry;
import com.github.mikephil.charting.utils.MPPointF; import com.github.mikephil.charting.utils.MPPointF;
import com.google.android.flexbox.FlexboxLayout; import com.google.android.flexbox.FlexboxLayout;
import com.google.android.material.card.MaterialCardView;
import com.google.android.material.dialog.MaterialAlertDialogBuilder; import com.google.android.material.dialog.MaterialAlertDialogBuilder;
import com.google.android.material.snackbar.Snackbar; import com.google.android.material.snackbar.Snackbar;
import com.jaredrummler.android.colorpicker.ColorPickerDialog; import com.jaredrummler.android.colorpicker.ColorPickerDialog;
@ -1124,7 +1124,7 @@ public class GBDeviceAdapterv2 extends ListAdapter<GBDevice, GBDeviceAdapterv2.V
static class ViewHolder extends RecyclerView.ViewHolder { static class ViewHolder extends RecyclerView.ViewHolder {
View root; View root;
CardView container; MaterialCardView container;
ImageView deviceImageView; ImageView deviceImageView;
TextView deviceNameLabel; TextView deviceNameLabel;

View File

@ -25,9 +25,9 @@ import android.view.ViewGroup;
import android.widget.TextView; import android.widget.TextView;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.cardview.widget.CardView;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
import com.google.android.material.card.MaterialCardView;
import com.google.android.material.dialog.MaterialAlertDialogBuilder; import com.google.android.material.dialog.MaterialAlertDialogBuilder;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
@ -132,7 +132,7 @@ public class GBReminderListAdapter extends RecyclerView.Adapter<GBReminderListAd
} }
static class ViewHolder extends RecyclerView.ViewHolder { static class ViewHolder extends RecyclerView.ViewHolder {
final CardView container; final MaterialCardView container;
final TextView reminderTime; final TextView reminderTime;
final TextView reminderMessage; final TextView reminderMessage;

View File

@ -25,9 +25,9 @@ import android.view.ViewGroup;
import android.widget.TextView; import android.widget.TextView;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.cardview.widget.CardView;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
import com.google.android.material.card.MaterialCardView;
import com.google.android.material.dialog.MaterialAlertDialogBuilder; import com.google.android.material.dialog.MaterialAlertDialogBuilder;
import java.text.DateFormat; import java.text.DateFormat;
@ -113,7 +113,7 @@ public class GBWorldClockListAdapter extends RecyclerView.Adapter<GBWorldClockLi
} }
static class ViewHolder extends RecyclerView.ViewHolder { static class ViewHolder extends RecyclerView.ViewHolder {
final CardView container; final MaterialCardView container;
final TextView worldClockTimezone; final TextView worldClockTimezone;
final TextView worldClockLabel; final TextView worldClockLabel;

View File

@ -8,17 +8,17 @@
android:orientation="vertical" android:orientation="vertical"
tools:context="nodomain.freeyourgadget.gadgetbridge.activities.ContactDetails"> tools:context="nodomain.freeyourgadget.gadgetbridge.activities.ContactDetails">
<androidx.cardview.widget.CardView <com.google.android.material.card.MaterialCardView
android:id="@+id/card_contact_name" android:id="@+id/card_contact_name"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="8dp" android:layout_margin="8dp"
android:foreground="?android:attr/selectableItemBackground" android:foreground="?android:attr/selectableItemBackground"
app:cardBackgroundColor="?attr/cardview_background_color"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
card_view:cardCornerRadius="4dp" card_view:cardElevation="3dp"
card_view:cardElevation="4dp"
card_view:contentPadding="4dp"> card_view:contentPadding="4dp">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
@ -44,19 +44,19 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/label_contact_name" /> app:layout_constraintTop_toBottomOf="@id/label_contact_name" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView> </com.google.android.material.card.MaterialCardView>
<androidx.cardview.widget.CardView <com.google.android.material.card.MaterialCardView
android:id="@+id/card_contact_number" android:id="@+id/card_contact_number"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="8dp" android:layout_margin="8dp"
android:foreground="?android:attr/selectableItemBackground" android:foreground="?android:attr/selectableItemBackground"
app:cardBackgroundColor="?attr/cardview_background_color"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/card_contact_name" app:layout_constraintTop_toBottomOf="@id/card_contact_name"
card_view:cardCornerRadius="4dp" card_view:cardElevation="3dp"
card_view:cardElevation="4dp"
card_view:contentPadding="4dp"> card_view:contentPadding="4dp">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
@ -82,7 +82,7 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/label_contact_number" /> app:layout_constraintTop_toBottomOf="@id/label_contact_number" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView> </com.google.android.material.card.MaterialCardView>
<com.google.android.material.floatingactionbutton.FloatingActionButton <com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab_save" android:id="@+id/fab_save"

View File

@ -8,17 +8,17 @@
android:orientation="vertical" android:orientation="vertical"
tools:context="nodomain.freeyourgadget.gadgetbridge.activities.ReminderDetails"> tools:context="nodomain.freeyourgadget.gadgetbridge.activities.ReminderDetails">
<androidx.cardview.widget.CardView <com.google.android.material.card.MaterialCardView
android:id="@+id/card_repeat" android:id="@+id/card_repeat"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="8dp" android:layout_margin="8dp"
android:foreground="?android:attr/selectableItemBackground" android:foreground="?android:attr/selectableItemBackground"
app:cardBackgroundColor="?attr/cardview_background_color"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
card_view:cardCornerRadius="4dp" card_view:cardElevation="3dp"
card_view:cardElevation="4dp"
card_view:contentPadding="4dp"> card_view:contentPadding="4dp">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
@ -45,19 +45,19 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/label_repeat" /> app:layout_constraintTop_toBottomOf="@id/label_repeat" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView> </com.google.android.material.card.MaterialCardView>
<androidx.cardview.widget.CardView <com.google.android.material.card.MaterialCardView
android:id="@+id/card_date" android:id="@+id/card_date"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="8dp" android:layout_margin="8dp"
android:foreground="?android:attr/selectableItemBackground" android:foreground="?android:attr/selectableItemBackground"
app:cardBackgroundColor="?attr/cardview_background_color"
app:layout_constraintEnd_toStartOf="@id/card_time" app:layout_constraintEnd_toStartOf="@id/card_time"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/card_repeat" app:layout_constraintTop_toBottomOf="@id/card_repeat"
card_view:cardCornerRadius="4dp" card_view:cardElevation="3dp"
card_view:cardElevation="4dp"
card_view:contentPadding="4dp"> card_view:contentPadding="4dp">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
@ -84,19 +84,19 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/label_date" /> app:layout_constraintTop_toBottomOf="@id/label_date" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView> </com.google.android.material.card.MaterialCardView>
<androidx.cardview.widget.CardView <com.google.android.material.card.MaterialCardView
android:id="@+id/card_time" android:id="@+id/card_time"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="8dp" android:layout_margin="8dp"
android:foreground="?android:attr/selectableItemBackground" android:foreground="?android:attr/selectableItemBackground"
app:cardBackgroundColor="?attr/cardview_background_color"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/card_date" app:layout_constraintStart_toEndOf="@id/card_date"
app:layout_constraintTop_toBottomOf="@id/card_repeat" app:layout_constraintTop_toBottomOf="@id/card_repeat"
card_view:cardCornerRadius="4dp" card_view:cardElevation="3dp"
card_view:cardElevation="4dp"
card_view:contentPadding="4dp"> card_view:contentPadding="4dp">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
@ -123,19 +123,19 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/label_time" /> app:layout_constraintTop_toBottomOf="@id/label_time" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView> </com.google.android.material.card.MaterialCardView>
<androidx.cardview.widget.CardView <com.google.android.material.card.MaterialCardView
android:id="@+id/card_view4" android:id="@+id/card_view4"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="8dp" android:layout_margin="8dp"
android:foreground="?android:attr/selectableItemBackground" android:foreground="?android:attr/selectableItemBackground"
app:cardBackgroundColor="?attr/cardview_background_color"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/card_time" app:layout_constraintTop_toBottomOf="@id/card_time"
card_view:cardCornerRadius="4dp" card_view:cardElevation="3dp"
card_view:cardElevation="4dp"
card_view:contentPadding="4dp"> card_view:contentPadding="4dp">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
@ -161,7 +161,7 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/label_message" /> app:layout_constraintTop_toBottomOf="@id/label_message" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView> </com.google.android.material.card.MaterialCardView>
<com.google.android.material.floatingactionbutton.FloatingActionButton <com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab_save" android:id="@+id/fab_save"

View File

@ -8,17 +8,17 @@
android:orientation="vertical" android:orientation="vertical"
tools:context="nodomain.freeyourgadget.gadgetbridge.activities.WorldClockDetails"> tools:context="nodomain.freeyourgadget.gadgetbridge.activities.WorldClockDetails">
<androidx.cardview.widget.CardView <com.google.android.material.card.MaterialCardView
android:id="@+id/card_enabled" android:id="@+id/card_enabled"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="8dp" android:layout_margin="8dp"
android:foreground="?android:attr/selectableItemBackground" android:foreground="?android:attr/selectableItemBackground"
app:cardBackgroundColor="?attr/cardview_background_color"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
card_view:cardCornerRadius="4dp" card_view:cardElevation="3dp"
card_view:cardElevation="4dp"
card_view:contentPadding="4dp"> card_view:contentPadding="4dp">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
@ -32,19 +32,19 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:text="@string/function_enabled" /> android:text="@string/function_enabled" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView> </com.google.android.material.card.MaterialCardView>
<androidx.cardview.widget.CardView <com.google.android.material.card.MaterialCardView
android:id="@+id/card_timezone" android:id="@+id/card_timezone"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="8dp" android:layout_margin="8dp"
android:foreground="?android:attr/selectableItemBackground" android:foreground="?android:attr/selectableItemBackground"
app:cardBackgroundColor="?attr/cardview_background_color"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/card_enabled" app:layout_constraintTop_toBottomOf="@id/card_enabled"
card_view:cardCornerRadius="4dp" card_view:cardElevation="3dp"
card_view:cardElevation="4dp"
card_view:contentPadding="4dp"> card_view:contentPadding="4dp">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
@ -71,19 +71,19 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/label_timezone" /> app:layout_constraintTop_toBottomOf="@id/label_timezone" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView> </com.google.android.material.card.MaterialCardView>
<androidx.cardview.widget.CardView <com.google.android.material.card.MaterialCardView
android:id="@+id/card_label" android:id="@+id/card_label"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="8dp" android:layout_margin="8dp"
android:foreground="?android:attr/selectableItemBackground" android:foreground="?android:attr/selectableItemBackground"
app:cardBackgroundColor="?attr/cardview_background_color"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/card_timezone" app:layout_constraintTop_toBottomOf="@id/card_timezone"
card_view:cardCornerRadius="4dp" card_view:cardElevation="3dp"
card_view:cardElevation="4dp"
card_view:contentPadding="4dp"> card_view:contentPadding="4dp">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
@ -109,19 +109,19 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/label_message" /> app:layout_constraintTop_toBottomOf="@id/label_message" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView> </com.google.android.material.card.MaterialCardView>
<androidx.cardview.widget.CardView <com.google.android.material.card.MaterialCardView
android:id="@+id/card_code" android:id="@+id/card_code"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="8dp" android:layout_margin="8dp"
android:foreground="?android:attr/selectableItemBackground" android:foreground="?android:attr/selectableItemBackground"
app:cardBackgroundColor="?attr/cardview_background_color"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/card_label" app:layout_constraintTop_toBottomOf="@id/card_label"
card_view:cardCornerRadius="4dp" card_view:cardElevation="3dp"
card_view:cardElevation="4dp"
card_view:contentPadding="4dp"> card_view:contentPadding="4dp">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
@ -147,7 +147,7 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/label_code" /> app:layout_constraintTop_toBottomOf="@id/label_code" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView> </com.google.android.material.card.MaterialCardView>
<com.google.android.material.floatingactionbutton.FloatingActionButton <com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab_save" android:id="@+id/fab_save"

View File

@ -1,17 +1,19 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.coordinatorlayout.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:card_view="http://schemas.android.com/apk/res-auto" xmlns:card_view="http://schemas.android.com/apk/res-auto"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<androidx.cardview.widget.CardView <com.google.android.material.card.MaterialCardView
android:id="@+id/card_contact" android:id="@+id/card_contact"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="8dp" android:layout_margin="8dp"
android:foreground="?android:attr/selectableItemBackground" android:foreground="?android:attr/selectableItemBackground"
card_view:cardCornerRadius="4dp" app:cardBackgroundColor="?attr/cardview_background_color"
card_view:cardElevation="4dp" card_view:cardElevation="3dp"
card_view:contentPadding="4dp"> card_view:contentPadding="4dp">
<RelativeLayout <RelativeLayout
@ -46,6 +48,6 @@
android:textAppearance="?android:attr/textAppearanceSmall" /> android:textAppearance="?android:attr/textAppearanceSmall" />
</RelativeLayout> </RelativeLayout>
</androidx.cardview.widget.CardView> </com.google.android.material.card.MaterialCardView>
</androidx.coordinatorlayout.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>

View File

@ -1,17 +1,19 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.coordinatorlayout.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:card_view="http://schemas.android.com/apk/res-auto" xmlns:card_view="http://schemas.android.com/apk/res-auto"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<androidx.cardview.widget.CardView <com.google.android.material.card.MaterialCardView
android:id="@+id/card_view" android:id="@+id/card_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="8dp" android:layout_margin="8dp"
android:foreground="?android:attr/selectableItemBackground" android:foreground="?android:attr/selectableItemBackground"
card_view:cardCornerRadius="4dp" app:cardBackgroundColor="?attr/cardview_background_color"
card_view:cardElevation="4dp" card_view:cardElevation="3dp"
card_view:contentPadding="4dp"> card_view:contentPadding="4dp">
<RelativeLayout <RelativeLayout
@ -46,6 +48,6 @@
android:textAppearance="?android:attr/textAppearanceLarge" /> android:textAppearance="?android:attr/textAppearanceLarge" />
</RelativeLayout> </RelativeLayout>
</androidx.cardview.widget.CardView> </com.google.android.material.card.MaterialCardView>
</androidx.coordinatorlayout.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>

View File

@ -1,17 +1,19 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.coordinatorlayout.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:card_view="http://schemas.android.com/apk/res-auto" xmlns:card_view="http://schemas.android.com/apk/res-auto"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<androidx.cardview.widget.CardView <com.google.android.material.card.MaterialCardView
android:id="@+id/card_view" android:id="@+id/card_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="8dp" android:layout_margin="8dp"
android:foreground="?android:attr/selectableItemBackground" android:foreground="?android:attr/selectableItemBackground"
card_view:cardCornerRadius="4dp" app:cardBackgroundColor="?attr/cardview_background_color"
card_view:cardElevation="4dp" card_view:cardElevation="3dp"
card_view:contentPadding="4dp"> card_view:contentPadding="4dp">
<RelativeLayout <RelativeLayout
@ -59,6 +61,6 @@
card_view:tint="@color/secondarytext" /> card_view:tint="@color/secondarytext" />
</RelativeLayout> </RelativeLayout>
</androidx.cardview.widget.CardView> </com.google.android.material.card.MaterialCardView>
</androidx.coordinatorlayout.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>