Is there a built in way to check to see if a resource exists or am I left doing something like the following:
boolean result; int test = mContext.getResource
i like to do something like that:
public static boolean isResource(Context context, int resId){ if (context != null){ try { return context.getResources().getResourceName(resId) != null; } catch (Resources.NotFoundException ignore) { } } return false; }
so now it's not only for drawable