上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 19 下一页

2014年7月23日

Drawable、Bitmap、byte[]之间的转换

摘要: 1、Drawable → Bitmap1)Java代码publicstaticBitmapdrawableToBitmap(Drawabledrawable){Bitmapbitmap=Bitmap.createBitmap(drawable.getIntrinsicWidth(),drawable... 阅读全文

posted @ 2014-07-23 19:35 veins 阅读(165) 评论(0) 推荐(0) 编辑

2014年7月22日

关于java.lang.IllegalArgumentException: View not attached to window manager 错误的分析

摘要: 今天遇到一个很奇特的问题,当用户设置了PIN码,在锁屏界面正常解锁PIN码后,进入Launcher时显示com.android.phone 已停止运行。一开始猜想会不会是解锁PIN码的时候处理导致了Phone进程报错,通过log分析找到了问题的大概原因:[plain]view plaincopyAn... 阅读全文

posted @ 2014-07-22 14:54 veins 阅读(376) 评论(0) 推荐(0) 编辑

2014年7月16日

Android ListView使用BaseAdapter与ListView的优化

摘要: 在ListView的使用中,有时候还需要在里面加入按钮等控件,实现单独的操作。也就是说,这个ListView不再只是展示数据,也不仅仅是这一行要来处理用户的操作,而是里面的控件要获得用户的焦点。读者可以试试用SimpleAdapter添加一个按钮到ListView的条目中,会发现可以添加,但是却无法... 阅读全文

posted @ 2014-07-16 19:52 veins 阅读(234) 评论(0) 推荐(1) 编辑

Ubuntu, using svn from terminal

摘要: Hello everybody,One day I had problems with GUI svn client and a big headache how to commit my changes. I have found how to do that using Terminal and... 阅读全文

posted @ 2014-07-16 18:12 veins 阅读(251) 评论(0) 推荐(0) 编辑

2014年7月15日

Ubuntu 12.04(64位)上搭建android 开发环境 (ADT 、android-studio)

摘要: 1. ubuntu 12.04 64位2. 下载:1) Oracel JDK :http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html2) ADT bundle :http://devel... 阅读全文

posted @ 2014-07-15 21:52 veins 阅读(346) 评论(0) 推荐(0) 编辑

2014年7月14日

Widget改变大小

摘要: 想控制图片和滚动,要在布局和业务写代码实现,不能view sourceprint?01怎么设置widget的大小?0203104052061992021我这样是设置貌似不起作用。。。22232425----------------------26android:minWidth="294dp"27a... 阅读全文

posted @ 2014-07-14 11:25 veins 阅读(878) 评论(0) 推荐(0) 编辑

2014年7月12日

android4.0中实现AppWidget集合

摘要: 1.准备appwidget的初始布局和预览视图等资源AppWidget集合应用时,需配置两种布局文件:一个用于集合view布局显示,一个用于集合view上条目的的布局显示注意:要设置empty views,以便匹配集合view的空状态,且该View必须是集合View(一般可为ListView、Gri... 阅读全文

posted @ 2014-07-12 20:35 veins 阅读(581) 评论(0) 推荐(0) 编辑

android 中 AppWidget 的 ListView 的实现

摘要: 3.0 以后系统直接支持了ListView. 关于ListView 的国内资料匮乏,大多数例子都是转来转去。由于初学android, 鄙人在搜索资料的时候遇到了不少麻烦~很是郁闷和苦恼~深感国内学习氛围确实怪异,学习方式需要改变。应该多去查看官方文档。。。。话不多说,现在开始listView 实现:... 阅读全文

posted @ 2014-07-12 19:53 veins 阅读(2056) 评论(0) 推荐(0) 编辑

解决IllegalStateException: Can not perform this action after onSaveInstanceState

摘要: 今天使用Fragment的时候,出现了这个错误IllegalStateException: Can not perform this action after onSaveInstanceState:E/AndroidRuntime(12747):Causedby:java.lang.Illegal... 阅读全文

posted @ 2014-07-12 19:52 veins 阅读(212) 评论(0) 推荐(0) 编辑

Drawable和Bitmap转换

摘要: 一、Bitmap转DrawableBitmap bm=xxx; //xxx根据你的情况获取BitmapDrawable bd=new BitmapDrawable(bm);因为BtimapDrawable是Drawable的子类,最终直接使用bd对象即可。二、 Drawable转Bitmap转成Bi... 阅读全文

posted @ 2014-07-12 11:04 veins 阅读(290) 评论(0) 推荐(0) 编辑

上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 19 下一页

导航