I'm trying to make a listView with progress bar exactly like the image below
I'm use android:layout_toRightOf to display the progressBar beside the Pro-XXX-XXX, but it display below the text .
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView android:id="#+id/ListProject"
android:textStyle="bold"
android:textColor="#color/black"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<ProgressBar
android:id="#+id/downloadProgressBar"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="#+id/ListProject" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#color/blue"
android:id="#+id/ListTimeIn"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#color/blue"
android:layout_toLeftOf="#+id/ListTimeIn"
android:id="#+id/ListTimeOut"/>
<TextView android:id="#+id/ListDescription"
android:layout_width="wrap_content"
android:textColor="#color/blue"
android:layout_height="wrap_content"/>
</LinearLayout>
Change to RelativeLayout
#Chintan answer
You need to use the tools provided with the Relative Layout.
Your ProgressBar needs to be "toRightOf" as well as "toEndOf" the TextView:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="10dp">
<TextView
android:id="#+id/ListProject"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingEnd="20dp"
android:paddingRight="20dp"
android:text="Test"
android:textColor="#color/black"
android:textStyle="bold"/>
<ProgressBar
android:id="#+id/downloadProgressBar"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toEndOf="#id/ListProject"
android:layout_toRightOf="#+id/ListProject"/>
</RelativeLayout>
<TextView
android:id="#+id/ListTimeIn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Test"/>
<TextView
android:id="#+id/ListTimeOut"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="test"/>
<TextView
android:id="#+id/ListDescription"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="test"/>
</LinearLayout>
I have just tested this xml, and it works perfectly well.
put following code
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="#+id/ListProject"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="HProxx -cxcscdc"
android:layout_alignParentLeft="true"
android:layout_toLeftOf="#+id/downloadProgressBar"
android:textColor="#color/black"
android:textStyle="bold" />
<ProgressBar
android:id="#+id/downloadProgressBar"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
/>
</RelativeLayout>
<TextView
android:id="#+id/ListTimeIn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="HProxx -cxcscdc"
android:textColor="#CADFFF" />
<TextView
android:id="#+id/ListTimeOut"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toLeftOf="#+id/ListTimeIn"
android:text="HProxx -cxcscdc"
android:textColor="#CADFFF" />
<TextView
android:id="#+id/ListDescription"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="HProxx -cxcscdc"
android:textColor="#CADFFF" />
</LinearLayout>
Replace your xml with xml below.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="#+id/ListProject"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:lines="2"
android:textColor="#color/black"
android:textStyle="bold" />
<ProgressBar
android:id="#+id/downloadProgressBar"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
<TextView
android:id="#+id/ListTimeIn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#color/blue" />
<TextView
android:id="#+id/ListTimeOut"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toLeftOf="#+id/ListTimeIn"
android:textColor="#color/blue" />
<TextView
android:id="#+id/ListDescription"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#color/blue" />
</LinearLayout>
Let me know if this works for you.
Related
I have below layout file. I need to show a Progressbar in the layout.Currently Progressbar is taking up blank space in the middle so it devided my top and bottom view while showing the bar but I am trying to show the progressbar as an overlay over the layout so it will not take up any space. How Can I achieve this
This is the layout file currently I have
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:orientation="horizontal">
<ImageView
android:id="#+id/imgLeftArrow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/left_arrow2"></ImageView>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:gravity="center_horizontal">
<ImageView
android:id="#+id/imgGreendot"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/green_dot"></ImageView>
<TextView
android:id="#+id/tvStatus"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
></TextView>
</LinearLayout>
<ImageView
android:id="#+id/imgBid"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
></ImageView>
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:gravity="center_horizontal"
android:orientation="horizontal">
<TextView
android:id="#+id/tvExpected"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
></TextView>
<TextView
android:id="#+id/tvTotalBid"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Total Bids | "
android:textColor="#a9a9a9"
android:textSize="14dp"></TextView>
<TextView
android:id="#+id/tvDeclined"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
></TextView>
</LinearLayout>
<ProgressBar
android:id="#+id/progressBar5"
style="?android:attr/progressBarStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:indeterminate="true"
android:visibility="visible" />
<LinearLayout
android:id="#+id/layoutswitch"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<Switch
android:id="#+id/switch1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_weight="1"
android:text="Show Active Drivers Only" />
</LinearLayout>
</LinearLayout>
Use constraint layout
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:id="#+id/linearLayout3"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:orientation="horizontal">
<ImageView
android:id="#+id/imgLeftArrow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/abc_vector_test" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:gravity="center_horizontal">
<ImageView
android:id="#+id/imgGreendot"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/abc_vector_test" />
<TextView
android:id="#+id/tvStatus"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<ImageView
android:id="#+id/imgBid"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:gravity="center_horizontal"
android:orientation="horizontal">
<TextView
android:id="#+id/tvExpected"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:id="#+id/tvTotalBid"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Total Bids | "
android:textColor="#a9a9a9"
android:textSize="14dp" />
<TextView
android:id="#+id/tvDeclined"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
android:id="#+id/layoutswitch"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<Switch
android:id="#+id/switch1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_weight="1"
android:text="Show Active Drivers Only" />
</LinearLayout>
</LinearLayout>
<ProgressBar
android:id="#+id/progressBar5"
style="?android:attr/progressBarStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:indeterminate="true"
android:visibility="visible"
app:layout_constraintBottom_toBottomOf="#+id/linearLayout3"
app:layout_constraintEnd_toEndOf="#+id/linearLayout3"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="#+id/linearLayout3" />
</androidx.constraintlayout.widget.ConstraintLayout>
I want my Landspace to look like this
but it looks like this when I use a RelativeLayout
I also tried with LinearLayout, but it didn't work.
Here is my xml code
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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="fill_parent"
android:layout_height="fill_parent"
android:gravity="center_horizontal|center_vertical"
tools:context="co.edu.unal.androidtic_tac_toe.AndroidTicTacToeActivity"
android:orientation="horizontal">
<co.edu.BoardView
android:id="#+id/board"
android:layout_width="300dp"
android:layout_height="300dp"
android:layout_marginTop="5dp"/>
<TextView
android:id="#+id/information"
android:layout_width="144dp"
android:layout_height="wrap_content"
android:text="info"
android:gravity="center_horizontal"
android:layout_marginTop="20dp"
android:textSize="20sp" />
<TextView
android:id="#+id/scores"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Human: 0 Ties:0 Android:0"
android:gravity="center_horizontal"
android:layout_marginTop="20dp"
android:textSize="20sp" />
</LinearLayout>
Maybe do something like:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal" android:layout_width="match_parent"
android:layout_height="match_parent">
<co.edu.BoardView
android:id="#+id/board"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:layout_marginTop="5dp"/>
<LinearLayout
android:layout_width="0dp"
android:layout_weight="1"
android:orientation="vertical"
android:layout_height="match_parent">
<TextView
android:id="#+id/TextView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:text="Name" />
<TextView
android:id="#+id/TextView6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:text="Name" />
<TextView
android:id="#+id/TextView7"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10"
android:text="Name" />
<TextView
android:id="#+id/TextView8"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10"
android:text="Name" />
</LinearLayout>
The following is the code of main.xml, which i have used to create a row adapter for JSON
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="4dp"
android:orientation="vertical"
android:weightSum="1">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="50dp"
android:layout_weight="0.88"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="pumpName"
android:id="#+id/tvPump" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Time"
android:id="#+id/tvTime"
android:gravity="center_vertical" />
</LinearLayout>
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/ivIcon"
android:src="#drawable/yes" />
</FrameLayout>
</LinearLayout>
</LinearLayout>
The above code produces no error but the Time TextView does not come at the center.
I have tried android:gravity="center" but it did not work.
This is the image of my android studio
Relative Layout could come in handy here like so:
<?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:padding="4dp">
<TextView
android:id="#+id/tvPump"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:text="pumpName"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="#+id/tvTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:gravity="center"
android:text="Time"
android:textAppearance="?android:attr/textAppearanceLarge" />
<ImageView
android:layout_width="wrap_content"
android:id="#+id/ivIcon"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_height="wrap_content"
android:src="#drawable/yes" />
</RelativeLayout>
I am looking to build a layout as above using linear/relative layouts with textbox.
Any help is appreciated.
Add background style to root layout for rounded corner and done
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#999999"
android:orientation="vertical">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="2dp"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:background="#FFFFFF"
android:text="25"
android:padding="5dp"
android:textColor="#000000"
android:textSize="60sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:text="Sept \n2016"
android:padding="5dp"
android:textSize="25sp" />
</LinearLayout>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#999999"
android:layout_margin="20dp"
android:orientation="vertical"
>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<View
android:layout_width="5dp"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="#999999"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:background="#FFFFFF"
android:padding="10dp"
android:text="25"
android:textColor="#000000"
android:textSize="60sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:text="Sept \n2016"
android:textColor="#android:color/white"
android:padding="10dp"
android:textStyle="bold"
android:textSize="35sp" />
</LinearLayout>
</LinearLayout>
I am trying to create an layout as shown in the figure.
In that image shipped to is attached to the border of the layout. how to overlap like that.
Here is the XML I am using to create that
<RelativeLayout
android:id="#+id/shipped_to_header"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:background="#drawable/address_blue_border" >
<TextView
android:id="#+id/tv_shipped_to"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#color/homebackground"
android:text="Shipped To"
android:textColor="#android:color/white" />
<TextView
android:id="#+id/tv_door_no"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/tv_shipped_to"
android:text="22"
android:textColor="#android:color/black" />
<TextView
android:id="#+id/tv_address_line1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/tv_door_no"
android:text="Delhi, India"
android:textColor="#android:color/black" />
<TextView
android:id="#+id/tv_address_line2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/tv_address_line1"
android:text="Swindon Senegal BS32 8FE"
android:textColor="#android:color/black" />
</RelativeLayout>
Try this
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginTop="8dp"
android:background="#android:color/holo_blue_bright"
android:orientation="vertical"
android:padding="10dp" >
<TextView
android:id="#+id/tv_door_no"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="22" />
<TextView
android:id="#+id/tv_address_line1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Delhi" />
<TextView
android:id="#+id/tv_address_line2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Some more dara" />
</LinearLayout>
<TextView
android:id="#+id/tv_shipped_to"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:text="Ship To"
android:background="#android:color/holo_blue_dark"
android:layout_marginLeft="15dp"
/>
</RelativeLayout>
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:background="#android:color/white">
<!-- This is the main content -->
<RelativeLayout
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:layout_margin="15dp" android:background="#drawable/frame"
android:orientation="vertical" android:padding="20dp">
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content"
android:text="Main Content" android:layout_centerInParent="true" />
</RelativeLayout>
<!-- This is the title label -->
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content"
android:background="#android:color/white" android:padding="5dp"
android:text="Testing"
android:layout_marginLeft="30dp" android:textColor="#android:color/black" />
</RelativeLayout>
You can have your answer at here and here
To obtain a layout similar to the one it's in the image you have to use command android:layout_margin with negative values.
Here is an example:
<?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" >
<RelativeLayout
android:id="#+id/relativeLayout1"
android:layout_width="fill_parent"
android:layout_height="70dp"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true" >
<TextView
android:id="#+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:text="TextView" />
<TextView
android:id="#+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:text="TextView" />
</RelativeLayout>
<TextView
android:id="#+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/relativeLayout1"
android:layout_alignParentLeft="true"
android:layout_marginBottom="-10dp"
android:text="TextView" />
</RelativeLayout>
Your image is a bit toooo small. Anyway, for that, use RelativeLayout.
<?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:padding="0dp" >
<LinearLayout
android:id="#+id/linearLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_margin="20dp"
android:background="#ccff00"
android:orientation="vertical" >
<TextView
android:id="#+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
android:text="Medium Text"
android:textAppearance="?android:attr/textAppearanceMedium" />
<!-- Your other TextViews -->
<TextView
android:id="#+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
android:text="Medium Text"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>
<TextView
android:id="#+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/linearLayout1"
android:layout_alignParentTop="true"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
android:background="#ccffff"
android:text="Medium Text"
android:textAppearance="?android:attr/textAppearanceMedium" />
</RelativeLayout>