Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//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;
    }
}