Materialcardview

This commit is contained in:
osodebailar 2022-04-15 11:47:29 +02:00
parent 1ba67d9f7e
commit ad1a4dddc3
17 changed files with 142 additions and 89 deletions

View file

@ -1,13 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
<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:card_view="http://schemas.android.com/tools"
style="@style/Widget.MaterialComponents.CardView"
android:id="@+id/bg_card"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
card_view:cardElevation="0dp"
card_view:cardBackgroundColor="?attr/cardItemBackgroundColor"
card_view:cardUseCompatPadding="true">
android:layout_marginStart="4dp"
app:cardCornerRadius="4dp"
app:contentPadding="2dp"
app:cardElevation="4dp"
android:layout_gravity="center">
<LinearLayout
android:layout_width="match_parent"
@ -83,4 +87,4 @@
</LinearLayout>
</androidx.cardview.widget.CardView>
</com.google.android.material.card.MaterialCardView>

View file

@ -1,11 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
<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"
style="@style/Widget.MaterialComponents.CardView"
android:id="@+id/food_card"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
card_view:cardBackgroundColor="?attr/cardItemBackgroundColor">
android:layout_marginStart="4dp"
android:layout_marginEnd="4dp"
android:layout_marginTop="4dp"
app:strokeWidth="1dp"
app:cardCornerRadius="4dp"
app:contentPadding="2dp"
app:cardElevation="4dp"
app:cardUseCompatPadding="true"
android:layout_gravity="center">
<LinearLayout
android:id="@+id/food_item"
@ -137,4 +147,4 @@
</LinearLayout>
</androidx.cardview.widget.CardView>
</com.google.android.material.card.MaterialCardView>

View file

@ -1,18 +1,20 @@
<?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"
style="@style/Widget.MaterialComponents.CardView"
android:id="@+id/obj_card"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="16dp"
android:layout_marginTop="16dp"
android:layout_marginRight="16dp"
app:cardBackgroundColor="?attr/objectivescardItemBackgroundColor"
app:cardCornerRadius="2dp"
app:cardElevation="8dp"
app:cardCornerRadius="4dp"
app:cardElevation="4dp"
app:cardUseCompatPadding="true"
app:contentPadding="16dp">
app:contentPadding="16dp"
android:layout_gravity="center">
<LinearLayout
android:layout_width="match_parent"
@ -127,4 +129,4 @@
</LinearLayout>
</androidx.cardview.widget.CardView>
</com.google.android.material.card.MaterialCardView>

View file

@ -1,14 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
<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"
style="@style/Widget.MaterialComponents.CardView"
android:id="@+id/cv"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="1dp"
card_view:cardBackgroundColor="?attr/notificationUrgent"
card_view:cardCornerRadius="6dp">
app:cardCornerRadius="4dp"
app:contentPadding="2dp"
android:layout_gravity="center"
app:cardBackgroundColor="?attr/notificationUrgent">
<LinearLayout
android:layout_width="match_parent"
@ -38,4 +41,4 @@
</LinearLayout>
</androidx.cardview.widget.CardView>
</com.google.android.material.card.MaterialCardView>

View file

@ -1,15 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
<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:card_view="http://schemas.android.com/tools"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/cardview"
style="@style/Widget.MaterialComponents.CardView"
android:id="@+id/card"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
card_view:cardBackgroundColor="?attr/cardItemBackgroundColor"
card_view:cardCornerRadius="6dp"
card_view:cardUseCompatPadding="true"
card_view:contentPadding="6dp">
android:layout_marginStart="4dp"
app:cardCornerRadius="4dp"
app:contentPadding="2dp"
app:cardElevation="4dp"
app:cardUseCompatPadding="true"
android:layout_gravity="center">
<LinearLayout
android:layout_width="match_parent"
@ -27,7 +31,7 @@
android:adjustViewBounds="false"
android:cropToPadding="false"
android:scaleType="fitStart"
card_view:srcCompat="@drawable/ic_quick_wizard" />
app:srcCompat="@drawable/ic_quick_wizard" />
<LinearLayout
android:layout_width="match_parent"
@ -77,7 +81,7 @@
android:adjustViewBounds="false"
android:cropToPadding="false"
android:scaleType="fitStart"
card_view:srcCompat="@drawable/ic_smartphone"
app:srcCompat="@drawable/ic_smartphone"
tools:ignore="RtlSymmetry" />
<ImageView
@ -87,7 +91,7 @@
android:adjustViewBounds="false"
android:cropToPadding="false"
android:scaleType="fitStart"
card_view:srcCompat="@drawable/ic_reorder_gray_24dp" />
app:srcCompat="@drawable/ic_reorder_gray_24dp" />
<CheckBox
android:id="@+id/cb_remove"
@ -149,4 +153,4 @@
</LinearLayout>
</androidx.cardview.widget.CardView>
</com.google.android.material.card.MaterialCardView>

