main.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/relativeLayout1"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true"
android:text="Button" />
</RelativeLayout>

本文介绍了一个简单的Android XML布局文件示例,使用RelativeLayout作为根布局,并在屏幕中心放置了一个Button按钮。
1170

被折叠的 条评论
为什么被折叠?



