I'm having trouble creating a simple rounded rectangle using XML. Every time I try to add the "corners" element to the custom shape I get:
> java.lang.UnsupportedOperationException
> at
> android.graphics.Path.addRoundRect(Path.java:514)
> at
> android.graphics.drawable.GradientDrawable.draw(GradientDrawable.java:314)
> at
> android.view.View.draw(View.java:6520)
> ...
res/dawable/rounded_rectangle.xml:
simple layout.xml using the above shape:
Fyi, I'm trying to compile for Android 2.1 and I have all the latest updates installed to Eclipse and the Android SDK. This shape is a direct copy of something I saw on another website, but for some reason It doesn't want to work for me.
Thanks. See Shape element and its attributes here: developer.android.com/guide/topics/resources/…