android *** Layout 01
来源:互联网 发布:数据分析师笔试逻辑 编辑:程序博客网 时间:2024/06/14 23:50
学习了android xml的线性布局
<?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" <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:background="#CCCCCC" android:layout_gravity="center_vertical" android:gravity="center" > <Button android:id="@+id/button1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Button" /> </LinearLayout></LinearLayout>
其中layout_width与layout_height可用 match_parent与wrap_content,第一个是view的比例大小适合父类的大小,第二种是大小刚好适合内容的大小。
android:orientation是说线性布局的对齐模式是垂直还是水平,一个LinearLayout里可以嵌套多个LinearLayout。
layout_gravity来说明布局的位置,gravity来说明布局中内容在布局中的位置。
大概就酱。
0 0
- android *** Layout 01
- android layout
- android layout
- Android Layout
- Android Layout
- Android Layout
- android layout
- android layout
- Android Layout
- Android Layout
- android : Layout
- android layout
- Android UI Design 01 : 基本布局 Layout
- android layout / android textsize
- <include layout="@*android:layout/preference_list_settings_header" />
- Android Layout研究 <二> Layout进阶
- Android开发系列之Layout&Layout属性
- Android Layout 之 RelativeLayout
- 缓存技术总览
- 实例浅关-自增自减
- android TP(触摸屏)问题现象分析和解决方案汇总
- SQLite事务示例
- Linq to SQL 中datetime 和string转换
- android *** Layout 01
- hdoj 4411 Arrest 【费用流 + 最短路】
- LeetCode Best Time to Buy and Sell Stock II C 4ms
- leetcode系列(73)Insertion Sort List
- 王学岗Fragment(五)
- hdu 2544最短路(Dijkstra)
- 数据结构(寒假小结)--3.3串
- ajax与Jquery中的Ajax
- python 模块(module)基础讲解