Home | History | Annotate | Download | only in res

Lines Matching refs:id

27      * The {@code null} resource ID.
32 * Checks whether the integer {@code id} is a valid resource ID, as generated by AAPT.
33 * <p>Note that a negative integer is not necessarily an invalid resource ID, and custom
34 * validations that compare the {@code id} against {@code 0} are incorrect.</p>
35 * @param id The integer to validate.
36 * @return {@code true} if the integer is a valid resource ID.
38 public static boolean isValid(@AnyRes int id) {
40 // represented as a signed Java int. Some legacy code assumes -1 is an invalid resource ID,
42 return id != -1 && (id & 0xff000000) != 0 && (id & 0x00ff0000) != 0;