代码改变世界

阅读排行榜

Android:Cannot generate texture from bitmap的原因

2013-04-16 17:30 by 王妞, 4917 阅读, 收藏,
摘要: 错误:Cannot generate texture from bitmap。界面的ImageView显示一片黑色。原因:我是在调用Bitmap newBmp = Bitmap.createBitmap(originBmp, 0, 0, bmpW, bmpH, matrix, true)之后,就recycle originBmp, 谁知道当matrix.postScale(ratio, ratio)中的ratio = 1.0的时候,newBmp == originBmp, 所以此时不能recycle originBmp.解决办法:在recycle之前加一个判断语句:if(newBmp != o 阅读全文

向Apple的App Store提交App,出现提示:An SSL error

2013-11-06 11:27 by 王妞, 4895 阅读, 收藏,
摘要: 向Apple的App Store提交App,出现提示:An SSL error has occurred and a secure connection to the server cannot be made.解决办法:把iMac的网络设置的DNS改为:114.114.114.114然后就能上传成功了。 阅读全文

在Android button上添加icon,让icon和文字都居中显示

2013-09-29 18:30 by 王妞, 4548 阅读, 收藏,
摘要: 参考这个链接:http://gundumw100.iteye.com/blog/1205578在xml文件里仍然有这个button,只不过不加icon和文字。写了个函数:private void addButtonIcon(Button btn, int icon_drawable, int text_id){ImageGetter imgGetter = new ImageGetter() { @Override public Drawable getDrawable(String source) { Drawable drawable = null; drawable = getR... 阅读全文

Android 透明SurfaceView的清屏方法

2013-05-30 15:06 by 王妞, 4306 阅读, 收藏,
摘要: 一个透明的SurfaceView覆盖在一个有图片的ImageView上,要在surfaceview中响应ACTION_MOVE事件,画出图形,涉及到清屏问题,其实就一句话:canvas.drawColor(Color.TRANSPARENT, Mode.CLEAR); 阅读全文

Android手机找不到data/data/com.xx.yy文件夹的解决办法。

2013-09-03 16:17 by 王妞, 2746 阅读, 收藏,
摘要: data/data/com.xx.yy文件夹在eclipse的File Explorer是点不开的。需要手机先root,然后安装一个 RE管理器。 阅读全文
1 2 3 4 5 ··· 8 下一页