Skip to content

Commit

Permalink
Apply material 3 design
Browse files Browse the repository at this point in the history
  • Loading branch information
Quentin Marciset authored and quentinmarciset committed Sep 2, 2022
1 parent 9cc673a commit d861e3e
Showing 1 changed file with 18 additions and 30 deletions.
48 changes: 18 additions & 30 deletions android/app/src/main/res/layout/layout.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

<layout 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/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:ignore="DuplicateIds,HardcodedText">

Expand All @@ -14,7 +13,6 @@
<!-- Generated with detail form template named "Simple Header Detail" -->

<androidx.core.widget.NestedScrollView
style="@style/Theme.QMobileApp.Custom.Background.Alt4"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true">
Expand All @@ -30,12 +28,11 @@
android:layout_width="match_parent"
android:layout_height="wrap_content">

<androidx.cardview.widget.CardView
style="@style/Theme.QMobileApp.Card.Background.Alt3"
<com.google.android.material.card.MaterialCardView
style="?attr/materialCardViewElevatedStyle"
android:layout_width="0dp"
android:layout_height="280dp"
android:layout_height="wrap_content"
android:layout_marginBottom="12dp"
app:cardElevation="4dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand All @@ -44,9 +41,7 @@
<LinearLayout
android:id="@+id/headerview"
android:layout_width="match_parent"
android:layout_height="280dp"
android:layout_marginBottom="16dp"
android:elevation="4dp"
android:layout_height="wrap_content"
android:orientation="vertical">

<View
Expand All @@ -61,11 +56,10 @@
android:layout_marginStart="8dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="8dp"
android:elevation="4dp"
android:scrollbars="none"
android:text="___TEXT_1___"
android:textAlignment="center"
android:textAppearance="@style/TextAppearance.MaterialComponents.Headline5"
android:textAppearance="@style/TextAppearance.Material3.HeadlineSmall"
android:textColor="?colorOnSurface"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
Expand All @@ -79,10 +73,9 @@
android:layout_marginStart="8dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="8dp"
android:elevation="4dp"
android:scrollbars="none"
android:text="___FIELD_LABEL_2___"
android:textAppearance="@style/TextAppearance.MaterialComponents.Body1"
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
android:textColor="?colorPrimary"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
Expand All @@ -98,11 +91,10 @@
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:elevation="4dp"
android:paddingBottom="16dp"
android:scrollbars="none"
android:text="___TEXT_2___"
android:textAppearance="@style/TextAppearance.MaterialComponents.Body1"
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
android:textColor="?colorOnSurface"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand All @@ -115,10 +107,9 @@
android:layout_marginStart="8dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="8dp"
android:elevation="4dp"
android:scrollbars="none"
android:text="___FIELD_LABEL_3___"
android:textAppearance="@style/TextAppearance.MaterialComponents.Body1"
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
android:textColor="?colorPrimary"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
Expand All @@ -133,12 +124,10 @@
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:elevation="4dp"
android:paddingBottom="16dp"
android:layout_marginBottom="20dp"
android:scrollbars="none"
android:text="___TEXT_3___"
android:textAppearance="@style/TextAppearance.MaterialComponents.Body1"
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
android:textColor="?colorOnSurface"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand All @@ -147,20 +136,20 @@

</LinearLayout>

</androidx.cardview.widget.CardView>
</com.google.android.material.card.MaterialCardView>

</androidx.constraintlayout.widget.ConstraintLayout>

<!-- EVERYTHING BELOW WILL BE DUPLICATED FOR EACH FIELD YOU DROP AT THE BOTTOM OF THE
TEMPLATE IN THE PROJECT EDITOR -->

<!--FOR_EACH_FIELD-->
<androidx.cardview.widget.CardView
style="@style/Theme.QMobileApp.Card.Background.Alt3"
<com.google.android.material.card.MaterialCardView
style="?attr/materialCardViewElevatedStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginVertical="10dp">
android:layout_marginVertical="6dp">

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
Expand All @@ -177,7 +166,7 @@
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:text="___BUTTON___"
android:textAppearance="@style/TextAppearance.MaterialComponents.Button"
android:textAppearance="@style/TextAppearance.Material3.LabelLarge"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand All @@ -196,7 +185,7 @@
android:layout_marginEnd="12dp"
android:scrollbars="none"
android:text="___FIELD_LABEL___"
android:textAppearance="@style/TextAppearance.MaterialComponents.Body1"
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
android:textColor="?colorOnSurface"
android:textStyle="bold"
app:layout_constraintBottom_toTopOf="@+id/___VALUE_ID___"
Expand Down Expand Up @@ -232,8 +221,7 @@
android:scrollbars="none"
android:text="___TEXT___"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textAppearance="@style/TextAppearance.MaterialComponents.Body2"
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
android:textColor="?colorOnSurface"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
Expand All @@ -246,7 +234,7 @@

</androidx.constraintlayout.widget.ConstraintLayout>

</androidx.cardview.widget.CardView>
</com.google.android.material.card.MaterialCardView>

<!--END_FOR_EACH_FIELD-->
</LinearLayout>
Expand Down

0 comments on commit d861e3e

Please sign in to comment.