0
我希望圖像和按鈕顯示在底部,現在它只是浮動在屏幕中間,我不喜歡那樣我是否改變它,使其出現在屏幕的底部?按鈕的尺寸是多少?如何設置圖像和按鈕在Android中使用XML顯示在底部
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/background"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".HelpActivity" >
<TextView
android:id="@+id/txtBox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignRight="@+id/imageView1"
android:text="Connect 4 is a two-player game in which the players take turns dropping colour discs from the top into a seven-column, six-row vertically suspended grid. The aim is to get four in a row horizontally, vertically or diagonally and the first player to reach four in a row wins the game. "
android:textColor="#ffffff"
android:textSize="22dip" />
<ImageView
android:id="@+id/imageView1"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="@+id/txtBox"
android:src="@drawable/connect4" />
<Button
android:id="@+id/btnBack"
android:layout_width="48dp"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/imageView1"
android:layout_alignLeft="@+id/txtBox"
android:layout_toLeftOf="@+id/imageView1"
android:text="Back" />
發佈您的完整xml,我們可以看到您的產品 – codeMagic
好的我會這麼做 – user3299420
僅供參考:您可以點擊相應的旁邊的複選標記來接受答案 – codeMagic