そんな基本的な質問をしているのならごめんなさい。私は午前中ずっとグーグルしようとしました、そしてdeveloper.android.comでドキュメントを読みました、しかし私は解決策を見つけることができませんでした。
要するに、私はこのようなインターフェースを作りたいと思います:
これは私がこれまでに持っているものです:
今、2つのボタンを次の行に移動しようとしていますが、それでもうまくいきません。android:orientation = "horizontal"を"vertical"に変更すると、すべてが垂直に配置されました。Buttonタグ内にandroid:orientation = "vertical"という行を入れようとしましたが、うまくいかなかったようです。
他に何を試すことができますか?誰かが私にいくつかのポインタを教えてくれませんか?(私はAndroid開発とこれらすべてのXML関連の初心者です)。
以下は私のXMLコードです。
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal"
>
<EditText android:id="@+id/txt_Input"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:hint="@string/txt_Input"
android:layout_weight="4"
/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/btn_Send"
android:layout_weight="1"
android:onClick="sendMessage"
/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/btn_Send"
android:layout_weight="1"
android:onClick="sendMessage"
/>
</LinearLayout>