以LinearLayout为例,分析addView()的过程,和对布局参数layout_width和layout_height的理解分析! 安卓新手基础加强。...
分类:
其他好文 时间:
2014-11-07 01:03:49
阅读次数:
319
(一)android:layout_weight 在不同情况下的意义。 当android:layout_width 和android:layout_height都不为0的时候,android:layout_weight代表的是控件渲染的优先级,值越大,渲染的优先级越低。默认android:layo....
分类:
其他好文 时间:
2014-11-07 00:50:46
阅读次数:
332
主界面布局(知识点:GridView) mainscreen.xml: http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background...
分类:
移动开发 时间:
2014-11-04 17:34:29
阅读次数:
227
my_bar.xml //配置进度条的图片@drawable/ok @drawable/no 为图片保存在drawable文件夹中布局文件中进度条配置 android:id="@+id/bar" android:layout_width="fill_pare...
分类:
移动开发 时间:
2014-11-04 10:57:56
阅读次数:
289
Android - 直线(line)画法本文地址: http://blog.csdn.net/caroline_wendy横线(horizontal line)<View
android:layout_width="fill_parent"
android:layout_height="1dp"
android:background="@androi...
分类:
移动开发 时间:
2014-10-30 21:05:50
阅读次数:
218
上面的 + 表示在R中新建一个id变量layout_width:match_parent是跟父节点一样宽height:80dp是高80个单位(跟像素不是一个东西,但是对初学者来说就那么个意思就行了,详情参照:http://blog.csdn.net/moruite/article/...
分类:
移动开发 时间:
2014-10-29 18:27:50
阅读次数:
234
注意,你要改变组件的部分,要在XML中将其设置为warp_content.比如
你如果要改变button宽度,在xml中就要将其layout_width设置为wrap_content
在代码中动态设置宽度是通过设置设置LayoutParams来达到效果的
ImageView pictureView = (ImageView) convertView.findViewById(R.id...
分类:
移动开发 时间:
2014-10-28 12:12:25
阅读次数:
245
(转自:http://www.open-open.com/lib/view/open1378257991687.html)123456scaleType="centerInside"android:layout_width="60dip"android:layout_height="60dip"an...
分类:
移动开发 时间:
2014-10-23 12:09:03
阅读次数:
203
最近看到很多界面主页都差不多,决定研究研究写出来,以后直接拿来用,不做代码的轮子,多总结,多学习
还是废话少说,先上图
介绍一下我的代码:
首先是布局文件:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
...
分类:
微信 时间:
2014-10-22 14:44:06
阅读次数:
394
这两个是按钮开关,监听CheckedChangeListener
toggle_layout.xml:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match...
分类:
移动开发 时间:
2014-10-20 11:46:59
阅读次数:
245