.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这一行做得久了,会接触到无数让人哭笑不得的外行话. 「我们就差一个写代码的了」是当中典型的一种,之所以黑它.不 ...
随机推荐
- U10vim程序编辑器
vim需要多加练习. 1.你可以将vim视为vi的高级版本.vi分成三种模式:一般模式,编辑模式和命令行模式. 一般模式:以vi打开一个文件就直接进入一般模式了(这也是默认的模式).在这个模式中,你可 ...
- BZOJ 1109 POI2007 堆积木Klo LIS
题目大意:给定一个序列,能够多次将某个位置的数删掉并将后面全部数向左串一位,要求操作后a[i]=i的数最多 首先我们如果最后a[i]=i的数的序列为S 那么S满足随着i递增,a[i]递增(相对位置不变 ...
- C#区域截图——调用API截图
原文:C#区域截图——调用API截图 前言:截图对于一个C++开发者来说无非是小菜一碟,也有朋友使用C#的 Graphics.CopyFromScreen 方法屏幕操作,作为一名整天想着用 C++ 开 ...
- cocos2dx移植android平台
本人这几天一直都没有跟新自己的网站内容,问我干什么去了,当然是做这篇文章做的事了,说起这个移植来真是麻烦啊,网上试验了各种方法,都不知道谁对谁错啊.不过经过本人这三天的研究最后终于成功了,为了让大家少 ...
- poj3694(动态询问割桥的数目)
给我们一个图,然后有q次加边的操作,问每次加完边之后有多少个桥存在 首先用dfs求出所有的桥,然后dfs的过程中生成了一棵dfs树,该树有的边是桥,有的不是,用bridge[v] = true , 表 ...
- 黄聪:Microsoft Enterprise Library 5.0 系列教程(八) Unity Dependency Injection and Interception
原文:黄聪:Microsoft Enterprise Library 5.0 系列教程(八) Unity Dependency Injection and Interception 依赖注入容器Uni ...
- hdu 4891---水的问题 但WA非常多
这个问题是在一个坑----即使在使用long long 这将是超出范围 自己显得很长的时间去阅读很多次的称号仍然没想到 当时的想法是要记住----无论如何,我用long long 已经最大范围.当然 ...
- 新浪微博。。openapi 分享 图画+ 写作
新浪微博困难啊 .. . .. .郁闷死了. .在此记录它 1.使用界面:https://api.weibo.com/2/statuses/upload_url_text.json 能够申请,.高级权 ...
- CSDN挑战编程——《金色十月线上编程比赛第二题:解密》
金色十月线上编程比赛第二题:解密 题目详情: 小强是一名学生, 同一时候他也是一个黑客. 考试结束后不久.他吃惊的发现自己的高等数学科目竟然挂了,于是他果断入侵了学校教务部站点. 在入侵的过程中.他发 ...
- POJ 2914 Minimum Cut 最小割图论
Description Given an undirected graph, in which two vertices can be connected by multiple edges, wha ...