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

  • Home
  • SEARCH
  • 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 6969309
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:33:52+00:00 2026-05-27T16:33:52+00:00

Refer to the image below to understand what I’m trying to do. It should

  • 0

Refer to the image below to understand what I’m trying to do. It should be obvious from the image provided. It seems like this should be pretty simple.

The question is, why is the tiled middle section offset by an inconsistent amount for each list entry?

product_list.xml

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="wrap_content"
        android:layout_height="fill_parent">

    <ListView android:id="@+id/android:list"
              android:layout_width="wrap_content"
              android:layout_height="fill_parent"
              android:divider="@drawable/product_list_divider"
              android:background="@drawable/main_background_bitmap"/>
    <TextView android:id="@+id/android:empty"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="No results."/>
</LinearLayout>

product_list_divider.xml

<layer-list
    xmlns:android="http://schemas.android.com/apk/res/android" >
    <item>
        <bitmap
            android:src="@drawable/shelf_middle"
            android:tileMode="repeat"/>
    </item>
    <item>
        <bitmap
            android:src="@drawable/shelf_left"
            android:gravity="left"/>
    </item>
    <item>
        <bitmap
            android:src="@drawable/shelf_right"
            android:gravity="right"/>
    </item>
</layer-list>

Image to help explain the situation...

  • 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-27T16:33:53+00:00Added an answer on May 27, 2026 at 4:33 pm

    I ended up abandoning the repeat tile mode and did it like this instead:

    <?xml version="1.0" encoding="utf-8"?>
    <layer-list
        xmlns:android="http://schemas.android.com/apk/res/android" >
        <item>
            <bitmap
                android:src="@drawable/bg"
                android:tileMode="repeat" />
        </item>
        <item>
            <bitmap
                android:src="@drawable/shelf_shine"/>
        </item>
        <item>
            <bitmap
                android:src="@drawable/shelf_middle_stretch"
                android:gravity="bottom|fill_horizontal"/>
        </item>
        <item>
            <bitmap
                android:src="@drawable/shelf_side_left"
                android:gravity="left|bottom"/>
        </item>
        <item>
            <bitmap
                android:src="@drawable/shelf_side_right"
                android:gravity="right|bottom"/>
        </item>
        <item>
            <bitmap
                android:src="@drawable/shelf_left"
                android:gravity="left|bottom"/>
        </item>
        <item>
            <bitmap
                android:src="@drawable/shelf_right"
                android:gravity="right|bottom"/>
        </item>
    </layer-list>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I got the below code from @DanS at this link how-to-display-a-map-still-image-file-with-a-moving-current-location onCurrentPosition(Location current){ double
From the project "MarkdownEditorTest" I am trying to refer to controls from another project
I am trying to align an image and some text together. If you refer
I need to display multiple charts with in the Activity,refer the below image to
I have the below JSON returned from a DB. How do I refer to
Refer original post here for a reference to the original issue. What plugin should
Please refer to this post. I have become able to configure my web.config file
Please refer to this background question. After constructing this COUNT, how would I then
I refer to the base64 encode function like seen here It might sound stupid
I would like to add a click handler to an image that changes the

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.