I have a RelativeLayout below android.support.v7.widget.Toolbar . Both of them have the same color. How can I get rid of a divorce between them?
Here is the xml code:
<android.support.v7.widget.Toolbar android:id="@+id/toolbar" android:layout_height="wrap_content" android:layout_width="match_parent" android:background="@color/HomeColorPrimary" android:minHeight="?attr/actionBarSize" app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" app:popupTheme="@style/ThemeOverlay.AppCompat.Light"> </android.support.v7.widget.Toolbar> <RelativeLayout android:layout_below="@+id/toolbar" android:layout_width="match_parent" android:layout_height="120dp" android:id="@+id/spaceBelowToolbar" android:background="@color/HomeColorPrimary" android:orientation="vertical" android:elevation="4dp"> </RelativeLayout>
Here is the full xml file:
<RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/mainBody" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:fab="http://schemas.android.com/tools" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/MainBG"> <android.support.v7.widget.Toolbar android:id="@+id/toolbar" android:layout_height="wrap_content" android:layout_width="match_parent" android:background="@color/HomeColorPrimary" android:minHeight="?attr/actionBarSize" app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" app:popupTheme="@style/ThemeOverlay.AppCompat.Light"> </android.support.v7.widget.Toolbar> <RelativeLayout android:layout_below="@+id/toolbar" android:layout_width="match_parent" android:layout_height="120dp" android:id="@+id/spaceBelowToolbar" android:background="@color/HomeColorPrimary" android:orientation="vertical" android:elevation="4dp"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="42dp" android:layout_alignParentLeft="true" android:id="@+id/MoneyValue" android:textColor="@color/md_white_1000" android:textSize="45sp" android:text="$850"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/MoneyValue" android:id="@+id/Balance" android:layout_marginLeft="42dp" android:textSize="25sp" android:textColor="@color/md_grey_300" android:text="BALANCE"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="180dp" android:id="@+id/PercentageValue" android:textColor="@color/md_white_1000" android:textSize="45sp" android:text="93%"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/PercentageValue" android:textColor="@color/md_grey_300" android:id="@+id/Budget" android:layout_marginLeft="180dp" android:textSize="25sp" android:text="BUDGET"/> </RelativeLayout> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/listViewLayout" android:layout_below="@+id/spaceBelowToolbar" > <ExpandableListView android:id="@+id/list" android:layout_width="match_parent" android:layout_height="match_parent" /> </RelativeLayout> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="20dp"> <com.github.clans.fab.FloatingActionMenu android:id="@+id/fab" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_alignParentRight="true" android:layout_marginRight="15dp" android:layout_marginBottom="30dp" android:layout_marginLeft="10dp" android:layout_marginTop="10dp" fab:menu_labels_style="@style/MenuLabelsStyle" fab:menu_labels_showAnimation="@anim/jump_from_down" fab:menu_labels_hideAnimation="@anim/jump_to_down" fab:menu_animationDelayPerItem="0" fab:menu_shadowColor="#444" fab:menu_colorNormal="#FFB805" fab:menu_colorPressed="#F2AB00" fab:menu_colorRipple="#D99200"> </com.github.clans.fab.FloatingActionMenu> </RelativeLayout> </RelativeLayout> </RelativeLayout>
source share