写一个android studio relativelayout代码
时间: 2023-10-06 21:05:00 浏览: 105
【Android Studio代码】相对布局
Sure, here's an example of a RelativeLayout code in Android Studio:
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!" />
<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Click Me!"
android:layout_below="@+id/textView"/>
</RelativeLayout>
Hope this helps!
阅读全文