Android layout_width和layout_weight组合之后呈现的视图
来源:互联网 发布:淘宝的直通车怎么开 编辑:程序博客网 时间:2024/05/16 05:17
Android layout_width和layout_weight组合之后呈现的视图
Case Summary
注:如下Case Detail截图都是ADT预览效果,非真实手机或模拟器运行效果。如有错误,请各位读者斧正。
Case Detail
Case01:
<?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="horizontal" > <TextView android:id="@+id/text1" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="2" android:background="#FFFF00" android:text="@string/text1" /> <TextView android:id="@+id/text2" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1" android:background="#0000FF" android:text="@string/text2" /></LinearLayout>
Case02:
<?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="horizontal" > <TextView android:id="@+id/text1" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_weight="2" android:background="#FFFF00" android:text="@string/text1" /> <TextView android:id="@+id/text2" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1" android:background="#0000FF" android:text="@string/text2" /></LinearLayout>
Case03:
<?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="horizontal" > <TextView android:id="@+id/text1" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="2" android:background="#FFFF00" android:text="@string/text1" /> <TextView android:id="@+id/text2" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_weight="1" android:background="#0000FF" android:text="@string/text2" /></LinearLayout>
Case04:
<?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="horizontal" > <TextView android:id="@+id/text1" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_weight="2" android:background="#FFFF00" android:text="@string/text1" /> <TextView android:id="@+id/text2" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_weight="1" android:background="#00FFFF" android:text="@string/text2" /></LinearLayout>
Case01 Case02
Case03 Case04
Case05:
<?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="horizontal" > <TextView android:id="@+id/text1" android:layout_width="0dip" android:layout_height="match_parent" android:layout_weight="2" android:background="#FFFF00" android:text="@string/text1" /> <TextView android:id="@+id/text2" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1" android:background="#00FFFF" android:text="@string/text2" /></LinearLayout>
Case06:
<?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="horizontal" > <TextView android:id="@+id/text1" android:layout_width="0dip" android:layout_height="match_parent" android:layout_weight="2" android:background="#FFFF00" android:text="@string/text1" /> <TextView android:id="@+id/text2" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_weight="1" android:background="#00FFFF" android:text="@string/text2" /></LinearLayout>
Case07:
<?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="horizontal" > <TextView android:id="@+id/text1" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="2" android:background="#FFFF00" android:text="@string/text1" /> <TextView android:id="@+id/text2" android:layout_width="0dip" android:layout_height="match_parent" android:layout_weight="1" android:background="#00FFFF" android:text="@string/text2" /></LinearLayout>
Case08:
<?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="horizontal" > <TextView android:id="@+id/text1" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_weight="2" android:background="#FFFF00" android:text="@string/text1" /> <TextView android:id="@+id/text2" android:layout_width="0dip" android:layout_height="match_parent" android:layout_weight="1" android:background="#00FFFF" android:text="@string/text2" /></LinearLayout>
Case05 Case06
Case07 Case08
Case09:
<?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="horizontal" > <TextView android:id="@+id/text1" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="2000" android:background="#FFFF00" android:text="@string/text1" /> <TextView android:id="@+id/text2" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1" android:background="#00FFFF" android:text="@string/text2" /></LinearLayout>
Case10:
<?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="horizontal" > <TextView android:id="@+id/text1" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_weight="2000" android:background="#FFFF00" android:text="@string/text1" /> <TextView android:id="@+id/text2" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1" android:background="#00FFFF" android:text="@string/text2" /></LinearLayout>
Case11:
<?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="horizontal" > <TextView android:id="@+id/text1" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="2000" android:background="#FFFF00" android:text="@string/text1" /> <TextView android:id="@+id/text2" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_weight="1" android:background="#00FFFF" android:text="@string/text2" /></LinearLayout>
Case12:
<?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="horizontal" > <TextView android:id="@+id/text1" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_weight="2000" android:background="#FFFF00" android:text="@string/text1" /> <TextView android:id="@+id/text2" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_weight="1" android:background="#00FFFF" android:text="@string/text2" /></LinearLayout>
Case09 Case10
Case11 Case12
Case13:
<?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="horizontal" > <TextView android:id="@+id/text1" android:layout_width="0dip" android:layout_height="match_parent" android:layout_weight="2000" android:background="#FFFF00" android:text="@string/text1" /> <TextView android:id="@+id/text2" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1" android:background="#00FFFF" android:text="@string/text2" /></LinearLayout>
Case14:
<?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="horizontal" > <TextView android:id="@+id/text1" android:layout_width="0dip" android:layout_height="match_parent" android:layout_weight="2000" android:background="#FFFF00" android:text="@string/text1" /> <TextView android:id="@+id/text2" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_weight="1" android:background="#00FFFF" android:text="@string/text2" /></LinearLayout>
Case15:
<?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="horizontal" > <TextView android:id="@+id/text1" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="2000" android:background="#FFFF00" android:text="@string/text1" /> <TextView android:id="@+id/text2" android:layout_width="0dip" android:layout_height="match_parent" android:layout_weight="1" android:background="#00FFFF" android:text="@string/text2" /></LinearLayout>
Case16:
<?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="horizontal" > <TextView android:id="@+id/text1" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_weight="2000" android:background="#FFFF00" android:text="@string/text1" /> <TextView android:id="@+id/text2" android:layout_width="0dip" android:layout_height="match_parent" android:layout_weight="1" android:background="#00FFFF" android:text="@string/text2" /></LinearLayout>
Case13 Case14
Case15 Case16
- Android layout_width和layout_weight组合之后呈现的视图
- Android layout_width和layout_weight关系
- layout_width和layout_weight的区别
- layout_weight和layout_width/layout_height的结合
- Android布局中Layout_weight与layout_width、orientation
- Android的android:width和android:layout_width
- 关于android:layout_weight= android:layout_width android:layout_height android:gravity的问题
- android:layout_width和android:width的区别
- Android中的layout_width和width的区别
- Android中的layout_width和width的区别
- 关于Android UI组件LinearLayout属性layout_weight与layout_width/height的问题
- 关于Android UI组件LinearLayout属性layout_weight与layout_width/height的问题
- LinearLayout布局中Layout_weight的深刻理解-为何需设置android:layout_width="0dp"
- LinearLayout布局中Layout_weight的深刻理解-为何需设置android:layout_width="0dp"
- 3.addView调用之后导致子布局的android:layout_width="match_parent"属性或者 android:layout_width="fll_parent"属性无效。
- android:layout_width="wrap_content"让android:layout_weight="1"无效
- android:layout_width="0dp", android:layout_weight="1"
- layout_width与layout_weight
- 哈夫曼树 C语言实现
- linux自旋锁和互斥体
- Java序列化与反序列化
- 8.HTML5 CSS3 变形与动画相关属性
- 黑马程序员------------------代理类和AOP
- Android layout_width和layout_weight组合之后呈现的视图
- linux 的date命令及系统时间设置
- linux下解压命令大全
- 仿射变换
- 小兔的棋盘
- 类图(Class Diagram)模型
- 《Thinking In Algorithm》03.数据结构之数组
- 内核链表和普通链表的区别
- Ubuntu12.04LTS ARM9开发环境