4

I was playing with corners, and I was intrigued with this behavior. XML layout:

<TextView xmlns:android="http://schemas.android.com/apk/res/android"  
    android:id="@+id/list_header_title"

    android:layout_height="wrap_content" 
    android:layout_width="fill_parent"
    android:padding="10dip"
    android:gravity="center_vertical"

    android:background="@layout/my_outline"

    android:text="Example"
    android:textSize="14sp"
    android:textStyle="bold" 

/>

This is my_outline.xml: (pay attention to the corners tag)

<?xml version="1.0" encoding="utf-8"?>
<shape 
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">

<corners
        android:topLeftRadius="10dip"
        android:bottomRightRadius="10dip"/>

<padding
        android:left="50dip"
        android:top="5dip"
        android:bottom="5dip" />

<solid
        android:color="#0fff" />

<stroke
        android:width="1dip"
        android:color="#f0f0f0" />

</shape>

Picture:

enter image description here

Change the shape to:

<corners
        android:topLeftRadius="10dip"
        android:bottomLeftRadius="10dip"/>

And you can clearly see that the bottom corners are inverted (happens with all, i cut "Wednesday" just to illustrate). This is a picture of my phone (Nexus S 2.3.2, but happens on the emulator as well):

enter image description here

Are you aware of this? I looked at Google ("android shape inverted corner"), and got nothing. Here on SO there are no "related questions" as well.

razlebe
  • 7,134
  • 6
  • 42
  • 57
davidcesarino
  • 16,160
  • 16
  • 68
  • 109

1 Answers1

9

Yup, it's a noted bug. See this answer for more links and reference info. :P

Community
  • 1
  • 1
Kevin Coppock
  • 133,643
  • 45
  • 263
  • 274
  • Ah, ok. Sorry about that, I didn't see the questions. Probably the system didn't pick them up by the words. Thanks! – davidcesarino Apr 20 '11 at 22:35
  • Yeah, no problem, the related questions aren't always that accurate, and sometimes it's hard to find stuff like this. (I just knew it cause I answered in that question, haha). Tricky bug though, because if they fix it, I would think it would break all the apps that already work around it... – Kevin Coppock Apr 20 '11 at 22:41
  • That's a point. I, for myself, already did just that. Perhaps one day they may deprecate this and use some other name. Or... maybe not. – davidcesarino Apr 21 '11 at 02:00