上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 14 下一页
摘要: TextView textview = (TextView) findViewById(R.id.text); /** * * 只有调用了该方法,TextView才能不依赖于ScrollView而实现滚动的效果。 ... 阅读全文
posted @ 2015-10-01 15:10 Michelle's Home 阅读(650) 评论(0) 推荐(0) 编辑
摘要: 隐藏标题栏需要使用预定义样式:android:theme=”@android:style/Theme.NoTitleBar”.隐藏状态栏:android:theme=”@android:style/Theme.NoTitleBar.Fullscreen”. 阅读全文
posted @ 2015-09-17 16:33 Michelle's Home 阅读(229) 评论(0) 推荐(0) 编辑
摘要: 静态变量的生命周期,起始于类的加载,终止于类的释放。什么时候类会加载呢?我们知道,在app打开时,会创建一个进程,然后初始化一个dvm的实例,负责类的加载释放 和 垃圾回收等。换句话说,在进程创建之后,就会加载类,静态变量诞生了。那何时释放?当然是在类卸载的时候。同上面。在进程结束之前,静态变量就寿... 阅读全文
posted @ 2015-08-04 14:07 Michelle's Home 阅读(959) 评论(0) 推荐(0) 编辑
摘要: Why ListView?ListView 如果仅仅出于功能上的需求ListView可能没有存在的必要,ListView能作的事情基本上ScrollView也能胜任。ListView存在的最根本的原因在于它的高效(如何实现的?).ListView通过对象的复用从而减少内存的消耗,也减少了对象的创建从... 阅读全文
posted @ 2015-08-04 10:39 Michelle's Home 阅读(526) 评论(0) 推荐(0) 编辑
摘要: 相关链接:http://www.jb51.net/article/37225.htmhttp://www.cnblogs.com/mengdd/archive/2013/05/02/3055465.htmlhttp://www.2cto.com/kf/201205/129964.htmlhttp:/... 阅读全文
posted @ 2015-08-04 10:15 Michelle's Home 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 正常的图片缩放代码如:ByteArrayOutputStream baos = new ByteArrayOutputStream();arg1.compress(Bitmap.CompressFormat.JPEG, 100, baos);//arg1为传进来的原始bitmapbaos.toByt... 阅读全文
posted @ 2015-08-03 16:14 Michelle's Home 阅读(6628) 评论(1) 推荐(0) 编辑
摘要: 问题描述:从网络获取图片,数据为InputStream流对象,然后调用BitmapFactory的decodeStream()方法解码获取图片,返回null。代码如下:private Bitmap getUrlBitmap(String url) { Bitmap bm; try... 阅读全文
posted @ 2015-08-03 15:32 Michelle's Home 阅读(2173) 评论(0) 推荐(0) 编辑
摘要: 问题描述:takephoto->拍照->确定->截图->保存,此时返回给onActivityResult的resultCode是0,截图无效。我查看图片储存的情况,拍完照是有存储好的,但截图后没有存储,图片变成了0byte。原因:privatevoidcropImageUri(Uriuri,intr... 阅读全文
posted @ 2015-08-03 14:46 Michelle's Home 阅读(3043) 评论(0) 推荐(1) 编辑
摘要: 1.设置ExpandableListView 默认是展开的:先实例化exListView 然后exListView.setAdapter(exlvAdapter); //遍历所有group,将所有项设置成默认展开 intgroupCount = exListView.getCount(); ... 阅读全文
posted @ 2015-07-28 16:05 Michelle's Home 阅读(259) 评论(0) 推荐(0) 编辑
摘要: public static void testMapVoid () { Map map = new HashMap(); map.put("a", "a1"); map.put("b", "b1"); map.put("c", "c1"... 阅读全文
posted @ 2015-07-28 14:14 Michelle's Home 阅读(607) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 14 下一页