一:线性布局
LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/bac...
分类:
移动开发 时间:
2015-08-06 20:34:20
阅读次数:
131
一:xml布局文件控制UI界面
activity_main.xml
FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
Tex...
分类:
移动开发 时间:
2015-08-06 20:33:57
阅读次数:
164
效果图:布局代码:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_heigh...
分类:
其他好文 时间:
2015-08-03 17:00:47
阅读次数:
403
一个View添加点颜色就搞定了
android:layout_width="fill_parent"
android:layout_marginTop="10dp"
android:layout_height="1dp"
android:layout_marginLeft="5dp"
android...
分类:
移动开发 时间:
2015-08-02 23:29:23
阅读次数:
215
onMeasure()函数由ViewGroup调用子类的方法,因此值也是从这个ViewGroup中传入的
1、当我们设置自定义控件width或height为fill_parent时,容器在布局时调用子view的measure方法传入的模式是EXACTLY
2、当设置自定义控件为 wrap_content时,容器传进去的是AT_MOST,表示子view的大小最多是多少
3、当设置自...
分类:
其他好文 时间:
2015-07-30 23:19:25
阅读次数:
265
1、新建share.xml布局文件
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_p...
分类:
移动开发 时间:
2015-07-29 16:00:05
阅读次数:
196
很多人表示对于很多工程中的MATCH_PARENT出现在layout中感到不明白,过去只有FILL_PARENT和WRAP_CONTENT那么 match_parent到底是什么类型呢? 其实从Android 2.2开始FILL_PARENT改名为MATCH_PARENT ,从API Level为8...
分类:
其他好文 时间:
2015-07-26 10:54:26
阅读次数:
96
问题描述出错代码如下:<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"...
分类:
其他好文 时间:
2015-07-24 10:54:11
阅读次数:
108
使用布局文件需要将android:fastScrollEnabled="true" ,如下代码所示:
<ListView
android:id="@+id/listView" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:fastScrollE...
分类:
移动开发 时间:
2015-07-17 02:02:33
阅读次数:
130
如果要适合于所有的Android版本,可以在多个LinearLayout放置用于显示分隔线的View。例如,放一个ImageView组件,然后将其背景设为分隔线的颜色或图像,分隔线View的定义代码如下:
<ImageView
android:layout_width="fill_parent"
android:layout_height="1dp"...
分类:
移动开发 时间:
2015-07-16 02:12:18
阅读次数:
303