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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T02:00:26+00:00 2026-05-22T02:00:26+00:00

I am setting an image for the background of a linearlayout that I am

  • 0

I am setting an image for the background of a linearlayout that I am using. The problem I am getting is the white border just below the title bar. If I set the background to a color the white border does not appear. Does anybody know what might be causing this.

background image problem

I am loading some content in dynamically but here is the xml

<?xml version="1.0" encoding="utf-8"?>
<android.gesture.GestureOverlayView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/gestures"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:gestureStrokeType="single"
    android:eventsInterceptionEnabled="true"
    android:orientation="vertical"
    android:uncertainGestureColor="#00000000"
    android:gestureColor="#00000000">
<ScrollView
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">


<LinearLayout android:id="@+id/LinearLayout01"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical"
    android:padding="20dip"
    android:background="@drawable/background">
<!--     android:background="@drawable/background"> -->


    <TextView 
        android:id="@+id/item_text"
        android:layout_height="wrap_content"
        android:textSize="16sp"
        android:layout_gravity="center"
        android:text="@string/item_text"
        android:textColor="#fffafa"
        android:layout_width="wrap_content"
        android:textStyle="bold"
        android:paddingBottom="10dip"/>

    <LinearLayout
        android:id="@+id/photoLayout"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:paddingBottom="20dip"/>     

     <LinearLayout android:id="@+id/LinearLayoutDynamic"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:padding="10dp"
        android:orientation="vertical"
        android:background="@drawable/my_border">

     </LinearLayout>

     <TextView 
        android:id="@+id/item_text1"
        android:layout_height="wrap_content"
        android:paddingTop="20dip"
        android:paddingBottom="10dip"
        android:textSize="16sp"
        android:layout_gravity="center"
        android:text="Besonderheiten"
        android:textColor="#fffafa"
        android:layout_width="wrap_content"
        android:textStyle="bold"/>

    <LinearLayout android:id="@+id/RelativeLayout01"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"

        android:orientation="vertical"
        android:background="@drawable/my_border">

        <RelativeLayout
            android:id="@+id/LinearLayout"
            android:layout_height="fill_parent"
            android:layout_width="fill_parent"
            android:orientation="horizontal">   


            <TextView 
                style="@style/CodeFont"
               android:id="@+id/item_wasteDisposal"
               android:text="@string/item_wasteDisposal"
               android:textSize="14sp"
               android:singleLine="true"/>  

            <ImageView 
                android:layout_height="wrap_content"  
                android:layout_width="wrap_content" 
                android:id="@+id/wasteDisposalImage"
                android:layout_toRightOf="@id/item_wasteDisposal"
                android:padding="5dp"/>

            <View
                android:layout_height="1dip"
                android:background="#FF909090"
                android:layout_below="@id/wasteDisposalImage"
                android:layout_width="fill_parent"/>


            <ImageView
                android:layout_height="wrap_content" 
                android:layout_width="wrap_content" 
                android:id="@+id/internetImage"
                android:layout_below="@id/wasteDisposalImage"
                android:layout_alignLeft="@id/wasteDisposalImage"
                android:padding="5dp"/>

            <TextView 
                style="@style/CodeFont"
                android:id="@+id/item_internet"
                android:text="@string/item_internet"
                android:textSize="14sp"
                android:layout_toLeftOf="@id/internetImage"
                android:layout_below="@id/wasteDisposalImage"/>

            <View
                android:layout_height="1dip"
                android:background="#FF909090"
                android:layout_below="@id/internetImage"
                android:layout_width="fill_parent"/>


            <ImageView 
                android:layout_height="wrap_content" 
                android:layout_width="wrap_content"
                android:id="@+id/overnightStayImage"
                android:layout_below="@id/internetImage"
                android:layout_alignLeft="@id/internetImage"
                android:padding="5dp"/>

            <TextView 
                style="@style/CodeFont"
                android:id="@+id/item_overnightStay"
                android:text="@string/item_overnightStay"
                android:textSize="14sp"
                android:layout_toLeftOf="@id/overnightStayImage"
                android:layout_below="@id/internetImage"/>  

                            <View
                android:layout_height="1dip"
                android:background="#FF909090"
                android:layout_below="@id/overnightStayImage"
                android:layout_width="fill_parent"/>

            <ImageView 
                android:layout_height="wrap_content" 
                android:layout_width="wrap_content" 
                android:id="@+id/toiletImage"
                android:layout_below="@id/overnightStayImage"
                android:layout_alignLeft="@id/overnightStayImage"
                android:padding="5dp"/>

            <TextView 
                style="@style/CodeFont"
                android:id="@+id/item_toilet"
                android:text="@string/item_toilet"
                android:textSize="14sp"
                android:layout_toLeftOf="@id/toiletImage"
                android:layout_below="@id/overnightStayImage"/>

                            <View
                android:layout_height="1dip"
                android:background="#FF909090"
                android:layout_below="@id/toiletImage"
                android:layout_width="fill_parent"/>

            <ImageView 
                android:layout_height="wrap_content"
                android:layout_width="wrap_content" 
                android:id="@+id/electricityImage"
                android:layout_below="@id/toiletImage"
                android:layout_alignLeft="@id/toiletImage"
                android:padding="5dp"/>

            <TextView 
                style="@style/CodeFont"
                android:id="@+id/item_electricity"
                android:text="@string/item_electricity"
                android:textSize="14sp"
                android:layout_toLeftOf="@id/electricityImage"
                android:layout_below="@id/toiletImage"/>                

                        <View
                android:layout_height="1dip"
                android:background="#FF909090"
                android:layout_below="@id/electricityImage"
                android:layout_width="fill_parent"/>

            <ImageView 
                android:layout_height="wrap_content" 
                android:layout_width="wrap_content" 
                android:id="@+id/cranImage"
                android:layout_below="@id/electricityImage"
                android:layout_alignLeft="@id/electricityImage"
                android:padding="5dp"/>

            <TextView 
                style="@style/CodeFont"
                android:id="@+id/item_cran"
                android:text="@string/item_cran"
                android:textSize="14sp"
                android:layout_toLeftOf="@id/cranImage"
                android:layout_below="@id/electricityImage"/>        

                            <View
                android:layout_height="1dip"
                android:background="#FF909090"
                android:layout_below="@id/cranImage"
                android:layout_width="fill_parent"/>                   

            <ImageView 
                android:layout_height="wrap_content"
                android:layout_width="wrap_content" 
                android:id="@+id/slipwayImage"
                android:layout_below="@id/cranImage"
                android:layout_alignLeft="@id/cranImage"
                android:padding="5dp"/> 

            <TextView 
                style="@style/CodeFont"
                android:id="@+id/item_slipway"
                android:text="@string/item_slipway"
                android:textSize="14sp"
                android:layout_toLeftOf="@id/slipwayImage"
                android:layout_below="@id/cranImage"/>  

                        <View
                android:layout_height="1dip"
                android:background="#FF909090"
                android:layout_below="@id/slipwayImage"
                android:layout_width="fill_parent"/>

            <ImageView 
                android:layout_height="wrap_content"
                android:layout_width="wrap_content" 
                android:id="@+id/campingImage"
                android:layout_below="@id/slipwayImage"
                android:layout_alignLeft="@id/slipwayImage"
                android:padding="5dp"/> 

            <TextView 
                style="@style/CodeFont"
                android:id="@+id/item_camping"
                android:text="@string/item_camping"
                android:textSize="14sp"
                android:layout_toLeftOf="@id/campingImage"
                android:layout_below="@id/slipwayImage"/>       

                            <View
                android:layout_height="1dip"
                android:background="#FF909090"
                android:layout_below="@id/campingImage"
                android:layout_width="fill_parent"/>

            <ImageView
                android:layout_height="wrap_content"
                android:layout_width="wrap_content" 
                android:id="@+id/freshWaterImage"
                android:layout_below="@id/campingImage"
                android:layout_alignLeft="@id/campingImage"
                android:padding="5dp"/> 

            <TextView 
                style="@style/CodeFont"
                android:id="@+id/item_freshWater" 
                android:text="@string/item_freshWater"
               android:textSize="14sp"
               android:layout_toLeftOf="@id/freshWaterImage"
                android:layout_below="@id/campingImage"/>  

        </RelativeLayout>   

    </LinearLayout>

