0
私は、相対レイアウトを使用してボタンベースのメニューを作成しようとしています。私は親に合わせてリサイズ私はすでに持っていた3つのボタンの下にもう一つのボタンを追加しようとしましたが、代わりにボタンのボタンが画面から外れる
android:below=""
android:above=""
android:toLeftOf=""
android:toRightOf=""
コマンドに
を使用して、グリッドの形成にそれらを配置しようとしています代わりに4番目のボタンが画面の端より下に落ちます。小さな画面でボタンが見えないようにしたくないので、これを回避する方法がありますか?ここに私のレイアウトです
<RelativeLayout android:id="@+id/level1layout"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_weight="1"
android:layout_gravity="center_horizontal">
<Button android:id="@+id/OneLevel1Button"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_marginRight="10dp"
android:layout_marginLeft="10dp"
android:layout_marginBottom="10dp"
android:layout_marginTop="10dp"
android:text="1"
android:textSize="25dp"
android:background="@drawable/warpbutton"
android:visibility="gone"/>
<Button android:id="@+id/OneLevel2Button"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_marginRight="10dp"
android:layout_marginLeft="10dp"
android:layout_marginBottom="10dp"
android:layout_marginTop="10dp"
android:layout_below="@id/OneLevel1Button"
android:text="2"
android:textSize="25dp"
android:background="@drawable/warpbutton"
android:visibility="gone"/>
<Button android:id="@+id/OneLevel3Button"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_marginRight="10dp"
android:layout_marginLeft="10dp"
android:layout_marginBottom="10dp"
android:layout_marginTop="10dp"
android:layout_below="@id/OneLevel2Button"
android:text="3"
android:textSize="25dp"
android:background="@drawable/warpbutton"
android:visibility="gone"/>
<Button android:id="@+id/OneLevel4Button"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_marginRight="10dp"
android:layout_marginLeft="10dp"
android:layout_marginBottom="10dp"
android:layout_marginTop="10dp"
android:layout_below="@id/OneLevel3Button"
android:text="4"
android:textSize="25dp"
android:background="@drawable/warpbutton"
android:visibility="gone"/>
</RelativeLayout>
視界は、起動時にメニューシステムのより深く隠されているので、デフォルトでは消されるように設定されています。
私はその可視性を簡単に設定でき、複数のアクティビティを同じアクティビティで実行することはできますか?ああ、ここで使われている画像(http://developer.android.com/resources/tutorials/views/hello-gridview.html)をボタンで置き換えることはできますか? – Jack
私はここでバックペダルをして、私が提供しようとしていた元のリンクを提供するつもりです - http://developer.android.com/guide/tutorials/views/hello-gridview.html あなたは、あなたが達成しようとしているもののアップ? –
本当に言いたくないのは、怒っている鳥のレベル選択メニューのようなものだと思います。小さい番号の四角形がグリッドレイアウトに表示されます。 – Jack