- 博客(3)
- 收藏
- 关注
原创 Android Studio 使用 lombok
1.下载安装lombok plugin插件如图2.build.gradle文件中添加依赖compile 'javax.annotation:javax.annotation-api:1.2'compile 'org.projectlombok:lombok:1.16.6'3.在model类中使用@Data如图,get、set、equals、hashCod
2016-03-03 16:42:19
5684
原创 Android 多应用读SharedPreferences时的脏读问题
A应用写入设置,B应用读取设置。当B应用第一次读取到A应用设置的值后,A应用又一次写入新的值后,B应用再一次读取设置是,可能出现读取到的值是旧数据。解决方法:getSharedPreferences时MODE中不要忘了添加Context.MODE_MULTI_PROCESS。/** * SharedPreference loading flag: when set,
2012-08-18 14:34:32
1115
转载 How to get byte array from imageview
ImageView iv = (ImageView) findViewById(R.id.splashImageView); Drawable d =iv.getBackground(); BitmapDrawable bitDw = ((BitmapDrawable) d); Bitmap bitmap = bitDw.getBitmap(); System.ou
2012-08-02 14:08:14
446
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