</LinearLayout>
</ScrollView>
  • 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-22T02:00:27+00:00Added an answer on May 22, 2026 at 2:00 am

    Post your image file. And is it a 9-patch png or just a standard image file? Without more info my guess that your image is too big for your space, and for some reason when it shrinks it down it has to shrink in both directions and it creates blank space at the top. I have noticed this effect before. If that is what is happening then solutions would be either resize the image file to smaller so that it won’t have to shrink, or (and this is probably the prefered way) create a a very small 9-patch that will expand into the image you want. It is hard for me to tell but it looks like from the picture your image is just a solid color anyway, so if you went the 9-patch route you could make it a very small canvas size 10 x 10 pixels or something. and it would know how to expand it to fill any space required.

    Another way to tell if this is what is going on is run your app on something with a bigger screen. Then it won’t have to shrink the image file and thus should not show the blank space at the top

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

Sidebar

Related Questions

I am facing problem while setting the backGround Image of LinearLayout from asset folder.
I'm using setting the background image using methodology below. When I rotate my device
I am setting the background-image of some elements using css (some elements have no
I want to set a background image to my listview so that regardless of
Instead of setting image using 'background' property, I would like to draw the image
I have a UITableViewController that has a background image. I am setting the image
I am setting a background image on my XAML Grid with a Uri. The
Supposing I'm setting a background image for a web page in CSS like this:
I'm setting an ImageView using setImageBitmap with an external image url. I would like
What's the difference between setting background image in layout xml and setting it from

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.