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的更多相关文章

  1. Android中帧布局-FrameLayout和网格布局-GridLayout

    帧布局-FrameLayout 一.概念 帧布局中,容器为每个加入其中的空间创建一个空白的区域(成为一帧).每个空间占据一帧,这些帧会按gravity属性自动对齐. 帧布局的效果是将其中的所有空间叠加 ...

  2. Android课程---帧布局 FrameLayout

    帧布局的特点是: 1.多个组件,层叠显示 2.所占位置和大小由组件决定 示例代码: <?xml version="1.0" encoding="utf-8" ...

  3. 控件布局_FrameLayout(网格布局)

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

  4. Android 自学之帧布局 FrameLayout

    帧布局(FrameLayout)直接继承了ViewGroup组件: 帧布局容器为每一个加入其中的组件都创建了一个空白的区域,这个区域我们称之为一帧,所有每个组件都占据一帧,这些都会根据gravity属 ...

  5. .Net程序猿乐Android发展---(10)框架布局FrameLayout

    帧布局FrameLayout中全部的控件都在界面的左上側,后绘制的空间会覆盖之前的控件.布局内控件以层叠方式显示,用在游戏开发方面可能多些. 1.层叠展示                 以下这个样例 ...

  6. Android 基于帧布局实现一个进度条 FrameLayout+ProgressBar

    在FrameLayout中添加一个ProgressBar居中 <ProgressBar android:layout_gravity="center" android:id= ...

  7. Android——布局(线性布局linearLayout,表格布局TableLayout,帧布局FrameLayout)

    线性布局: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:androi ...

  8. Android 框架布局 FrameLayout

    <?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android=" ...

  9. android五种布局模式

    Android布局是应用界面开发的重要一环,在Android中,共有五种布局方式,分别是:LinearLayout (线性布局),FrameLayout(框架布局),AbsoluteLayout(绝对 ...

随机推荐

  1. C# C/S系统开发平台版本区别

    各版本功能区别   C/S系统开发框架-企业版 V4.0 (Enterprise Edition) 简介: http://www.csframework.com/cs-framework-4.0.ht ...

  2. uboot环境变量初始化

    一.环境变量概述 1.环境变量的概念 可以理解为用户对软件的全局配置信息,这部分信息应该可以从永久性存储器上读取,能被查询,能被修改. 启动过程中,应该首先把环境变量读取到合适的内存区域,然后利用环境 ...

  3. C# 下载资源

    //创建一个初始化请求对象 HttpWebRequest request = (HttpWebRequest)WebRequest.Create(new Uri("http://wwww.b ...

  4. windows下端口被占用的解决方法

    1:打开CMD输入:netstat -ano | findstr "80" 找到PID: 2:查看应用名称:tasklist | findstr "2544" ...

  5. Android 中的MVC与数据流动

    今天看了一个Android的Training生命周期转换的例子,顿觉得他的设计非常巧妙,我的分析如下: 1.在com.example.android.lifecycle包中有: 3个正常的全屏acti ...

  6. bzoj2131

    首先不难想到对t排序,有f[i]=max(f[j])+v[i] tj<=ti且abs(pi-pj)/2<=ti-tj;要想优化,肯定从优化转移入手先去绝对值,当pi>=pj时,可得2 ...

  7. activiti集成drools实验

    无代码,无真相. 网上的博客代码,都挺片段的.所以,我想找个现成的demo实验代码. 上github ------------------------------------------------- ...

  8. 【转】MFC界面更新实现方法

    原文网址:http://www.cnblogs.com/skywatcher/p/3572311.html 1.更新窗口 即采用UpdateWindow()函数立即发送WM_PAINT消息更新整个窗口 ...

  9. 【转】模拟器上安装googleplay apk

    原文网址:http://blog.sina.com.cn/s/blog_9fc2ff230101gv57.html 1.进入到sdk\android-sdk-windows\tools>目录下: ...

  10. C++中new和malloc

    1.malloc的工作原理: malloc使用一个数据结构(链表)来维护分配空间链表的构成:分配的空间/上一个空间的数据/下一个空间/空间大小等信息.    对malloc分配的空间不要越界访问,因为 ...