- 博客(8)
- 资源 (2)
- 收藏
- 关注
原创 spring读取配置文件得到ApplicationContext
在spring项目中做测试的话,获得spring中定义的bean实例(对象).可以用:方法一:ApplicationContext ac = new ClassPathXmlApplicationContext("applicationContext.xml");ac.getBean("beanName");方法二:ApplicationContext ac = new FileSyst...
2015-02-26 16:44:53 87
原创 Bitmap转黑白&灰度方法
1.转灰度方法一: //copy from web(灰度图) public Bitmap toGrayscale(Bitmap bmpOriginal) { int width, height; height = bmpOriginal.getHeight(); width = bmpOriginal.getWidth(...
2015-02-12 17:47:54 6153
原创 Bitmap缩放相关
Bitmap bitmap =null;//通过工厂类,解释路径,获得图片bitmap = BitmapFactory.decodeFile(filePath); //get width & height int width = bitmap.getWidth(); int height = bitmap.getHeight(); Bi...
2015-02-10 11:51:54 94
原创 如何获取一个联系人下的多个号码
// 获得多个号码 public ListAdapter getMoreContacts(String name) { contactIdCur = null; if (name == null || name.equals("") || name.length() == 0) { // query contactIdCur = getContentRe...
2015-02-06 14:43:02 227
原创 getListView()用法
getListView()需要继承ListActivity才有它是使用系统默认的id 必须是"@+id/android:list"就直接继承ListActivity 然后 setListAdapter(adapter)就可以了。自定义的话ListView list=(ListView)findViewById(R.id.list);list.setListAdapter(adapter) ...
2015-02-06 14:27:02 1369
原创 一个联系人下多个号码去重复
public class Test { public static void main(String[] args) { Map<String ,List<String>> map = new HashMap<String ,List<String>>(); Set<String> nameSet = new Has...
2015-02-05 18:03:02 380
原创 联系人结构
Content Provider在数据处理中,Android通常使用Content Provider的方式。Content Provider使用Uri实例作为句柄的数据封装的,很方便地访问地进行数据的增、删、改、查的操作。Android并不提供所有应用共享的数据存储,采用content Provider,提供简单便捷的接口来保持和获取数据,也可以实现跨应用的数据访问。简单地说,Androi...
2015-02-05 15:20:00 201
原创 查找联系人
e result set. For best performance, the caller should follow these guidelines: Provide an explicit projection, to prevent reading data from storage that aren't going to be used. Use question mark parameter markers such as 'phone=?' instead of explic
2015-02-03 16:13:24 162 1
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人