-
public class ResUtilsUtilities for translating the normal output of ZoneInfoCompiler/ ZoneInfoProvider into the raw resources for Android
-
-
Method Summary
Modifier and Type Method Description static StringgetTzResource(String tzFile)Returns a resource name equivalent for a TZ ID static StringgetZoneInfoMapResource()static intgetIdentifier(Class<out Object> type, String name)Retrieves a resource id dynamically, via reflection. -
-
Method Detail
-
getTzResource
static String getTzResource(String tzFile)
Returns a resource name equivalent for a TZ ID
- Parameters:
tzFile- the ID of the TZ, or a special filename (e.g.
-
getZoneInfoMapResource
static String getZoneInfoMapResource()
-
getIdentifier
static int getIdentifier(Class<out Object> type, String name)
Retrieves a resource id dynamically, via reflection. It's much fasterthan Resources.getIdentifier(), however it only allows you to getidentifiers from your own package. Note that this method is still slower than retrieving resourcesdirectly (e.g., R.drawable.MyResource) - it should only be usedwhen dynamically retrieving ids.Originally sourced from https://github.com/dlew/android-utils/
- Parameters:
type- the type of resource (e.g.name- the name of the resource
-
-
-
-