- 博客(83)
- 资源 (11)
- 收藏
- 关注
原创 bitmap和drawable的一些简单操作
bitmap相关:bitmap转换成byte[]: public byte[] bitmap2Bytes(Bitmap bm) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); bm.compress(Bitmap.CompressFormat.PNG, 100, baos
2015-01-21 14:17:19 544
原创 android自定义View构造方法以及获取自定义属性详解
首先View有三个构造方法,如下:View(Context context)Simple constructor to use when creating a view from code.View(Context context,AttributeSet attrs)Constructor that is called when infla
2014-05-11 21:32:23 1873
原创 LayoutInflater结合Context使用
1.Context的获取一般我们用的是××Activity.this。其实还有另一种方式,从当前显示的某个view中获取,也就是调用view.getContext()方法。2.LayoutInflater的获取第一种方式:LayoutInflater inflater = LayoutInflater.from(××Activity.this); from()方法api里是这样说的
2014-04-01 22:23:06 652
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人