user2991900
user2991900

Reputation:

how to draw lines between relative layouts in android xml

I have three relative layouts to display billing address, shipping address and summary. I want to draw a line to seperate these layouts. How is it possible??

Upvotes: 0

Views: 962

Answers (8)

The Ray of Hope
The Ray of Hope

Reputation: 738

Use this code:

<View
    android:layout_width="fill_parent"
    android:layout_height="2dp"
    android:background="#ff00ff"/>

Upvotes: 0

White Lion
White Lion

Reputation: 75

You can use a ImageView with background color or image height 1dp and also you can use this image!

enter image description here

Upvotes: 0

Akbarsha
Akbarsha

Reputation: 2558

use the following View which has 1dp of height

<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@android:color/black"/>

Upvotes: 0

Subhalaxmi
Subhalaxmi

Reputation: 5707

Use

                   <View
                    android:layout_width="fill_parent"
                    android:layout_height="2dip"
                    android:background="#000000" />   

Upvotes: 0

M D
M D

Reputation: 47807

Just add view like below:

<View
    android:id="@+id/vi_sep"
    android:layout_width="fill_parent"
    android:layout_height="1dp"
    android:background="color or image" />

Upvotes: 1

vipul mittal
vipul mittal

Reputation: 17401

You can insert a view with some background and height 2dp, width match_parent in between

Upvotes: 0

RajaReddy PolamReddy
RajaReddy PolamReddy

Reputation: 22493

Use this code between layouts to draw lines

<View
    android:layout_width="fill_parent"
    android:layout_height="1dp"
    android:background="@android:color/darker_gray"/>

Upvotes: 1

Ken
Ken

Reputation: 31161

You can use a View with height 1dp and give it background colour grey to separate your three layouts. (Still, I don't see the need for the relative layouts though.)

Upvotes: 0

Related Questions