title: Android background to fill in half of screen
body: <p>How do I get my Constraint Layout to display my Shape drawable like this:</p>
  
  <p><a href="https://i.stack.imgur.com/LtYI3.png" rel="nofollow noreferrer">This is my designed.</a></p>
  
  <p><a href="https://i.stack.imgur.com/Bxzfz.png" rel="nofollow noreferrer">And this is what i got.</a></p>
  
  <pre><code>&lt;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"
  tools:layout_editor_absoluteY="81dp"&gt;
  
  &lt;ScrollView
      android:id="@+id/scrollViewDashBoard"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      app:layout_constraintBottom_toBottomOf="parent"
      app:layout_constraintEnd_toEndOf="parent"
      app:layout_constraintHorizontal_bias="0.0"
      app:layout_constraintStart_toStartOf="parent"
      app:layout_constraintTop_toTopOf="parent"
      app:layout_constraintVertical_bias="0.0"&gt;
  
      &lt;android.support.constraint.ConstraintLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:background="@drawable/gradientbackground"&gt;
  
          &lt;ImageView
              android:id="@+id/iconProfile"
              android:layout_width="45dp"
              android:layout_height="45dp"
              android:layout_marginStart="24dp"
              android:layout_marginTop="16dp"
              android:src="@drawable/baseline_face_white_18dp"
              app:layout_constraintStart_toStartOf="parent"
              app:layout_constraintTop_toTopOf="parent" /&gt;
  
          &lt;TextView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_marginStart="8dp"
              android:layout_marginTop="16dp"
              android:layout_marginEnd="8dp"
              android:onClick="intentLogin"
              android:text="@string/label_dashboard_login"
              android:textColor="@color/colorFontWhite"
              app:layout_constraintEnd_toEndOf="parent"
              app:layout_constraintHorizontal_bias="0.082"
              app:layout_constraintStart_toEndOf="@+id/iconProfile"
              app:layout_constraintTop_toTopOf="parent" /&gt;
  
          &lt;android.support.constraint.ConstraintLayout
              android:id="@+id/constraintMenus"
              android:layout_width="340dp"
              android:layout_height="180dp"
              android:layout_marginStart="8dp"
              android:layout_marginTop="24dp"
              android:layout_marginEnd="8dp"
              android:background="@drawable/main_menu_radius"
              app:layout_constraintEnd_toEndOf="parent"
              app:layout_constraintHorizontal_bias="0.520"
              app:layout_constraintStart_toStartOf="parent"
              app:layout_constraintTop_toBottomOf="@+id/iconProfile"&gt;
  
              &lt;LinearLayout
                  android:layout_width="match_parent"
                  android:layout_height="match_parent"
                  android:orientation="vertical"&gt;
  
                  &lt;!--Row 1--&gt;
                  &lt;LinearLayout
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      android:orientation="horizontal"&gt;
  
                      &lt;!--Column 1--&gt;
                      &lt;android.support.v7.widget.CardView
                          android:layout_width="70dp"
                          android:layout_height="60dp"
                          android:layout_margin="16dp"
                          android:layout_weight="1"
                          android:elevation="8dp"
                          android:onClick="intentLocalExperience"
                          app:cardCornerRadius="8dp"&gt;
  
                          &lt;LinearLayout
                              android:layout_width="match_parent"
                              android:layout_height="match_parent"
                              android:orientation="vertical"&gt;
  
                              &lt;ImageView
                                  android:layout_width="45dp"
                                  android:layout_height="45dp"
                                  android:layout_gravity="center"
                                  android:background="@drawable/cerclebackgroundyellow"
                                  android:padding="5dp"
                                  android:src="@drawable/ic_motorcycle_black_24dp" /&gt;
  
                              &lt;TextView
                                  android:layout_width="wrap_content"
                                  android:layout_height="wrap_content"
                                  android:layout_gravity="center"
                                  android:text="@string/label_local_experience"
                                  android:textAlignment="center"
                                  android:textSize="10dp" /&gt;
  
                          &lt;/LinearLayout&gt;
                      &lt;/android.support.v7.widget.CardView&gt;
  
                      &lt;!--Column 2--&gt;
                      &lt;android.support.v7.widget.CardView
                          android:layout_width="70dp"
                          android:layout_height="60dp"
                          android:layout_margin="16dp"
                          android:layout_weight="1"
                          android:elevation="8dp"
                          android:onClick="intentFavoriteFood"
                          app:cardCornerRadius="8dp"&gt;
  
                          &lt;LinearLayout
                              android:layout_width="match_parent"
                              android:layout_height="match_parent"
                              android:orientation="vertical"&gt;
  
                              &lt;ImageView
                                  android:layout_width="45dp"
                                  android:layout_height="45dp"
                                  android:layout_gravity="center"
                                  android:background="@drawable/cerclebackgroundpurple"
                                  android:padding="5dp"
                                  android:src="@drawable/ic_restaurant_black_24dp" /&gt;
  
                              &lt;TextView
                                  android:layout_width="wrap_content"
                                  android:layout_height="wrap_content"
                                  android:layout_gravity="center"
                                  android:text="@string/label_favorite_food"
                                  android:textAlignment="center"
                                  android:textSize="10dp" /&gt;
  
                          &lt;/LinearLayout&gt;
                      &lt;/android.support.v7.widget.CardView&gt;
                      &lt;!--Column 3--&gt;
                      &lt;android.support.v7.widget.CardView
                          android:layout_width="70dp"
                          android:layout_height="60dp"
                          android:layout_margin="16dp"
                          android:layout_weight="1"
                          android:elevation="8dp"
                          app:cardCornerRadius="8dp"&gt;
  
                          &lt;LinearLayout
                              android:layout_width="match_parent"
                              android:layout_height="match_parent"
                              android:onClick="intentRecreation"
                              android:orientation="vertical"&gt;
  
                              &lt;ImageView
                                  android:layout_width="45dp"
                                  android:layout_height="45dp"
                                  android:layout_gravity="center"
                                  android:background="@drawable/cerclebackgroundred"
                                  android:padding="5dp"
                                  android:src="@drawable/ic_landscape_black_24dp" /&gt;
  
                              &lt;TextView
                                  android:layout_width="wrap_content"
                                  android:layout_height="wrap_content"
                                  android:layout_gravity="center"
                                  android:text="@string/label_recreation"
                                  android:textAlignment="center"
                                  android:textSize="10dp" /&gt;
  
                          &lt;/LinearLayout&gt;
                      &lt;/android.support.v7.widget.CardView&gt;
  
                  &lt;/LinearLayout&gt;
                  &lt;!--Row 2--&gt;
                  &lt;LinearLayout
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      android:orientation="horizontal"&gt;
  
                      &lt;!--Column 1--&gt;
                      &lt;android.support.v7.widget.CardView
                          android:layout_width="70dp"
                          android:layout_height="60dp"
                          android:layout_margin="16dp"
                          android:layout_weight="1"
                          android:elevation="8dp"
                          app:cardCornerRadius="8dp"&gt;
  
                          &lt;LinearLayout
                              android:layout_width="match_parent"
                              android:layout_height="match_parent"
                              android:orientation="vertical"&gt;
  
                              &lt;ImageView
                                  android:layout_width="45dp"
                                  android:layout_height="45dp"
                                  android:layout_gravity="center"
                                  android:src="@mipmap/ic_launcher_round" /&gt;
  
                              &lt;TextView
                                  android:layout_width="wrap_content"
                                  android:layout_height="wrap_content"
                                  android:layout_gravity="center"
                                  android:text="@string/label_travel_agency"
                                  android:textAlignment="center"
                                  android:textSize="10dp" /&gt;
  
                          &lt;/LinearLayout&gt;
                      &lt;/android.support.v7.widget.CardView&gt;
                      &lt;!--Column 2--&gt;
                      &lt;android.support.v7.widget.CardView
                          android:layout_width="70dp"
                          android:layout_height="60dp"
                          android:layout_margin="16dp"
                          android:layout_weight="1"
                          android:elevation="8dp"
                          app:cardCornerRadius="8dp"&gt;
  
                          &lt;LinearLayout
                              android:layout_width="match_parent"
                              android:layout_height="match_parent"
                              android:orientation="vertical"&gt;
  
                              &lt;ImageView
                                  android:layout_width="45dp"
                                  android:layout_height="45dp"
                                  android:layout_gravity="center"
                                  android:background="@drawable/cerclebackgroundgreen"
                                  android:padding="5dp"
                                  android:src="@drawable/ic_card_giftcard_black_24dp" /&gt;
  
                              &lt;TextView
                                  android:layout_width="wrap_content"
                                  android:layout_height="wrap_content"
                                  android:layout_gravity="center"
                                  android:text="@string/label_local_souvenir"
                                  android:textAlignment="center"
                                  android:textSize="10dp" /&gt;
  
                          &lt;/LinearLayout&gt;
                      &lt;/android.support.v7.widget.CardView&gt;
                      &lt;!--Column 3--&gt;
                      &lt;android.support.v7.widget.CardView
                          android:layout_width="70dp"
                          android:layout_height="60dp"
                          android:layout_margin="16dp"
                          android:layout_weight="1"
                          android:elevation="8dp"
                          app:cardCornerRadius="8dp"&gt;
  
                          &lt;LinearLayout
                              android:layout_width="match_parent"
                              android:layout_height="match_parent"
                              android:orientation="vertical"&gt;
  
                              &lt;ImageView
                                  android:layout_width="45dp"
                                  android:layout_height="45dp"
                                  android:layout_gravity="center"
                                  android:background="@drawable/cercle_background_bluegrey"
                                  android:padding="5dp"
                                  android:src="@drawable/ic_hotel_black_24dp" /&gt;
  
                              &lt;TextView
                                  android:layout_width="wrap_content"
                                  android:layout_height="wrap_content"
                                  android:layout_gravity="center"
                                  android:text="@string/label_guest_house"
                                  android:textAlignment="center"
                                  android:textSize="10dp" /&gt;
  
                          &lt;/LinearLayout&gt;
                      &lt;/android.support.v7.widget.CardView&gt;
  
                  &lt;/LinearLayout&gt;
  
              &lt;/LinearLayout&gt;
  
  
          &lt;/android.support.constraint.ConstraintLayout&gt;
  
      &lt;/android.support.constraint.ConstraintLayout&gt;
  
  &lt;/ScrollView&gt;
  </code></pre>
  
  <p></p>
  
  <p>I want the blue color to display in the position as shown in my designe. I was trying to create shape in @drawable/gradientbackground.xml file and set it as <code>ConstraintLayout</code> background, but the result that I received is shown in image 2. What should I do?</p>