.Net程序猿乐Android发展---(10)框架布局FrameLayout
帧布局FrameLayout中全部的控件都在界面的左上側,后绘制的空间会覆盖之前的控件。布局内控件以层叠方式显示,用在游戏开发方面可能多些.
1.层叠展示

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" > <TextView
android:layout_width="300dp"
android:layout_height="300dp"
android:text="游响云停工作室"
android:gravity="center"
android:background="#FFE4B5"
/> <TextView
android:id="@+id/textView1"
android:layout_width="150dp"
android:layout_height="120dp"
android:text="游响云停工作室"
android:gravity="center"
android:background="#D1EEEE"
/> <TextView
android:layout_width="100dp"
android:layout_height="50dp"
android:text="游响云停工作室"
android:gravity="center"
android:background="#EEB422"
/> </FrameLayout>
2.商品列表演示样例

<? xml version="1.0" encoding="utf-8"? >
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" > <ImageView
android:id="@+id/imageView1"
android:layout_width="100dp"
android:layout_height="100dp"
android:src="@raw/pad" /> <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="商品名称:Ipad Air"
android:layout_marginLeft="120dp"
android:layout_marginTop="10dp"
/> <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="商品金额:$20" android:layout_marginLeft="120dp"
android:layout_marginTop="40dp"
/> <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="商品颜色:白色"
android:layout_marginLeft="120dp"
android:layout_marginTop="70dp"
/> <TextView
android:layout_width="fill_parent"
android:layout_height="3dp"
android:text=""
android:layout_marginLeft="0dp"
android:layout_marginTop="110dp"
android:background="#D1EEEE"
/> <ImageView
android:id="@+id/imageView2"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_marginTop="120dp"
android:src="@raw/pad" /> <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="商品名称:Ipad Air"
android:layout_marginLeft="120dp"
android:layout_marginTop="140dp"
/> <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="商品金额:$20" android:layout_marginLeft="120dp"
android:layout_marginTop="170dp"
/> <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="商品颜色:白色"
android:layout_marginLeft="120dp"
android:layout_marginTop="200dp"
/> <TextView
android:layout_width="fill_parent"
android:layout_height="3dp"
android:text=""
android:layout_marginLeft="0dp"
android:layout_marginTop="220dp"
android:background="#D1EEEE"
/> </FrameLayout>
版权声明:本文博客原创文章。博客,未经同意,不得转载。
.Net程序猿乐Android发展---(10)框架布局FrameLayout的更多相关文章
- .Net程序猿乐Android发展---(1)环境结构
对于没有接触Android人才发展,你可能会觉得Android更难以发展.接下来的一段时间,我们将了解Android开发的详细细节,主要是面对.NET程序猿,来看看.NET程序猿如何进行Android ...
- .Net程序猿乐Android开发---(4)注册页面布局
接下来我们介绍的登陆页面布局,在本节中,我们看一下注册页面布局,页面布局大同小异,来一起熟悉下基本控件的使用方法. 效果图: 1.加入注冊页面 右键选中layout目录,加入注冊页面.例如以下图 点击 ...
- 框架布局FrameLayout
框架布局FrameLayout 一.简介 二.代码实例 结果图: 代码: 需要注意的代码: imageView_play.setVisibility(View.INVISIBLE); <Fram ...
- Android 自学之帧布局 FrameLayout
帧布局(FrameLayout)直接继承了ViewGroup组件: 帧布局容器为每一个加入其中的组件都创建了一个空白的区域,这个区域我们称之为一帧,所有每个组件都占据一帧,这些都会根据gravity属 ...
- Java程序猿必知的10个调试技巧
在本文中,作者将使用大家经常使用的的开发工具Eclipse来调试Java应用程序.但这里介绍的调试方法基本都是通用的,也适用于NetBeans IDE,我们会把重点放在运行时上面. 在開始之前,推荐大 ...
- Android 框架布局 FrameLayout
<?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android=" ...
- Android发展的一个重要方面Makefile分析
Android发展的一个重要方面Makefile分析 随着移动互联网的发展,移动开发也越来越吃香了.眼下最火的莫过于android.android是什么就不用说了,android自从开源以来,就受到非 ...
- 屌丝程序猿赚钱之道 之APP
假设你已经通过APP赚到了钱,那么本文对你而言没有意义.倒是希望你可以给我们诸多建议. 通过制作APP或者说手机应用赚钱,相信是非常多程序猿希望做的事情.也确实有一些人通过APP赚到了钱. 对于程序猿 ...
- CSDN日报20170401 ——《假设你还是“程序猿”,我劝你别创业!》
[程序人生]假设你还是"程序猿".我劝你别创业! 作者:北漂周 在IT这一行做得久了,会接触到无数让人哭笑不得的外行话. 「我们就差一个写代码的了」是当中典型的一种,之所以黑它.不 ...
随机推荐
- 使用 angular directive 和 json 数据 D3 随着标签 donut chart演示样本
使用angular resource载入中priorityData.json中间json数据,结合D3绘制甜甜圈图.执行index.html其结果见于图.: priorityData.json中jso ...
- php查找字符串是否存在
strstr //搜索字符串在另一字符串中的首次出现(对大小写敏感) //该函数返回字符串的其余部分(从匹配点).如未找到则返回 false stristr //查找字符串在另一字符串中第一次出现的位 ...
- oracle nologging用法(转)
一.oracle日志模式分为(logging,force logging,nologging) 默认情况是logging,就是会记录到redo日志中,force logging是强制记录日志,nolo ...
- 关于安装linux时要怎么分区的考虑的參考方式?
对于使用最小化安装的centos7文件夹列表,注意链接方式的文件夹会在统计占用空间时不会算入的; watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvcWlkaX ...
- HDU 3954 Level up(线段树)
HDU 3954 Level up 题目链接 题意:k个等级,n个英雄,每一个等级升级有一定经验,每次两种操作,一个区间加上val,这样区间内英雄都获得当前等级*val的经验,还有一个操作询问区间经验 ...
- MATLAB导入数据importdata功能
用load函数导入mat文件大家都会.可是今天我拿到一个数据,文件后缀名竟然是'.data'.该怎么读呢? 我仅仅好用matlab界面Workspace区域的"import data&quo ...
- ZOJ 2680 Clock()数学
主题链接:problemId=1680" target="_blank">http://acm.zju.edu.cn/onlinejudge/showProblem ...
- 【原创】leetCodeOj --- Interleaving String 解题报告
题目地址: https://oj.leetcode.com/problems/interleaving-string/ 题目内容: Given s1, s2, s3, find whether s3 ...
- html 格式的email 编辑
本篇文章只讲如何编辑html格式的email 模板,并不讲述如何用程序发送email. 1.做email的重要思想:“复古” 抛弃现代化的div+css技术,回到html4.0+table的时代.少用 ...
- hdu 1171 Big Event in HDU(母函数)
链接:hdu 1171 题意:这题能够理解为n种物品,每种物品的价值和数量已知,现要将总物品分为A,B两部分, 使得A,B的价值尽可能相等,且A>=B,求A,B的价值分别为多少 分析:这题能够用 ...