title: Custom Buttons looking bad in application now that we've upgraded Android
body: <p>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...</p>
  
  <p>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:</p>
  
  <pre><code>&lt;selector xmlns:android="http://schemas.android.com/apk/res/android"&gt;
      &lt;item&gt;
          &lt;shape&gt;
              &lt;gradient
                  android:startColor="#444444"
                  android:endColor="#444444" /&gt;
  
              &lt;stroke
                  android:width="1dip"
                  android:antialias="true" 
                  android:color="@android:color/white" /&gt;
  
              &lt;corners
                  android:radius="8dip" /&gt;
  
              &lt;padding
                  android:left="2dip"
                  android:top="2dip"
                  android:right="2dip"
                  android:bottom="2dip" /&gt;
          &lt;/shape&gt;
      &lt;/item&gt;
  &lt;/selector&gt;
  </code></pre>
  
  <p>The buttons grab this code in the layout.xml file like this:</p>
  
  <pre><code>&lt;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" /&gt;
  </code></pre>
  
  <p>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.</p>
  
  <p>I've learned from experience that if I were drawing something with curves with a Paint &amp; 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.</p>
  
  <p>Does anyone have any suggestions??</p>
  
  <p>Thanks,
  R.</p>