我正在尝试Finger Paint API演示,并试图向其添加按钮。我已包含使用视图添加按钮布局
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<view
android:layout_width="match_parent"
android:layout_height="match_parent"
class="com.triopsys.imosandroid.ViewControllers.SignatureViewController$MyView" />
</LinearLayout>
在我的布局xml中,但我无法在此视图的顶部或底部添加按钮;
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<LinearLayout
android:id="@+id/linearLayout1"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<Button
android:id="@+id/buttonCancel"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Cancel" >
</Button>
<Button
android:id="@+id/buttonOk"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="OK" >
</Button>
</LinearLayout>
<LinearLayout
android:id="@+id/linearLayout2"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<view
android:layout_width="match_parent"
android:layout_height="match_parent"
class="com.triopsys.imosandroid.ViewControllers.SignatureViewController$MyView" />
</LinearLayout>
</LinearLayout>
但这不起作用。
您是否收到某种错误? – iTurki 2012-03-12 13:59:59