Back to project page wiki-contacts-android.
The source code is released under:
Apache License
If you think the Android project wiki-contacts-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.kahkong.wikicontacts.service; /*from w w w .j a v a 2 s.c om*/ import com.kahkong.wikicontacts.R; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; /** * * @author Poh Kah Kong * */ public class ResourceServiceImpl implements ResourceService { private static ResourceService instance; private Context context; private ResourceServiceImpl() { } public synchronized static ResourceService getInstance() { if (instance==null) { instance = new ResourceServiceImpl(); } return instance; } public void setContext(Context context) { this.context = context; } public Bitmap getNewImage() { return BitmapFactory.decodeResource(context.getResources(), R.drawable.contact_new); } public Bitmap getSpamImage() { return BitmapFactory.decodeResource(context.getResources(), R.drawable.contact_spam); } public String getString(int id) { return context.getResources().getString(id); } }