码迷,mamicode.com
首页 >  
搜索关键字:attrs    ( 500个结果
自定义Listview
public class MyListView extends ListView {public MyListView(Context context) { super(context);}public MyListView(Context context, AttributeSet attrs) ...
分类:其他好文   时间:2014-09-18 13:03:43    阅读次数:200
android ListView嵌套GridView显示不全问题
只需重写GridView即可:public class MyGridView extends GridView{ public MyGridView(android.content.Context context, android.util.AttributeSet attrs) { super(c...
分类:移动开发   时间:2014-09-18 13:01:33    阅读次数:270
【android自己定义控件】自己定义View属性
1、自己定义View的属性2、在View的构造方法中获得我们自己定义的属性3、重写onMesure 4、重写onDraw3这个步骤不是必须,当然了大部分情况下还是须要重写的。1、自己定义View的属性,首先在res/values/ 下建立一个attrs.xml , 在里面定义我们的属性和声明我们的整...
分类:移动开发   时间:2014-09-02 21:15:45    阅读次数:287
1. 自定义视图属性
res/values/attrs.xml 自定义属性值1 2 3 4 5 6 7 自定义控件 ---- 长方形 1 import android.content.Context; 2 import android.content.res.TypedArray...
分类:其他好文   时间:2014-08-29 18:09:48    阅读次数:276
Android自定义View
Android自定义View实现很简单继承View,重写构造函数、onDraw,(onMeasure)等函数。如果自定义的View需要有自定义的属性,需要在values下建立attrs.xml。在其中定义你的属性。在使用到自定义View的xml布局文件中需要加入xmlns:前缀="http://sc...
分类:移动开发   时间:2014-08-24 20:44:13    阅读次数:244
Android解读CheckBox
打开源码中CheckBox.java文件,我们可以看到如下内容:publicclassCheckBoxextendsCompoundButton{ publicCheckBox(Contextcontext){ this(context,null); } publicCheckBox(Contextcontext,AttributeSetattrs){ this(context,attrs,com.android.internal.R.attr.checkboxStyl..
分类:移动开发   时间:2014-08-18 01:39:44    阅读次数:267
Android-Widget源码分析
View以及所有控件是如何得知我们在布局设置的控件ID的. 【Attrs.xml文件】 ??#?attrs.xml?文件. ??<declare-styleable?name="View"> ????????<!--?reference?代表某一个资源文件!!?--> ???...
分类:移动开发   时间:2014-08-16 02:18:20    阅读次数:298
declare-styleable:自定义控件的属性
在使用过程中,1 TypedArray a = getContext().obtainStyledAttributes(attrs, R.styleable.ContactListItemView);2 mPreferredHeight = a.getDimensionPixelSize(3 R.s...
分类:其他好文   时间:2014-08-14 13:17:28    阅读次数:295
Demo of Python "Map Reduce Filter"
Here I share with you a demo for python map, reduce and filter functional programming that owned by me(Xiaoqiang). I assume there are two DB tables, that `file_logs` and `expanded_attrs` which re...
分类:编程语言   时间:2014-08-09 04:57:17    阅读次数:525
android一个弹出菜单的动画(二)
如果做一个弹出的控件,我们可以进行添加view: 写class SatelliteMenu extends FrameLayout private void init(Context context, AttributeSet attrs, int defStyle) { inflate(context, R.layout.sat_main, this); imgMain = (Ima...
分类:移动开发   时间:2014-08-08 18:17:26    阅读次数:428
500条   上一页 1 ... 46 47 48 49 50 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!