I have an twoLinearLayout
inside the RelativeLayout
. I just want to do this LinearLayout inside the one LinearLayout so that my child control will display inside 1 LinearLayout. so that I can make group of this LinearLayout and display
with differnt background color android:background="@drawable/my_custom_background
so that all child control coupled into it.
see the below screen shot
code
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="#0B95BA"
android:minWidth="25px"
android:minHeight="25px">
<LinearLayout
android:id="@+id/linearLayoutCont"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="5dp">
<TextView
android:id="@+id/txtViewCont"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="Contact Billing"
android:gravity="center"
android:textSize="25sp"
android:textColor="#FFFFFF" />
</LinearLayout>
<LinearLayout
android:id="@+id/linearLayoutContBillingCall"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_below="@id/linearLayoutCont"
android:layout_marginTop="5dp">
<Button
android:text="Call"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:textSize="15sp"
android:textColor="#FFFFFF"
android:layout_gravity="right"
android:background="@drawable/ButtonStyle"
android:id="@+id/btnContCall"
android:drawableLeft="@drawable/PhoneCall" />
<Button
android:text="Email"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:textSize="15sp"
android:textColor="#FFFFFF"
android:layout_gravity="right"
android:background="@drawable/ButtonStyle"
android:id="@+id/btnEmail"
android:drawableLeft="@drawable/Email" />
</LinearLayout>
</RelativeLayout>
and o/p should be above pic like Contact at center and two button (Call and Email) are below the contact same corner. also one thing I want to ask how I can create a space between these two buttons.