0

I have a shape defined in a drawable resource this is just textView background with rounded edge. It actually works just fine, but when I reference the shape :

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
   android:shape="rectangle" 
   android:padding="10dp">
<solid android:color="#7C5B77"/>
   <corners
     android:bottomRightRadius="5dp"
     android:bottomLeftRadius="15dp"
     android:topLeftRadius="15dp"
     android:topRightRadius="5dp"/>
</shape>

a snippet from my layout.xml file is here:

<TextView 
android:layout_width="wrap_content" 
android:text="Select Random Student"
android:textSize="15sp" 
android:layout_height="wrap_content"
android:singleLine="true" 
android:textColor="#E1E7DF"
    android:background="@drawable/round_edittext_bkg"
android:layout_weight="1"/>

eclipse throws an error, although the project builds and runs and looks fine: java.lang.UnsupportedOperationException Exception details are logged in Window > Show View > Error Log and the Error log simply says: java.lang.UnsupportedOperationException at android.graphics.Path_Delegate.native_addRoundRect(Path_Delegate.java:332) at android.graphics.Path.native_addRoundRect(Path.java) at android.graphics.Path.addRoundRect(Path.java:491) at android.graphics.drawable.GradientDrawable.draw(GradientDrawable.java:330)

The worst part is that I can't use Graphical layout in eclipse when this happens. I have to edit by hand and can't see the layout unless and until I fire up the app in the emulator.

Anyone else have this problem with shapes, xml and eclipse?

1 Answer 1

0

issue reported here : http://code.google.com/p/android/issues/detail?id=18472

You can try updating view to android 2.1 update1

or use android:radius instead of individual radius

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.