Android布局_帧布局FrameLayout
一、FrameLayout布局概述
在这个布局中,所有的子元素都不能被指定放置的位置,他们统统放于这块区域的左上角,并且后面的子元素直接覆盖在前面的子元素之上,将前面的子元素部分和全部遮挡 如下面的效果:

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<TextView
android:id="@+id/textView1"
android:layout_width="300dp"
android:layout_height="300dp"
android:text="第一个页面"
android:background="#785435"
android:layout_gravity="center" />
<TextView
android:id="@+id/textView2"
android:layout_width="250dp"
android:layout_height="250dp"
android:text="第二个页面"
android:background="#658622"
android:layout_gravity="center" />
<TextView
android:id="@+id/textView3"
android:layout_width="150dp"
android:layout_height="150dp"
android:text="第三个页面"
android:background="#658789"
android:layout_gravity="center" />
<TextView
android:id="@+id/textView4"
android:layout_width="100dp"
android:layout_height="100dp"
android:text="第四个页面"
android:background="#679856"
android:layout_gravity="center" />
</FrameLayout>
二、加载进度或下载进度的案例
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<ProgressBar
android:layout_gravity="center"
android:id="@+id/progressBar1"
style="?android:attr/progressBarStyleLarge"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:layout_gravity="center"
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="80%" />
</FrameLayout>

Android布局_帧布局FrameLayout的更多相关文章
- Android线性布局和帧布局
第二次,本牛崽十分从容,今天咱们来讲讲Android Q之布局,我遇到的问题与自己学到的,大牛不要嘲笑哈,有错误可以指出来,本牛崽看到就改了. 今天我的学长跟我们开始了布局,布局看资料说好像有5种,又 ...
- 第24讲 UI_布局 之帧布局 表格布局 绝对布局
第24讲 UI_布局 之帧布局 表格布局 绝对布局 3. FrameLayout(帧布局) 帧布局是从屏幕的左上角(0,0)坐标开始布局,多个组件层叠排序,后一个组件总会将前一个组件所覆盖,除非最后一 ...
- Android 自学之帧布局 FrameLayout
帧布局(FrameLayout)直接继承了ViewGroup组件: 帧布局容器为每一个加入其中的组件都创建了一个空白的区域,这个区域我们称之为一帧,所有每个组件都占据一帧,这些都会根据gravity属 ...
- Android——布局(线性布局linearLayout,表格布局TableLayout,帧布局FrameLayout)
线性布局: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:androi ...
- Android -- UI布局管理,相对布局,线性布局,表格布局,绝对布局,帧布局
1. 相对布局 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmln ...
- CSS3_伸缩盒模型_弹性布局_等分布局_flex 布局
伸缩盒模型 CSS3 引入的布局模式 Flexbox 布局 主要思想: 让容器有能力让其子项目能够改变其宽度,高度,以最佳方式填充可用空间. 特点: display: flex; 只能控制其子元 ...
- Android布局_网格布局GirdLayout
自Android4.0版本后新增的GirdLayout网格布局(API 14) <?xml version="1.0" encoding="utf-8"? ...
- Android布局_表格布局TableLayout
一.TableLayout概述 TableLayout表格布局模型以行列的形式管理子控件,每一行为一个TableRow的对象,当然也可以是一个View的对象 二.TableLayout的全局属性 1 ...
- Android布局_相对布局RelativeLayout
一.RelativeLayout(相对布局)概述 RelativeLayout是相对布局控件,它包含的子控件将以控件之间的相对位置或者子类控件相对父类容器的位置的方式排列 二.RelativeLayo ...
随机推荐
- htmlnav
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- 20150618_Andriod _set Dialog_弹出式菜单
参考地址: http://blog.csdn.net/zhyl8157121/article/details/8169172 http://blog.csdn.ne ...
- JAVA基础知识之多线程——三种实现多线程的方法及区别
所有JAVA线程都必须是Thread或其子类的实例. 继承Thread类创建线程 步骤如下, 定义Thead子类并实现run()方法,run()是线程执行体 创建此子类实例对象,即创建了线程对象 调用 ...
- Windows上Python2.7安装Scrapy过程
需要执行: pip install scrapy pip install requests 在Windows下用pip安装Scrapy报如下错误,看错误提示就知道去http://aka.ms/vcpy ...
- if else 语句练习
一.if else 语句.
- Failed to run the WC DB work queue associated with 错误的解决
转载自 http://blog.csdn.net/alan00000/article/details/44084455 svn checkout 代码是出现如标题的错误,提示我clean up ,cl ...
- Spring 框架 详解 (一)
Spring是分层的JavaSE/EE full-stack(一站式) 轻量级开源框架 * 分层: * SUN提供的EE的三层结构:web层.业务层.数据访问层(持久层,集成层) * Struts2是 ...
- Example of Get_File_Name Function in Oracle Forms
Displays the standard open file dialog box where the user can select an existing file or specify a n ...
- sencha touch之store
store相当于数据库的表,是模型实例的集合.(是不是可以看成结构体数组) 可以对模型实例进行新建.更新.读取.删除.排序和过滤等操作. 创建store 由于store是表,必须要有模型或者定义字段, ...
- 字符串处理:ABAP中的正则表达式
声明:原创作品,转载时请注明文章来自SAP师太技术博客( 博/客/园www.cnblogs.com):www.cnblogs.com/jiangzhengjun,并以超链接形式标明文章原始出处,否则将 ...