我有一个可绘制的资源中定义的形状,这只是带圆角边缘的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"/>
日食抛出一个错误,尽管该项目构建并运行并看起来很好: java.lang.UnsupportedOperationException 异常详细信息记录在窗口>显示视图>错误日志 和错误日志只是说: java.lang.UnsupportedOperationException at android.gra在android.graphics.Path.native_addRoundRect(Path.java) 处的android.graphics.Path.addRoundRect(Path.java:491) at android.graphics.drawable。 GradientDrawable.draw(GradientDrawable.java:330)
最糟糕的是我不能在eclipse中使用图形布局时发生这种情况。我必须手工编辑,除非直到我在模拟器中启动应用程序,否则无法看到布局。
任何人都有形状,XML和Eclipse的这个问题?