.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这一行做得久了,会接触到无数让人哭笑不得的外行话. 「我们就差一个写代码的了」是当中典型的一种,之所以黑它.不 ...
随机推荐
- 图像库---Image Datasets---OpenSift源代码---openSurf源代码
1.Computer Vision Datasets on the web http://www.cvpapers.com/datasets.html 2.Dataset Reference http ...
- matlab secant method
% Matlab script to illustrate the secant method % to solve a nonlinear equation % this particular sc ...
- 初窥Linux 之 文件权限
一.用户与用户组 为了更好地理解文件权限,我们需要先有用户和用户组的概念.因为在Linux里面,任何一个文件都具有“User(用户).Group(用户组)及Others(其他用户)”3种身份的个别权限 ...
- Nginx 防CC攻击拒绝代理访问
先大概说说简单的结构…前端一个Nginx反向代理,后端一个Nginx instance app for PHP…实际上就是个Discuz,之前面对CC攻击都是预警脚本或者走CDN,但是这次攻击者不再打 ...
- [java面试题]最长的回文字符串中出现确定
<span style="font-family: Arial, Helvetica, sans-serif;">package com.wzw.util;</s ...
- 第1周 SQL Server 如何执行一个查询
原文:第1周 SQL Server 如何执行一个查询 大家好,欢迎来到第1周的SQL Server性能调优培训.在我们进入SQL Server性能调优里枯燥难懂的细节内容之前,我想通过讲解SQL Se ...
- unrecognized selector sent to instance 0x10b34e810
一个错误: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSURLEr ...
- 希尔排序java
希尔排序简述 希尔排序是基于插入排序的以下两点性质而提出改进方法的: 插入排序在对几乎已经排好序的数据操作时,效率高,即可以达到线性排序的效率.(希尔排序先将部分数据进行排序,相当于已经部分排好序) ...
- Sliverlight实例之 绘制扇形和环形图
一,1道几何题 已知两点坐标确定一条直线,直线上存在一个未知点,起始点与未知点的距离已知 求:未知点坐标 思路,如下: 求AB长度,可以根据两点距离公式 二,写个C#类 定义一个Point类,代表坐标 ...
- iOS 真机调试(最具体的步骤来解决历史,hmt精心打造)
/*************************************************************1************************************* ...