【发布时间】:2015-09-18 21:22:28
【问题描述】:
我有一个名为 SingleTouchClass 的自定义类,它由 View 扩展,我无法更改它的属性,如背景颜色
<com.pro.awais.pronoornotepad.SingleTouchClass
android:id="@+id/canvas"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#000000"
android:layout_weight="1" />
**Here is simple empty SingleTouchClass just with a consturctor**
public class SingleTouchClass extends View {
public SingleTouchClass(Context context, AttributeSet attrs) {
super(context, attrs);
}
}
【问题讨论】:
标签: java android android-view android-custom-view