With normal background:
SwitchingtoanothercolordisplaysalinebelowtheTextView:
xml:
<RelativeLayoutxmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#000"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
tools:context=".MainActivity">
<android.support.v7.widget.CardView
card_view:cardBackgroundColor="#18d018"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
card_view:cardCornerRadius="4dp">
<LinearLayout
android:padding="5dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:textSize="17sp"
android:textStyle="bold"
android:textColor="#fff"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="3"
android:lines="1"
android:ellipsize="end"
android:gravity="center"
android:text="Titulo de exemplo"/>
</LinearLayout>
</android.support.v7.widget.CardView>
</RelativeLayout>