Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6868019
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:22:57+00:00 2026-05-27T03:22:57+00:00

<LinearLayout android:layout_width=fill_parent android:layout_height=wrap_content android:orientation=vertical android:background=@drawable/settings_border android:padding=1dp android:layout_marginLeft=15dip android:layout_marginRight=15dip android:layout_marginTop=5dip> <RelativeLayout android:id=@+id/map_refresh android:layout_height=fill_parent android:layout_width=wrap_content android:background=@drawable/settings_selector_up

  • 0
<LinearLayout 
            android:layout_width="fill_parent" android:layout_height="wrap_content"
            android:orientation="vertical" android:background="@drawable/settings_border" android:padding="1dp"
            android:layout_marginLeft="15dip" android:layout_marginRight="15dip" android:layout_marginTop="5dip">
            <RelativeLayout android:id="@+id/map_refresh"
                android:layout_height="fill_parent" android:layout_width="wrap_content" 
                android:background="@drawable/settings_selector_up" 
                android:padding="15dp">
                <TextView android:id="@+id/Text1" 
                    android:layout_height="wrap_content" android:layout_width="wrap_content"
                    android:text="Map refresh period">
                </TextView>
                <TextView android:id="@+id/TextView09" 
                    android:layout_height="wrap_content" android:layout_width="wrap_content"
                    android:text="1 min" 
                    android:layout_alignParentRight="true"
                    android:paddingRight="5dp">
                </TextView>
            </RelativeLayout>

            <RelativeLayout android:id="@+id/own_location" 
                android:layout_height="fill_parent" android:layout_width="wrap_content" 
                android:padding="15dp"
                android:background="@drawable/settings_selector_mid">
                <TextView android:id="@+id/Text1" 
                    android:layout_height="wrap_content" android:layout_width="wrap_content"
                    android:text="Own location update period">
                </TextView>
                <TextView android:id="@+id/TextView09" 
                    android:layout_height="wrap_content" android:layout_width="wrap_content"
                    android:text="1 min" 
                    android:layout_alignParentRight="true"
                    android:paddingRight="5dp">
                </TextView>
            </RelativeLayout>

I want set only bottom border in relativelayout. I want to dispaly listview style but not using listview. Lets say each listitem is relativlayout. I want set only bottom border so its look like a listview’s divider.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T03:22:58+00:00Added an answer on May 27, 2026 at 3:22 am

    I hope I understood what you said.

    in the res folder create a new folder (if you don’t already have it) named drawable

    there create an xml named “borders.xml”

    <selector xmlns:android="http://schemas.android.com/apk/res/android">
    
        <item android:state_pressed="true"><shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
            <gradient android:angle="90" android:centerColor="#6da23f" android:endColor="#8bc45d" android:startColor="#2f481c" />
    
                <stroke android:width="2dp" android:color="#999999" />
    
                <padding android:bottom="4dp" android:left="3dp" android:right="3dp" android:top="6dp" />
    
                <corners android:radius="10px"/>
            </shape>
        </item>
        <item>
            <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
                <gradient android:angle="90" android:centerColor="#6da23f" android:endColor="#8bc45d" android:startColor="#4c8a39" />
    
                <stroke android:width="1dp" android:color="#FFFFFF" />
    
                <padding android:bottom="4dp" android:left="3dp" android:right="3dp" android:top="6dp" />
    
                <corners android:radius="10px"/>
            </shape>
        </item>
    </selector>
    

    You can further edit it as you like.
    Then select the layout from the Outline and click Background properties, and select the borders xml that you created.

    This will create borders for all 4. Alternatively, you can add a simple

    <View android:layout_width="1dip"
        android:layout_height="fill_parent"
        android:background="#FFFFFF" />
    

    line and add it to the bottom of your layout and change the color/size to your liking.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Having this XML view: <?xml version=1.0 encoding=utf-8?> <LinearLayout android:id=@+id/myScrollLayout android:layout_width=fill_parent android:layout_height=fill_parent android:orientation=vertical xmlns:android=http://schemas.android.com/apk/res/android> <ScrollView
I have the layout: <?xml version=1.0 encoding=utf-8?> <LinearLayout android:orientation=horizontal android:layout_width=fill_parent android:layout_height=fill_parent android:weightSum=1> <LinearLayout android:layout_weight=0.2
This is the layout I am using: <ScrollView xmlns:android=http://schemas.android.com/apk/res/android android:background=@color/background android:layout_width=fill_parent android:layout_height=fill_parent android:padding=30dip >
Here is my layout <?xml version=1.0 encoding=utf-8?> <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=fill_parent android:id=@+id/LinearLayout01 android:layout_height=wrap_content> <Spinner android:text=@+id/AutoCompleteTextView01
Actually my code is: LinearLayout ll = new LinearLayout(this); ll.setId(i); ll.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT)); ll.setPadding(0, 0,
First, xml is as follows: <?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 >
Possible Duplicate: Android: Scale a Drawable or background image? I'd like to make a
Here's my layout code; <?xml version=1.0 encoding=utf-8?> <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent> <TextView android:text=@string/welcome
I have a linear layout with this form <?xml version=1.0 encoding=utf-8?> <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android android:orientation=vertical
I have the following XML layout for a ListActivity. <?xml version=1.0 encoding=utf-8?> <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.