您的位置:首页 > 移动开发 > Android开发

Android activity_main.xml文件中的FrameLayout

2016-02-01 00:00 666 查看
FrameLayout布局就是在屏幕上开辟一个区域以填充所有的组件,但是使用FrameLayout布局会将所有的组件都放在屏幕的左上角,而且所有的组件都可以层叠进行显示。





<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"

xmlns:tools="http://schemas.android.com/tools"

android:layout_width="match_parent"

android:layout_height="match_parent"

tools:context=".MainActivity" >

<TextView

android:id="@+id/text1"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:text="我的框架布局管理器"/>

<Button

android:id="@+id/mybutton1"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:text="我的框架布局管理器按钮"/>

<EditText

android:id="@+id/myedit1"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:text="输入姓名"/>

</FrameLayout>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: