List of usage examples for android.content.res Resources getResourceEntryName
public String getResourceEntryName(@AnyRes int resid) throws NotFoundException
From source file:com.onegravity.contactpicker.core.ContactPickerActivity.java
/** * This method makes sure that all mandatory style attributes are defined for the current theme. */// w w w . j av a 2 s . c om private boolean checkTheming() { if (sThemingChecked) { return true; } Resources.Theme theme = getTheme(); Resources res = getResources(); TypedValue typedValue = new TypedValue(); int[] resIds = getStyleableAttributes("ContactPicker"); for (int resId : resIds) { String resName = res.getResourceEntryName(resId); boolean exists = theme.resolveAttribute(resId, typedValue, true); if (!exists) { themeFailure(resName); return false; } } sThemingChecked = true; return true; }