【发布时间】:2013-11-04 15:01:34
【问题描述】:
我有我的 gamefield.xml,我只想在画布上用 onDraw() 绘制一个在 gamefield.xml t 操作的矩形...我一直在寻找答案,但没有任何效果...
我可以为此做些什么,。谢谢。
这是我的gamefield.xml,但我认为它没有用。
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<View class= "cruz.jayson.bantumi.Board"
android:id="@+id/myBoard"
android:layout_width="fill_parent"
android:layout_height="match_parent"
/>
</LinearLayout>
【问题讨论】:
-
定义
doesn't work..developer.android.com/training/custom-views/create-view.html