geofot96/StudyBuddy

View on GitHub
app/src/main/res/layout/course_card.xml

Summary

Maintainability
Test Coverage
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_margin="5dp"

    app:cardBackgroundColor="@android:color/white"
    app:cardCornerRadius="2dp"
    app:cardElevation="2dp">

    <!-- Les CardView possèdent des attributs supplémentaires dont
         - cardBackgroundColor
         - cardElevation pour l'élévation (donc aussi l'ombre)
         - cardCornerRadius pour arrondir les angles
     -->

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical">

        <TextView
            android:id="@+id/text"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="?android:selectableItemBackground"
            android:padding="20dp"
            tools:text="Paris"
            android:fontFamily="sans-serif"
            android:textColor="#333"
            android:textSize="18sp" />
    </LinearLayout>

</android.support.v7.widget.CardView>