This function converts an activity class-like identifer string, such as FooActivity, to a corresponding resource-friendly identifier string, such as activity_foo.
activityClass
The activity class name, e.g. FooActivity to reformat.
This function converts a camel-case identifer string, such as FooBar, to its corresponding underscore-separated identifier string, such as foo_bar.
camelStr
The camel-case string, e.g. FooBar to convert to an underscore-delimited string.
This function escapes a string, such as Android's such that it can be used as an XML attribute value: Android's. In particular, it will escape ‘, “, < and &.
str
The string to be escaped.
This function escapes a string, such as A & B's such that it can be used as XML text. This means it will escape < and >, but unlike escapeXmlAttribute it will not escape ‘ and “. In the preceeding example, it will escape the string to A & B\s. Note that if you plan to use the XML text as the value for a
str
The string to escape to proper XML text.
This function escapes a string, such as A & B's such that it is suitable to be inserted in a string resource file as XML text, such as A & B\s. In addition to escaping XML characters like < and &, it also performs additional Android specific escapes, such as escaping apostrophes with a backslash, and so on.
str
The string, e.g. Activity's Title to escape to a proper resource XML value.
This function extracts all the letters from a string, effectively removing any punctuation and whitespace characters.
str
The string to extract letters from
This function converts an Android class name, such as FooActivity or FooFragment, to a corresponding resource-friendly identifier string, such as foo, stripping the ‘Activity’ or ‘Fragment’ suffix. Currently stripped suffixes are listed below.
className
The class name, e.g. FooActivity to reformat as an underscore-delimited string with suffixes removed.
This function converts a resource-friendly identifer string, such as activity_foo, to a corresponding Java class-friendly identifier string, such as FooActivity.
resourceName
The resource name, e.g. activity_foo to reformat.
This function converts a full Java package name to its corresponding directory path. For example, if the given argument is com.example.foo, the return value will be com/example/foo.
packageName
The package name to reformat, e.g. com.example.foo.
This function converts an underscore-delimited string, such as foo_bar, to its corresponding camel-case string, such as FooBar.
underStr
The underscore-delimited string, e.g. foo_bar to convert to a camel-case string.