1
我很好,用於這個開始的應用程序的Java我試圖。但是這個XML仍然讓我有些擔心。我已經包含了一個我想要實現的圖片: Android佈局的幫助 - 屏幕的一半應該倒過來
這裏是我到目前爲止的代碼。我很高興與它出來的樣子,我只需要知道如何扭轉上半年:
<LinearLayout 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:orientation="vertical">
<LinearLayout
android:id="@+id/opponent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="bottom"
android:layout_weight="1"
android:clickable="false" >
<RelativeLayout
android:id="@+id/opPlus"
android:layout_width="wrap_content"
android:layout_height="50dp"
android:layout_weight="0.5"
android:clickable="true" >
</RelativeLayout>
<RelativeLayout
android:id="@+id/opMinus"
android:layout_width="wrap_content"
android:layout_height="50dp"
android:layout_weight="0.5"
android:clickable="true" >
</RelativeLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/player"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="bottom"
android:layout_weight="1"
android:clickable="false" >
<RelativeLayout
android:id="@+id/plPlus"
android:layout_width="wrap_content"
android:layout_height="50dp"
android:layout_weight="0.5"
android:clickable="true" >
</RelativeLayout>
<RelativeLayout
android:id="@+id/plMinus"
android:layout_width="wrap_content"
android:layout_height="50dp"
android:layout_weight="0.5"
android:clickable="true" >
</RelativeLayout>
</LinearLayout>
在此先感謝大家!
我不知道爲什麼,但是當我把它放在和重新加載圖形界面,它不顯示任何更改。 2個按鈕仍然坐在屏幕中央 – Psest328
適合我。我編輯了一個我做過的例子。 – kcoppock
我明白了。奇怪的。我得到:錯誤。在包「android」中找不到屬性「rotation」的資源 – Psest328