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 8617083
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T05:46:21+00:00 2026-06-12T05:46:21+00:00

This is what I want: This is what I have done: The difference is

  • 0

This is what I want:

enter image description here

This is what I have done:

enter image description here

The difference is there are some spaces between the lines and the border because I used padding=10dp for outer border:

<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <solid android:color="#FFFFFF"/>
    <stroke android:width="2dp" android:color="#808080"/>
    <corners
            android:radius="10dp"/>
    <padding
            android:left="10dp"
            android:top="10dp"
            android:right="10dp"
            android:bottom="10dp"/>
</shape>

Am I doing this right? How can I fix this problem?

  • 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-06-12T05:46:23+00:00Added an answer on June 12, 2026 at 5:46 am

    Here is the xml file as you want .

    Remove Padding from your xml file and put padding in each widget. Here test.xml is your background xml file witout padding attribute.

     <?xml version="1.0" encoding="utf-8"?>
        <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content" 
            android:orientation="vertical"
            android:layout_gravity="center_horizontal"
            android:background="@drawable/test"
            android:layout_margin="10dp">
    
            <TextView
                android:id="@+id/textView"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content" 
                android:text="Sample TextView"
                android:padding="10dp"/>
    
            <View 
                android:layout_width="fill_parent"
                android:layout_height="2dp"
                android:background="#000000" />
    
            <TextView
                android:id="@+id/textView"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content" 
                android:text="Sample TextView"
                android:padding="10dp"/>
    
            </LinearLayout>
    

    Edit test.xml file

    <shape xmlns:android="http://schemas.android.com/apk/res/android">
        <solid android:color="#FFFFFF"/>
        <stroke android:width="2dp" android:color="#808080"/>
        <corners
                android:radius="10dp"/>
    
    </shape>
    

    enter image description here

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

Sidebar

Related Questions

I have done this without much effort on T-SQL, but I want to implement
I want to get this straight. I know what DLL's are. I have done
I want my keyboard to have caps lock on, this is done by mEditText.setInputType(TYPE_TEXT_FLAG_CAP_CHARACTERS);
I want to have URLs like this: some-company-name-deal-id-6.htm So the rewrite rule should ignore
I have done stuff like this before, but I want to figure out the
I have done some searching on the difference in implementing a closure using an
I have not done much animation, and I need some help with this. I
I'm creating a simple form and in this form I want to have an
I want to have two columns on the bottom of this webpage I'm making,
I want to have on my page something like This page last refreshed on:

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.