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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T13:49:00+00:00 2026-05-31T13:49:00+00:00

Given I have a background drawable to create bulletpoints for TextViews like this: Then

  • 0

Given I have a background drawable to create bulletpoints for TextViews like this:

Example of what I want

Then my XML code looks like this:

<?xml version="1.0" encoding="utf-8"?>

<layer-list
        xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:right="235dp">
        <shape android:shape="oval">
            <padding android:left="10dp" />
            <size android:height="5dp" android:width="5dp"/>
            <solid android:color="@color/my_pink"/>
        </shape>
    </item>
    <item android:left="10dp">
        <shape android:shape="rectangle">
            <solid android:color="#ffffff"/>
            <padding android:left="10dp" />
        </shape>
    </item>
</layer-list>

But once I use the code shown above, my bullet points look like this:

Result of the XML shown above

It seems the <size> tag is ignored completely.

How would you solve this problem? Using a 9patch, yes I know.. perhaps that’s the easiest to do.. but in fact I was hoping to find a XML solution as it’s more flexible in the future.

Custom drawing is also out of the question.

  • 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-31T13:49:01+00:00Added an answer on May 31, 2026 at 1:49 pm

    <size> tag certainly works in layer-list
    and to show the bullet points for textviews you can use the xml attribute android:drawableLeft
    -> link

    With this approach, there is no need of 9-patch and custom drawing.

    Posting code & screenshot here for the reference.

    res/drawable/bullet_point_layer.xml

    <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:right="3dp">
        <shape android:shape="oval">
            <padding android:left="10dp" />
            <size android:height="10dp" android:width="10dp"/>
            <solid android:color="#ff0080"/>
        </shape>
    </item>
    

    res/layout/main.xml

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >
    
    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="TextView one"
        android:textColor="@android:color/black"
        android:drawableLeft="@drawable/bullet_point_layer"
        android:background="@android:color/white" />
    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="TextView Two"
        android:textColor="@android:color/black"
        android:drawableLeft="@drawable/bullet_point_layer"
        android:background="@android:color/white" />
    
    </LinearLayout> 
    

    How it looks

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

Sidebar

Related Questions

i have created an image button in my xml <Button android:layout_height=wrap_content android:id=@+id/send android:layout_width=50dip android:background=@drawable/button_back>
I have given a table background image using css background-image property. The cells are
given i have the following block of code (function(){ var mb = { abc:function(){
I have a blog background website. We provide some HTML code that the user
I have a black & white ninepatch drawable as background of a view and
I currently have a div on my page that I have given a background
I have a button defined in my XML file. The button works exactly like
I have an HTML page with some <code> segments, and I have given them
I'm from a PHP background but have been given a Django project to administer,
I have a custom drawable in my android project that should be the background

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.