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. STM32随记

    定时器(Timer): 分为高级,通用,基本三种. M3:8个 高级:TIM1,TM8 通用:TIM2~TIM5 基本:TIM6,TIM7 M0:8个 高级:TIM1 通用:TIM2,TIM3,TIM ...

  2. linux平台上面python调用c

    不能免俗,先打印个helloworld出来,c代码的函数 hello.c #include <stdio.h> int helloworld() { printf("hello ...

  3. mongodb常用命令【转】

    mongodb由 C++编写,其名字来自humongous这个单词的中间部分,从名字可见其野心所在就是海量数据的处理.关于它的一个最简洁描述为:scalable, high-performance, ...

  4. [译]36 Days of Web Testing(六)

    Day 30 Test in situ  真实场景下的测试 为什么? 我十分推崇现场测试,简单讲就是要在你的站点或应用真实使用的场景下进行测试.但随着人口增长,对于"真实场景"的定 ...

  5. PyCharm如何设置显示行号?

    File->setting->Editor->General->Appearance,勾选Show line numbers

  6. c语言技巧--长期更新

    1.   #define LOWER(c)            (unsigned char)(c | 0x20) 换成小写 2.   gcc -Wall -Werror //告警当成 错误来处理 ...

  7. require 书写约定

    使用 Sea.js 书写模块代码时,需要遵循一些简单规则. 只是书写和调试时的规范!!!构建后的代码完全不需要遵循下面的约定!!!!!! 1. 正确拼写 模块 factory 构造方法的第一个参数 必 ...

  8. 当我们在谈论 DevOps,我们在谈论什么?

    Cloud Insight 携手 BearyChat:打造适合运维人员的团队协作工具 走过 C 轮的 OneAPM,旗下的产品已经日渐丰满,从应用性能监控的 Application Insight 到 ...

  9. ubuntu下virtualbox使用u盘

    1.virtualbox中使用u盘流程 以下是使用U盘的整个流程(参考了网络上其他人的教程,亲测可用): 添加当前用户为vboxusers一员 终端输入:cat /etc/group |grep vb ...

  10. View的getLeft, getRight, getTop, getBottom

    View的getLeft, getRight, getTop, getBottom方法得到的分别是相对于其父组件原点坐标不同方向的距离 网上找了张图说明: 其中right和left的计算方法如下: r ...