<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#FFFFCC"
android:orientation="vertical"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.rhythmk.app.MainActivity$PlaceholderFragment" > <!--
wap_content :包裹实际文本宽度, match_parent: 铺满父类容器, fill_parent:铺满父类容器 --> <Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="按钮1" /> <Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="按钮2" /> <Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="按钮3" /> <LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#CCCC66"
android:orientation="horizontal" > <Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="按钮01" /> <Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="按钮02" /> <Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="按钮03" />
</LinearLayout> <RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#99CC66"
android:orientation="horizontal" > <Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="按钮11" /> <Button
android:id="@+id/btn12"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="150sp"
android:layout_marginTop="50sp"
android:text="按钮12" /> <Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="60sp"
android:layout_marginTop="50sp"
android:layout_toRightOf="@+id/btn12"
android:text="按钮13" />
</RelativeLayout> <TableLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#9933CC"
android:shrinkColumns="1"
android:stretchColumns="0,1,2" > <Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="独立行" /> <TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" > <Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="按钮21" /> <Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="按钮22" /> <Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="按钮22" />
</TableRow> <TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" > <Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="按钮31" /> <Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_column="2"
android:text="我可以自动延生" />
</TableRow>
</TableLayout> <FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#0033CC"
android:padding="20px" > <Button
android:layout_width="250px"
android:layout_height="150px"
android:background="#330033"
android:text="FrameLayout001" /> <Button
android:layout_width="250px"
android:layout_height="150px"
android:layout_marginLeft="100sp"
android:layout_marginTop="80sp"
android:background="#990066"
android:text="FrameLayout002" />
</FrameLayout> </LinearLayout>

android 学习 之 布局(下)LinearLayout,RelativeLayout,TableLayout,FrameLayout的更多相关文章

  1. Android学习5—布局简介

    Android界面的布局主要有四种,分别为RelativeLayout.LinearLayout.TableLayout.FrameLayout,接下来分别介绍这些布局如何使用(为了简单起见,接下来的 ...

  2. android 学习Layout布局的使用

    android 常用布局 LinearLayout(线性布局) 线性的 垂直的 水平的RelativeLaytout(相对布局) 最灵活的TableLayout(表格布局) 使用GridView代替A ...

  3. android 学习 之 布局(上)

    学习安卓布局前,先了解三个属性值: 1.fill_parent: 设置一个构件的布局为fill_parent将强制性地使构件扩展,以填充布局单元内尽可能多的空间 2.match_parent: And ...

  4. Android四种基本布局(LinearLayout \ RelativeLayout \ FrameLayout \ TableLayout)

    ------------------------------------------LinearLayout---------------------------------------------- ...

  5. Android学习之——ListView下拉刷新

    背景知识 ListView使用非常广泛,对于使用ListView的应用来说,下拉刷新是必不可少要实现的功能. 我们常用的微博.网易新闻,搜狐新闻都使用了这一功能,如下图所示.     微博 搜狐新闻 ...

  6. Android学习----五大布局

    1.LinearLayout 线性布局 android:orientation="horizontal" 制定线性布局的排列方式 水平 horizontal 垂直 vertical ...

  7. Android学习笔记—Windows下NDK开发简单示例

    该示例假设Android开发环境已经搭建完成,NDK也配置成功: 1.在Eclipse上新建Android工程,名称为ndkdemo.修改res\layout\activity_main.xml &l ...

  8. 【Android学习】Windows下Android环境搭建

    一.  JDK下载配置 直接百度,很简单. 二.android JDK下载配置 1.进入下载官网(需要FQ):https://developer.android.com/studio/index.ht ...

  9. Android学习笔记02-Mac下编译java代码

    在Mac OS上配置JDK 1.7. 一 下载 Mac版本的JDK1.7 从以下下载地址,下载Mac版本的JDk1.7 安装文件 jdk-7u79-macosx-x64.dmg. http://www ...

随机推荐

  1. Filter实现session超时自动跳转到login页,超过试用期不许登录

    新建一个过滤器 package com.autumn.filter; import com.autumn.pojo.Users; import javax.servlet.*; import java ...

  2. delphi文件操作的总结

    csfinal90我的:收件箱资源博客空间设置|帮助|退出 首页 业界 移动 云计算 研发 论坛 博客 下载 更多 windzb的专栏 目录视图 摘要视图 订阅 IT俱乐部创始人杜鸿飞专访       ...

  3. Zynq软硬件协同设计 总结一

    1.Xilinx在2012年推出了新一代的开发工具Vivado开发套件,目前的7系列FPGA既可以用以往的ISE或者XPS进行开发,也可以使用Vivado(为瓦度),而6系列等以前的产品智能使用ISE ...

  4. 记一次git fatal: Unable to find remote helper for 'https'问题的解决

    登陆到远程linux服务器上,使用git, clone的时候报“fatal: Unable to find remote helper for 'https'”错,没管,绕过,使用git clone ...

  5. [笔记] linux中的计划任务crontab

    不能拒绝进步 cron来源于希腊单词chronos(意为"时间"),指linux系统下一个自动执行指定任务的程序(计划任务). 1--crontab 的命令选项 #crontab ...

  6. CI框架------codeIgniter

    之前学习了thinkphp,学完之后印象不太深刻,在网上询问了一下,他们都说多学几个框架,以后可以自己写框架. 于是自己就放下thinkphp,下定决心再学一个,于是又从网上看了几个框架,综合比较了一 ...

  7. test20181019 B君的第一题

    题意 分析 考场做法同标解. 画图模拟分析发现,无论操作顺序怎样,操作数的奇偶性是不变的. 所以等同求出,以每点为根的操作数奇偶性. 用\(f(x)\)表示x及其子树中的边,包括x到它fa的边,将他们 ...

  8. USB gadget学习笔记

    1.usb-OTG-ADP-HNP-SRP https://blog.csdn.net/xiongjiao0610/article/details/44150849

  9. flow flow-typed 定义简单demo

    flow-typed 安装 全局 npm install -g flow-typed 测试代码 一个简单全局函数 目录根目录 flow-typed userLibDef.js declare func ...

  10. 使用树莓派制作一套“NAS+私有云盘+下载机”

    ‍ ‍‍原创作者:HackLiu‍‍ ‍ 0×00 前言 ‍‍如果你家里有多台设备需要联网需要娱乐,你一定会或多或少遇到设备碎片化带来的烦恼.当然,已经有很多厂商包括新晋的小米.360在内的互联网公司 ...