Java tutorial
//package com.java2s; import android.content.res.Resources; import android.content.res.Resources.NotFoundException; public class Main { public static boolean isExists(Resources resources, int resid) { try { resources.getResourceName(resid); } catch (NotFoundException e) { return false; } return true; } }