View file

@ -1,11 +1,16 @@
<?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"
style="@style/Widget.MaterialComponents.CardView"
android:id="@+id/boluscarbs_card"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
app:cardBackgroundColor="?attr/colorSurface">
android:layout_marginStart="4dp"
app:cardCornerRadius="4dp"
app:contentPadding="2dp"
android:layout_gravity="center">
<LinearLayout
android:layout_width="match_parent"
@ -273,4 +278,4 @@
</LinearLayout>
</androidx.cardview.widget.CardView>
</com.google.android.material.card.MaterialCardView>

View file

@ -1,11 +1,16 @@
<?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"
style="@style/Widget.MaterialComponents.CardView"
android:id="@+id/careportal_card"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
app:cardBackgroundColor="?attr/colorSurface">
android:layout_marginStart="4dp"
app:cardCornerRadius="4dp"
app:contentPadding="2dp"
android:layout_gravity="center">
<LinearLayout
android:layout_width="match_parent"
@ -131,4 +136,4 @@
</LinearLayout>
</androidx.cardview.widget.CardView>
</com.google.android.material.card.MaterialCardView>

View file

@ -1,11 +1,16 @@
<?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"
style="@style/Widget.MaterialComponents.CardView"
android:id="@+id/extended_bolus_card"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
app:cardBackgroundColor="?attr/colorSurface">
android:layout_marginStart="4dp"
app:cardCornerRadius="4dp"
app:contentPadding="2dp"
android:layout_gravity="center">
<LinearLayout
android:layout_width="match_parent"
@ -176,4 +181,4 @@
</LinearLayout>
</androidx.cardview.widget.CardView>
</com.google.android.material.card.MaterialCardView>

View file

@ -1,11 +1,16 @@
<?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"
style="@style/Widget.MaterialComponents.CardView"
android:id="@+id/profilswitch_card"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
app:cardBackgroundColor="?attr/colorSurface">
android:layout_marginStart="4dp"
app:cardCornerRadius="4dp"
app:contentPadding="2dp"
android:layout_gravity="center">
<LinearLayout
android:layout_width="match_parent"
@ -144,4 +149,4 @@
</LinearLayout>
</androidx.cardview.widget.CardView>
</com.google.android.material.card.MaterialCardView>

View file

@ -1,11 +1,16 @@
<?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"
style="@style/Widget.MaterialComponents.CardView"
android:id="@+id/tempbasal_card"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
app:cardBackgroundColor="?attr/colorSurface">
android:layout_marginStart="4dp"
app:cardCornerRadius="4dp"
app:contentPadding="2dp"
android:layout_gravity="center">
<LinearLayout
android:layout_width="match_parent"
@ -194,4 +199,4 @@
</LinearLayout>
</androidx.cardview.widget.CardView>
</com.google.android.material.card.MaterialCardView>

View file

@ -1,11 +1,16 @@
<?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"
style="@style/Widget.MaterialComponents.CardView"
android:id="@+id/temptarget_card"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
app:cardBackgroundColor="?attr/colorSurface">
android:layout_marginStart="4dp"
app:cardCornerRadius="4dp"
app:contentPadding="2dp"
android:layout_gravity="center">
<LinearLayout
android:layout_width="match_parent"
@ -166,4 +171,4 @@
</LinearLayout>
</androidx.cardview.widget.CardView>
</com.google.android.material.card.MaterialCardView>

