可绘制的形状导致日食问题

时间:2011-07-11 14:48:34

标签: android

我有一个在drawable资源中定义的形状,这只是带有圆边的textView背景。 它实际上工作正常,但当我引用形状时:

<?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>

我的layout.xml文件中的一个片段在这里:

<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会抛出错误:     java.lang.UnsupportedOperationException     Window&gt;中记录了异常详细信息。显示视图&gt;错误日志 并且错误日志只是说:     java.lang.UnsupportedOperationException     在android.graphics.Path_Delegate.native_addRoundRect(Path_Delegate.java:332)     在android.graphics.Path.native_addRoundRect(Path.java)     在android.graphics.Path.addRoundRect(Path.java:491)     在android.graphics.drawable.GradientDrawable.draw(GradientDrawable.java:330)

最糟糕的是,当发生这种情况时,我无法在eclipse中使用图形布局。我必须手动编辑,除非直到我在模拟器中启动应用程序,否则无法查看布局。

其他人对shape,xml和eclipse有这个问题吗?

1 个答案:

答案 0 :(得分:0)

此处报道的问题: http://code.google.com/p/android/issues/detail?id=18472

您可以尝试将视图更新到android 2.1 update1

或使用android:radius代替个人半径

相关问题