我有一個在這裏提交的「操作」按鈕右側的按鈕:將一個按鈕對齊屏幕的右下角?
我試圖使用代碼:
android:gravity="bottom|right"
,但它不工作,它仍然停留在同一個地方。
我完整的代碼是這樣的:
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="bottom"
android:keepScreenOn="true"
android:textSize="25dp"
android:padding="30dp"
android:textStyle="bold"
android:textAlignment="center"
android:text="@string/select_action"
android:id="@+id/btnSelectPhoto"
android:layout_alignParentBottom="true"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/btnSelectPhoto"
android:keepScreenOn="true"
android:gravity="bottom|right"
android:padding="30dp"
android:text="@string/submit"
android:textSize="25dp"
android:textStyle="bold"
android:id="@+id/btnSubmit"
android:layout_alignParentBottom="true"
/>
即使上面的代碼,佈局仍是一樣的圖像。我怎樣才能解決這個問題?
修正:將機器人:layout_alignParentRight = 「真」,由於葉戈爾N.
看起來像它的工作,我也做了同樣的事情「操作」按鈕,但: 「機器人:layout_alignParentRight =「true」' 改爲。謝謝您的幫助 – 2014-11-01 13:16:15