View file

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.card.MaterialCardView 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:id="@+id/careportal_cardview"
@ -9,11 +10,9 @@
android:layout_marginStart="4dp"
android:layout_marginEnd="4dp"
android:layout_marginTop="4dp"
app:strokeColor="?attr/strokeColor"
app:strokeWidth="2dp"
app:cardCornerRadius="3dp"
app:cardCornerRadius="4dp"
app:contentPadding="2dp"
app:cardElevation="2dp"
app:cardElevation="4dp"
app:cardUseCompatPadding="false"
android:layout_gravity="center">

View file

@ -47,8 +47,6 @@
<item name="alarmColor">@color/alarm</item>
<!-- BG source temp button -->
<item name="setTempButton">@color/colorSetTempButton</item>
<!-- Card Item-->
<item name="cardItemBackgroundColor">@color/cardColorBackground</item>
<!-- Exercise -->
<item name="exerciseColor">@color/exercise</item>
<!-- Stats -->
@ -76,7 +74,6 @@
<!-- Pump -->
<item name="pumpStatusBackground">@color/pumpStatusBackground</item>
<!-- Objectives -->
<item name="objectivescardItemBackgroundColor">?attr/cardItemBackgroundColor</item>
<item name="objectivesBackgroundColor">@color/objectivesBackground</item>
<item name="objectivesDisabledTextColor">@color/colorObjectivesDisabledText</item>
<!---Import List -->

View file

@ -9,8 +9,6 @@
<attr name="alarmColor" format="reference|color" />
<!-- BG source temp button -->
<attr name="setTempButton" format="reference|color" />
<!-- Card Item-->
<attr name="cardItemBackgroundColor" format="reference|color" />
<!-- Carbs -->
<attr name="carbsColor" format="reference|color" />
<!-- Exercise -->
@ -43,7 +41,6 @@
<!-- Pump -->
<attr name="pumpStatusBackground" format="reference|color" />
<!-- Objectives -->
<attr name="objectivescardItemBackgroundColor" format="reference|color" />
<attr name="objectivesBackgroundColor" format="reference|color" />
<attr name="objectivesDisabledTextColor" format="reference|color" />
<!---Import List -->

View file

@ -52,8 +52,6 @@
<item name="alarmColor">@color/alarm</item>
<!-- BG source temp button -->
<item name="setTempButton">@color/colorSetTempButton</item>
<!-- Card Item-->
<item name="cardItemBackgroundColor">?attr/colorSurface</item>
<!-- Exercise -->
<item name="exerciseColor">@color/exercise</item>
<!-- Stats -->
@ -81,7 +79,6 @@
<!-- Pump -->
<item name="pumpStatusBackground">@color/pumpStatusBackground</item>
<!-- Objectives -->
<item name="objectivescardItemBackgroundColor">@color/midgray</item>
<item name="objectivesBackgroundColor">@color/objectivesBackground</item>
<item name="objectivesDisabledTextColor">@color/colorObjectivesDisabledText</item>
<!---Import List -->

View file

@ -1,11 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
<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"
style="@style/Widget.MaterialComponents.CardView"
android:id="@+id/history_card"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
card_view:cardBackgroundColor="?android:colorBackground">
android:layout_marginStart="4dp"
app:cardCornerRadius="4dp"
app:contentPadding="2dp"
app:cardElevation="4dp"
app:cardUseCompatPadding="true"
android:layout_gravity="center">
<LinearLayout
@ -107,4 +114,4 @@
</LinearLayout>
</androidx.cardview.widget.CardView>
</com.google.android.material.card.MaterialCardView>

View file

@ -1,14 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:id="@+id/danar_history_cardview"
<com.google.android.material.card.MaterialCardView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
style="@style/Widget.MaterialComponents.CardView"
android:id="@+id/danar_history_card"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
card_view:cardBackgroundColor="?attr/cardItemBackgroundColor"
card_view:cardCornerRadius="6dp"
card_view:cardUseCompatPadding="true"
card_view:contentPadding="6dp">
android:layout_marginStart="4dp"
app:cardCornerRadius="4dp"
app:contentPadding="2dp"
app:cardElevation="4dp"
app:cardUseCompatPadding="true"
android:layout_gravity="center">
<LinearLayout
@ -87,4 +90,4 @@
</LinearLayout>
</androidx.cardview.widget.CardView>
</com.google.android.material.card.MaterialCardView>