android 05 桢布局:FrameLayout 网格布据 GridLayout

xml文件:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"> <ImageView
android:layout_width="128dp"
android:layout_height="128dp"
android:src="@drawable/p03"/> 图片
<ImageView
android:layout_width="64dp"
android:layout_height="64dp"
android:src="@drawable/p02"/>
<ImageView
android:layout_width="32dp"
android:layout_height="32dp"
android:src="@drawable/p01"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="20sp"
android:textColor="#000"
android:text="查看图片"
android:layout_gravity="bottom|center_horizontal"/>
</FrameLayout>
网格布局:GridLayout
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" > <GridLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:columnCount="5" 跨列
android:orientation="horizontal" > <TextView android:text="用户名" /> <EditText
android:layout_columnSpan="4" 跨行
android:layout_gravity="fill_horizontal"
android:hint="2-10个字符" /> <TextView android:text="密 码" /> <EditText
android:layout_columnSpan="4"
android:layout_gravity="fill_horizontal"
android:hint="2-10个字符" />
</GridLayout> <GridLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:columnCount="5"
android:orientation="horizontal"
android:layout_marginTop="20dp"> <Button
android:text="不"
android:visibility="invisible" /> <Button
android:background="@drawable/btn_bg"
android:drawableLeft="@drawable/login32x32"
android:text="登陆"
android:textColor="#fff"/> <Button
android:text="不"
android:visibility="invisible" /> <Button
android:background="@drawable/btn_bg"
android:drawableLeft="@drawable/exit32x32"
android:text="退出"
android:textColor="#fff"/> <Button
android:text="不"
android:visibility="invisible"
/>
</GridLayout> </LinearLayout>
android 05 桢布局:FrameLayout 网格布据 GridLayout的更多相关文章
- Android中帧布局-FrameLayout和网格布局-GridLayout
帧布局-FrameLayout 一.概念 帧布局中,容器为每个加入其中的空间创建一个空白的区域(成为一帧).每个空间占据一帧,这些帧会按gravity属性自动对齐. 帧布局的效果是将其中的所有空间叠加 ...
- Android课程---帧布局 FrameLayout
帧布局的特点是: 1.多个组件,层叠显示 2.所占位置和大小由组件决定 示例代码: <?xml version="1.0" encoding="utf-8" ...
- 控件布局_FrameLayout(网格布局)
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools=&qu ...
- Android 自学之帧布局 FrameLayout
帧布局(FrameLayout)直接继承了ViewGroup组件: 帧布局容器为每一个加入其中的组件都创建了一个空白的区域,这个区域我们称之为一帧,所有每个组件都占据一帧,这些都会根据gravity属 ...
- .Net程序猿乐Android发展---(10)框架布局FrameLayout
帧布局FrameLayout中全部的控件都在界面的左上側,后绘制的空间会覆盖之前的控件.布局内控件以层叠方式显示,用在游戏开发方面可能多些. 1.层叠展示 以下这个样例 ...
- Android 基于帧布局实现一个进度条 FrameLayout+ProgressBar
在FrameLayout中添加一个ProgressBar居中 <ProgressBar android:layout_gravity="center" android:id= ...
- Android——布局(线性布局linearLayout,表格布局TableLayout,帧布局FrameLayout)
线性布局: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:androi ...
- Android 框架布局 FrameLayout
<?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android=" ...
- android五种布局模式
Android布局是应用界面开发的重要一环,在Android中,共有五种布局方式,分别是:LinearLayout (线性布局),FrameLayout(框架布局),AbsoluteLayout(绝对 ...
随机推荐
- pip assert_source_matches_version(self)版本验证报错Source in %s has version %s, which satisfies requirement %s的解决方式
在win8.1下为了安装flask模块,开始安装pip,结果发生了上篇博客里面的错误ntpath join(path, *paths) 发生UnicodeDecodeError.解决之后继续发现版本验 ...
- PDF抽取文字 C# with Adobe API
前提是PDF里面是有文字的! 一次性取得所有页内容: /// <summary> /// 改进前取得所有页的所有word /// </summary> /// <para ...
- 《深入剖析Tomcat》阅读(三)
这里要介绍下Tomcat的一个重要设计方法,Catalina设计方式. Servlet容器是一个复杂系统,但是,它有三个基本任务,对每个请求,servlet容器会为其完成以下三个操作: 1.创建一个R ...
- 2015_WEB页面前端工程师_远程测题_东方蜘蛛_1
请使用HTML+CSS实现如下效果: 1. 使用CSS Sprites,实现如图1效果,素材图片为: icons.png: 2. 使用脚本语言验证邮箱.密码的必填以及邮箱的合法性: 若验证失败,则出现 ...
- Web Adaptor重装配置时 提示已经配置成功的问题
环境 ArcGIS 10.1/10.2/10.3 Windwos 8.1 Tomcat 7.0.5 问题描述 较早之前在本机上安装配置过一个10.2.1版本的ArcGIS产品,包括桌面.Server和 ...
- 关于执行ST_Geometry的st_centroid函数时报ORA-28579错误的问题
环境 SDE版本:10./10.2/10.2.1/10.2.2 Oracle版本:11g R2 11.2.0.1 Windows版本:Windows Server 2008 R2 问题描述及原因 以全 ...
- 关于如何设置reduce的个数
在默认情况下,一个MapReduce Job如果不设置Reducer的个数,那么Reducer的个数为1.具体,可以通过JobConf.setNumReduceTasks(int numOfReduc ...
- prototype.js 源码解读(01)
prototype.js是一个设计的非常优雅且很有实用价值的js基础类库,其源码非常值得研究.研究它的源码不仅能提升个人水平,而且对你打下坚实的js基础也很有帮助.因本人技术水平有限,该解读仅供参考. ...
- 15个你不知道的杀手级Google Chrome功能
之前写过一篇我为什么使用Google Chrome浏览器,算是在使用了一段时间的Google Chrome后的一点粗浅认识,最近读到一篇文章15 Killer Google Chrome Featur ...
- 一些记录查询的SQL语句
-- ======================== 第三天 =========================== CREATE DATABASE php0408 CHARSET utf8 ;CR ...