Step 3: Solution
This is the solution of the previous step
activity_main.xml
activity_main.xml<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout 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="match_parent"
tools:context=".MainActivity"
android:background="@color/colorBgDark">
<android.support.v7.widget.CardView
android:id="@+id/cardview"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="16dp"
app:cardBackgroundColor="@color/cardview_light_background"
app:cardCornerRadius="8dp"
app:cardElevation="2dp"
app:contentPadding="16dp"
app:layout_constraintBottom_toBottomOf="@id/second_bg"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/guideline_horizontal30"
app:layout_constraintVertical_bias="0.0" >
</android.support.v7.widget.CardView>
<View
android:id="@+id/second_bg"
android:layout_width="match_parent"
android:layout_height="0dp"
android:background="@color/colorBg"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/guideline_horizontal38" />
<!-- Guidelines -->
... ... ...
</android.support.constraint.ConstraintLayout>Last updated