android__常见布局
来源:互联网 发布:红旗linux系统 编辑:程序博客网 时间:2024/06/05 02:27
RelativeLayout
相布局:可以设置位置,通过layout_marginLeft、layout_marginTop等
AbsoluteLayout
绝对布局:可以任意放置,通过layout_x 和layout_y
FrameLayout
帧布局:一层一层的悬浮在界面上,如暂停按钮
LinearLayout
线性布局:自上而下或自左向右,控件没有对齐设置
TableLayout
表格布局:一行一行的
<TableRow android:layout_width="match_parent" android:layout_height="wrap_content" > <!-- layout_weight:表示权重,权重一样大的平分屏幕宽度 gravity:文本局中 --> <TextView android:layout_weight="1" android:gravity="center" android:layout_width="0dip" android:layout_height="wrap_content" android:text="哈哈" /> <TextView android:layout_weight="1" android:gravity="center" android:layout_width="0dip" android:layout_height="wrap_content" android:text="嘎嘎" /> </TableRow>
集合布局:
<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <Button android:id="@+id/button2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Button" /> <Button android:id="@+id/button1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Button" /> <Button android:id="@+id/button3" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Button" /></LinearLayout>
0 0
- android__常见布局
- Android__基础
- 常见布局
- Android__数据存储
- android__实践(登陆界面)
- 常见的布局
- EXTJS 常见布局
- 常见的布局
- 常见的css布局
- Android常见布局简述
- android 常见布局方式
- 常见的布局
- Android常见布局使用
- Android常见布局问题
- css常见布局问题
- 【Android-002】【常见布局】
- 常见 门户布局
- 常见UI布局
- [持续更新]HTML5学习笔记(四)
- 解决ViewPager.setCurrentItem不能实现平滑移动
- Android UI之最优ListView写法
- 初学python,模拟转账
- get、put、post、delete含义与区别
- android__常见布局
- Android接口回调,最简单的理解方式
- LeetCode 9_Palindrome Number
- UIStepper控件详解
- Python游戏引擎开发(二):创建窗口以及重绘界面
- Nginx and PHP-FPM Configuration and Optimizing Tips and Tricks
- Spring DAO vs Spring ORM vs Spring JDBC
- 使用Maven
- 华为机试之含23数字排序输出