1

これは私のコードで、ボタンを隣り合わせに設定する多くの方法を試しましたが、うまくいきませんでした。

私は本当にあなたの助けを感謝します.

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical" >



        <Button
            android:id="@+id/button1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:layout_alignParentLeft="true" />

       <Button
            android:id="@+id/button2"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1" />

</LinearLayout>
4

2 に答える 2

2

android:orientation="vertical" を android:orientation="horizo​​ntal" に変更します

于 2012-10-27T15:40:47.940 に答える
0

これは、android:orientation = "vertical"をandroid:orientation="horizo​​ntal"に変更することで実現できます。UIのパターンを投稿すると、より正確にサポートできます。ありがとうございます。

于 2012-10-27T15:52:06.953 に答える