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>
<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>
相关文章推荐
- Android 一张图理解getWidth和getMeasuredWidth
- android:gravity与android:layout_gravity
- Android Studio JNI开发
- android框架
- 赤兔安卓版语音图片资料处理
- php-5.5.1-android.patch.v3
- cBPM-android - Code::Blocks环境搭建
- viewpager切换动画
- 选择蜂窝教育Android培训 成就未来
- Android调用默认浏览器打开指定Url的方法实例
- Android NDK and pthread
- Port Node.js to Android running on Genymotion Emulator (x86)
- android— javascript/HTML5/JS read/write local file
- 研究人员开发自治Android应用创建网状网
- 五道口宅男 - Android NDK and OpenCV Development With Android Studio
- 五道口宅男 - Category: Android
- 五道口宅男 - Android
- Android - How to turn off Wifi-direct
- Android Tutorial Android Wifi-Direct Tutorial
- 《深入理解Android:Wi-Fi,NFC和GPS》—android源码下载