Android-布局之FrameLayout
来源:互联网 发布:美国地图 软件 编辑:程序博客网 时间:2024/06/07 08:05
Android-布局之FrameLayout
安卓有五大布局
线性布局,相对布局,绝对布局,表格布局,还有帧布局,其实我对帧布局不是很熟悉,所以特此来复习一下。
frame_layout.xml
<?xml version="1.0" encoding="utf-8"?><FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" > <TextView android:id="@+id/id_tv1" android:layout_width="300dp" android:layout_height="300dp" android:layout_gravity="center" android:background="#123456" android:text="第一个页面" /> <TextView android:id="@+id/id_tv2" android:layout_width="250dp" android:layout_height="250dp" android:layout_gravity="center" android:background="#456789" android:text="第二个页面" /> <TextView android:id="@+id/id_tv3" android:layout_width="200dp" android:layout_height="200dp" android:layout_gravity="center" android:background="#452289" android:text="第三个页面" /> <TextView android:id="@+id/id_tv4" android:layout_width="150dp" android:layout_height="150dp" android:layout_gravity="center" android:background="#458889" android:text="第四个页面" /></FrameLayout>
效果:
另外,在App下载东西的时候,我们可以使用这个布局。
<?xml version="1.0" encoding="utf-8"?><FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> <ProgressBar android:layout_gravity="center" style="?android:attr/progressBarStyle" android:layout_width="wrap_content" android:layout_height="wrap_content" android:visibility="visible"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="80%" android:textSize="10dp" android:layout_gravity="center"/></FrameLayout>
运行效果:
0 0
- Android布局之FrameLayout
- Android之FrameLayout布局
- Android-布局之FrameLayout
- android 开发布局之FrameLayout
- Android UI布局之FrameLayout
- android布局方式之FrameLayout
- Android之FrameLayout(帧布局)
- Android之FrameLayout(帧布局)
- 《详解Android四大布局》之FrameLayout布局
- 【转载】Android布局讲解之FrameLayout布局
- Android 布局 之 TableLayout,RelativeLayout,AbsoluteLayout,FrameLayout
- Android布局之AbsoluteLayout和FrameLayout
- Android UI之FrameLayout(帧布局)
- Android03--Android之UI布局01FrameLayout
- 详解android四种布局之FrameLayout
- A017-布局之FrameLayout
- (四)Android布局之帧布局(FrameLayout)
- android五大布局之FrameLayout(框架布局)
- 【c++程序】deque一般用法
- [Unity官方文档翻译]Downloading and Installing Unity下载和安装unity教程
- poj3311
- HTTPS握手过程
- Android中Handler消息机制浅谈
- Android-布局之FrameLayout
- 【操作系统】设备管理
- Java学习经验
- EditPlus编辑器使用
- Thinking in java 学习记录
- C语言之两矩阵乘法的实现
- MATLAB绘制空间域高斯函数
- hdu2680Choose the best route
- SQL基础知识(1)