I am trying to obtain something like this:
by using A RelativeLayout
with light grey (#EEEEEE
) and a LinearLayout
with a bit darker grey (`#9E9E9E), but despite the difference in color I am not obtaining a visible contrast...
My code:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://ift.tt/nIICcg"
android:layout_width="match_parent" android:layout_height="match_parent"
android:orientation="vertical" >
<!--android:background="@mipmap/background_poly"-->
<RelativeLayout android:id="@+id/account_det"
android:layout_width="match_parent" android:layout_height="wrap_content"
android:background="#EEEEEE">
<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/usrAvatar"
android:layout_width="90dp" android:layout_height="90dp"
android:src="@mipmap/aka"
android:layout_marginLeft="10dp"
android:layout_marginStart="10dp"
android:layout_marginTop="38dp" />
<TextView android:id="@+id/usrName"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="8dp" android:layout_marginStart="8dp"
android:layout_marginTop="2dp"
android:text="Cris"
android:textColor="#000000" android:textSize="14sp" android:textStyle="normal"
android:layout_toEndOf="@id/usrAvatar"
android:layout_toRightOf="@id/usrAvatar"
android:layout_alignTop="@id/usrAvatar" />
<!--android:layout_alignBaseline="@id/usrAvatar"-->
<TextView android:id="@+id/usrEmail"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:textColor="#000000"
android:textSize="16sp"
android:textStyle="normal"
android:text="nickname@email.com"
android:layout_alignLeft="@id/usrName"
android:layout_alignStart="@id/usrName"
android:layout_below="@id/usrName" />
</RelativeLayout>
<LinearLayout xmlns:android="http://ift.tt/nIICcg"
android:layout_width="match_parent" android:layout_height="match_parent"
android:background="#BDBDBD"
android:layout_below="@+id/account_det">
</LinearLayout>
</RelativeLayout>
The result:
enter image description here
How can I obtain the targeted design?
Aucun commentaire:
Enregistrer un commentaire