我想創建活動,並將按鈕放在屏幕的任何位置。安卓移動按鈕
但我無法弄清楚如何做到這一點。
例如:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:id="@+id/linearLayout1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<Button android:text="start" android:layout_height="wrap_content" android:layout_gravity="bottom|center" android:layout_width="wrap_content"></Button>
</LinearLayout>
在這種情況下按鈕apears在屏幕的底部。但我希望按鈕高一點,但我不能。 那麼有什麼方法可以使用座標或其他方法將按鈕放在屏幕上嗎?
正是你所想設計什麼樣的佈局? –