List of usage examples for android.content.res Resources getColorStateList
@NonNull public ColorStateList getColorStateList(@ColorRes int id, @Nullable Theme theme) throws NotFoundException
From source file:Main.java
/** * @see android.content.res.Resources#getColorStateList(int id). *///from www .j a v a 2 s . co m @SuppressWarnings("deprecation") public static ColorStateList getColorStateList(Resources res, int id) throws NotFoundException { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { return res.getColorStateList(id, null); } else { return res.getColorStateList(id); } }