Android布局方式(AbsoluteLayout)学习
来源:互联网 发布:文明6中文版mac下载 编辑:程序博客网 时间:2024/05/23 14:36
AbsoluteLayout 可以让子元素指定准确的x/y坐标值,并显示在屏幕上。(0, 0) 为左上角,当向下或向右移动时,
坐标值将变大 AbsoluteLayout 没有页边框,允许元素之间互相重叠.这种布局方式不推荐使用,刚性太强,在不同的界面上
的效果会不同.
代码演示:
<AbsoluteLayout 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" tools:context=".MainActivity" android:background="@color/bgcolor" > <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="用户名:" android:textColor="@color/white" android:textSize="22sp" android:typeface="monospace" android:layout_x="40dip" android:layout_y="60dip" /> <EditText android:width="160dip" android:height="35dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_x="120dip" android:layout_y="60dip" android:textColor="@color/gray" android:scrollHorizontally="false" android:background="@color/white"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="密 码:" android:textColor="@color/white" android:textSize="22sp" android:typeface="monospace" android:layout_x="40dip" android:layout_y="100dip" /> <EditText android:width="160dip" android:height="35dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_x="120dip" android:layout_y="100dip" android:password="true" android:textColor="@color/gray" android:scrollHorizontally="false" android:background="@color/white"/> <Button android:text="登录" android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_x="130dip" android:layout_y="140dip"/> <Button android:text="注册" android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_x="200dip" android:layout_y="140dip"/> </AbsoluteLayout>截图:
- Android布局方式(AbsoluteLayout)学习
- android学习笔记(7)AbsoluteLayout+FrameLayout+RelativeLayout+TableLayout四大布局方式
- Android学习(十四)五布局之绝对布局AbsoluteLayout
- Android学习-五布局之绝对布局(AbsoluteLayout)
- Android中常用的五种布局方式:AbsoluteLayout
- android布局------AbsoluteLayout(布局)详解
- Android学习笔记15:绝对布局管理器AbsoluteLayout
- Android学习第四天之AbsoluteLayout绝对布局
- Android学习笔记——五大基本布局+AbsoluteLayout
- Android学习笔记(16):绝对布局AbsoluteLayout、常用距离单位
- 绝对布局AbsoluteLayout学习笔记
- android 开发布局之AbsoluteLayout
- Android绝对布局管理器AbsoluteLayout
- Android AbsoluteLayout布局(绝对布局)
- Android布局(5)--绝对布局(AbsoluteLayout)
- AbsoluteLayout布局
- AbsoluteLayout布局
- AbsoluteLayout布局
- jquery.ajax和http servlet响应
- 写jsp注释应该注意的事项
- Hbase Shell 命令官方详解
- Window下Unicode字符与多字节字符的转换方法
- JSP页面与后台传值问题
- Android布局方式(AbsoluteLayout)学习
- Android服务器端和客户端设计APK升级
- HTML5七大传说
- 程序员接私活经验总结,来自csdn论坛语录
- IOS之文件夹创建、删除,图片在本地的保存和加载
- Oracle数据字典
- (转)【iOS-cocos2d-X 游戏开发之十】自定义CCSprite/Layer/CCNode及静态类模版&自定义类细节说明&Cocos2dx触屏事件讲解
- 计算机经典书籍(转载)
- MMC卡驱动分析