2014年8月13日

摘要: 出现这种情况有两种原因:1. class 被exclude (ant 不会exclude )2. import 内部类的内部类 比如 import IA.IIA; class A{ class IA { class IIA{ } } public void ... 阅读全文
posted @ 2014-08-13 15:52 jhondge 阅读(526) 评论(0) 推荐(0) 编辑

2014年3月31日

摘要: Gson registerTypeAdapter XXX class ,if u want serialize XXX class instance will crash.For example:gsonBuilder.registerTypeAdapter(Anima.class, new AnimaAdapter());//Anima is a normal class,and it's have some subclass //when u serialize Anima class instance ,will crash.//so u must serialize Anima 阅读全文
posted @ 2014-03-31 16:16 jhondge 阅读(369) 评论(0) 推荐(0) 编辑

2014年3月8日

摘要: 最近在做到Skia 相关项目时,由于之前编译的so在Android 4.3 版本以后会出现Crash.经过查看源代码发现SkBitmap->setConfig 参数列表已经发生了改变。包括GraphicsJNI.h 里面的很多函数参数列表也已经发生了改变。于是就试着各种方法去解决,解决思路:1. 使用自己编译的skia.so问题:GraphicsJNI 相关的也有改变,因此需要使用自己的Graphics.so. 感觉走远了。这样下去的apk将会很庞大,于是尝试将Graphics.cpp 文件里createBitmap的源码copy出来 自己实现。(应该没问题)最后自己再去看源码时,发现A 阅读全文
posted @ 2014-03-08 09:59 jhondge 阅读(945) 评论(0) 推荐(0) 编辑

2013年11月22日

摘要: blog :http://blog.sallarp.com/iphone-accelerometer-device-orientation/float x = -accelerometerData.acceleration.x; float y = accelerometerData.acceleration.y; float angle = atan2(y, x); if(angle >= -2.25f && angle = -0.75f && angle = 0.75f && angle = 2.25f) { currentOrient 阅读全文
posted @ 2013-11-22 14:02 jhondge 阅读(247) 评论(0) 推荐(0) 编辑

2013年10月10日

摘要: 亮度=R*0.299+G*0.587+B*0.114 阅读全文
posted @ 2013-10-10 17:46 jhondge 阅读(2559) 评论(0) 推荐(0) 编辑

2013年8月6日

摘要: In XCode selected the Build Phases,then find you want disable or enable file .Add below code to target filebehind-fobjc-arc or -fno-objc-arc 阅读全文
posted @ 2013-08-06 17:36 jhondge 阅读(250) 评论(0) 推荐(0) 编辑

导航