見出し ##簡単な質問が 1 つあります。
アプリのUIを担当しています。私はlinearLayoutを使用しており、コンテンツにパディングを適用するために、最初のo内で2番目のLinearLayoutを使用しています
だから私はxmlの例を見つけましたが、なぜそれがLinearlayoutで2つの異なる方向を使用しているのか理解できませんか? したがって、メインの Linearlayout の向きは水平に設定されていますが、2 番目の linearLayout (最初のレイアウトの内側) では向きが垂直に設定されています。そして、私にとっては、すべてのコンテンツ(ボタンとテキストビュー)を垂直方向にのみ表示する必要がある場合、メインの Linearlayout で水平方向を使用する必要があるのはナンセンスです。
ありがとうございました!
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:background="@color/background"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="30dip"
android:orientation="horizontal" >
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/main_title"
android:layout_gravity="center"
android:layout_marginBottom="25dip"
android:textSize="24.5sp"/>
<Button