码迷,mamicode.com
首页 > 移动开发 > 详细

Android开发之布局的学习

时间:2015-12-08 18:25:43      阅读:167      评论:0      收藏:0      [点我收藏+]

标签:

FrameLayout-帧布局

实现效果:

技术分享

代码:

 1 <?xml version="1.0" encoding="utf-8"?>
 2 <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
 3     android:layout_width="match_parent"
 4     android:layout_height="match_parent" >
 5     
 6     <TextView android:layout_width="300dp"
 7         android:layout_height="300dp"
 8         android:layout_gravity="center"
 9         android:background="#ff0000"/>
10     
11     <TextView android:layout_width="250dp"
12         android:layout_height="250dp"
13         android:layout_gravity="center"
14         android:background="#00ff00"/>
15     
16     <TextView android:layout_width="200dp"
17         android:layout_height="200dp"
18         android:layout_gravity="center"
19         android:background="#0000ff"/>
20     
21     <TextView android:layout_width="150dp"
22         android:layout_height="150dp"
23         android:layout_gravity="center"
24         android:background="#ffff00"/>
25     
26     <TextView android:layout_width="100dp"
27         android:layout_height="100dp"
28         android:layout_gravity="center"
29         android:background="#ffc0cb"/>
30     
31     <TextView android:layout_width="50dp"
32         android:layout_height="50dp"
33         android:layout_gravity="center"
34         android:background="#f8f8ff"/>
35 
36 </FrameLayout>

 

Android开发之布局的学习

标签:

原文地址:http://www.cnblogs.com/liyiran/p/5029659.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!