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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T05:27:17+00:00 2026-06-11T05:27:17+00:00

I’ve been working on my application for a while in Android 2.2, and I’m

  • 0

I’ve been working on my application for a while in Android 2.2, and I’m pretty happy with it. However, technology advances and it’s time to upgrade the old girl to work with Honeycomb and ICS…

One of the things that’s not looking right is the buttons on my screen. It’s frustrating, but I can’t seem to find a way to make them look the way they used to. My buttons use a custom drawable, which is an XML file, not an actual graphic. It looks like this:

<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item>
        <shape>
            <gradient
                android:startColor="#444444"
                android:endColor="#444444" />

            <stroke
                android:width="1dip"
                android:antialias="true" 
                android:color="@android:color/white" />

            <corners
                android:radius="8dip" />

            <padding
                android:left="2dip"
                android:top="2dip"
                android:right="2dip"
                android:bottom="2dip" />
        </shape>
    </item>
</selector>

The buttons grab this code in the layout.xml file like this:

<Button
    android:id="@+id/button1"
    android:layout_weight="1"
    android:layout_width="1dp"
    android:layout_margin="2dp"
    android:longClickable="true"
    android:visibility="invisible"
    android:layout_height="fill_parent"
    android:background="@drawable/def_gray"
    android:layout_gravity="center_vertical"
    android:textColor="@android:color/white"
    android:gravity="center_horizontal|center_vertical" />

This used to produce a nice, professional-looking rounded-corner rectangle button with a white border and a gray center. However, now that I’m running my code on a Samsung Galaxy Tab 2 (running ICS) the rounded parts of the border are not white — they’re gray, and it looks bad. I have discovered the corners will be white if I fatten up the stroke to 2dip, but I really would prefer to preserve the earlier version look of the software.

I’ve learned from experience that if I were drawing something with curves with a Paint & Canvas, the answer to this problem is to ensure that anti-aliasing is on. However, even though there IS an android:antialias key for XML (you can see it in the section — but it doesn’t work), I can’t figure out how to use it.

Does anyone have any suggestions??

Thanks,
R.

  • 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-11T05:27:19+00:00Added an answer on June 11, 2026 at 5:27 am

    The only answer I could find was to grow the size of the white outline from 1dp to 2dp.
    The reason I can think of that this would work is color-aliasing for the curved line, but I was unsuccessful at addressing the issue directly. At first, it really wasn’t the look I was going for, but it’s grown on me.

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

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I would like to count the length of a string with PHP. The string

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.