使用软引用设置背景
来源:互联网 发布:windows 10 蓝牙丢失 编辑:程序博客网 时间:2024/06/03 19:36
imageView = (ImageView) findViewById(R.id.sItemIcon);imageView.setBackgroundDrawable(loadDrawable(R.drawable.id));//软引用设置private Map<Integer, SoftReference<Drawable>> imageCache = new HashMap<Integer, SoftReference<Drawable>>();private Drawable loadDrawable(Integer id){if(imageCache.containsKey(id)){Drawable d=imageCache.get(id).get();if(d!=null)return d;}Drawable d=getResources().getDrawable(id);imageCache.put(id, new SoftReference<Drawable>(d));return d;}
- 使用软引用设置背景
- android 使用selector设置背景
- [转]引用 VC 对话框设置位图背景并透明控件
- 设置Activity使用系统壁纸作为背景
- PopupWindow的使用及背景变暗设置
- Android中使用XML文件设置背景
- putty 背景透明度设置及使用技巧
- GradientDrawable 动态设置背景的使用
- 使用picasso设置背景时的问题
- 背景设置
- 背景设置
- 设置背景
- 设置背景
- 背景设置
- 强引用,软引用,弱引用,虚引用的使用
- android设置控件的字体和背景(通过资源引用)笔记
- j2me中使用canvas设置背景颜色示例
- 使用RGB值填充窗口背景 设置字体颜色
- Introduction: Java Interface for a core in Perl
- linux 下如何打开core dump文件开关
- cocos2d-x常用宏
- 丢失Android系统库或者Conversion to Dalvik format failed with error 1错误的解决
- 函数指针高级运用(C函数指针)
- 使用软引用设置背景
- 修改 bootstrap :用 less 来写 css 编译less
- split字符串,再遍历String[]显示
- 数据库命名规范
- java泛型T.class的获取
- 加班与效率
- empty和isset误点分析
- create_proc_read_entry中函数的说名
- Android网络通信的六种方式示例代码