在Android中,布局文件主要使用XML语言进行编写。可以使用多种布局文件来实现不同的界面布局样式。以下是一些常见的Android多布局XML的示例:
1. 线性布局(LinearLayout):
```
xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello World!" />
```
2. 相对布局(RelativeLayout):
```
xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello World!" android:layout_alignParentTop="true" android:layout_centerHorizontal="true" />
```
3. 约束布局(ConstraintLayout):
```
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent"> android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello World!" app:layout_constraintTop_toTopOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toEndOf="parent" />
```
以上是三种常见的Android布局文件的示例,分别是线性布局、相对布局和约束布局。可以根据自己的需求选择合适的布局文件进行使用。