title: Rounded corners on linearlayout
body: <p>I have a linear layout with 2 text views that have different background colors. I want to make the whole view (linearlayout) with rounded corners. I tried enclosing it in MaterialCardview (as I was able to achieve that effect when I set the whole fragment layout inside) but for some reason it is not working. What do I need to do to achieve rounded corner on the view?</p>
  
  <pre><code>&lt;android.support.design.card.MaterialCardView
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_marginStart="24dp"
          android:layout_marginEnd="24dp"
          android:layout_marginBottom="8dp"
          app:cardCornerRadius="20dp"
          app:cardElevation="2dp"
          app:cardBackgroundColor="@color/Transparent"
          app:layout_constraintBottom_toBottomOf="parent"
          app:layout_constraintEnd_toEndOf="parent"
          app:layout_constraintStart_toStartOf="parent"&gt;
  
          &lt;LinearLayout
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:orientation="vertical"&gt;
  
              &lt;TextView
                  android:id="@+id/tutTitle"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:background="@color/tutorial_title"
                  android:text="Text 1"
                  android:paddingLeft="10dp"
                  android:paddingRight="10dp"
                  android:textColor="@color/White"
                  android:textSize="16sp" /&gt;
  
              &lt;TextView
                  android:id="@+id/tutBody"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:background="@color/tutorial_body"
                  android:padding="10dp"
                  android:drawableLeft="@drawable/image"
                  android:drawablePadding="10dp"
                  android:text="This is a hint"
                  android:textColor="@color/main_dark_grey"
                  android:textSize="16sp" /&gt;
          &lt;/LinearLayout&gt;
  
      &lt;/android.support.design.card.MaterialCardView&gt;
  </code></pre>
  
  <p>Note: I know some might suggest to use xml drawable with rounded background. This Won't work as the children background color will take over the transparency and will remain sharp edges</p>