Resource Processor
class ResourceProcessor
Content copied to clipboard
Scans R files and and compiles resource values in those R classes. This allows us to look up raw resource values (eg 23523452) and convert that to the resource name (eg R.layout.my_view) so that we can properly reference that resource. This is important in library projects where the R value at process time can be different from the final R value in the app.
This is adapted from Butterknife. https://github.com/JakeWharton/butterknife/pull/613
Types
Functions
getAlternateLayouts
Link copied to clipboard
getLayoutInAnnotation
Link copied to clipboard
fun getLayoutInAnnotation(element: Element, annotationClass: Class<out Annotation>): ResourceValue
Content copied to clipboard
getLayoutsInAnnotation
Link copied to clipboard
fun getLayoutsInAnnotation(element: Element, annotationClass: Class<out Annotation>): List<ResourceValue>
Content copied to clipboard
getResourceInAnnotation
Link copied to clipboard
fun getResourceInAnnotation(element: Element, annotationClass: Class<*>, resourceType: String?, resourceValue: Int): ResourceValue
Content copied to clipboard
getResourcesInAnnotation
Link copied to clipboard
fun getResourcesInAnnotation(element: Element, annotationClass: Class<*>, resourceType: String?, resourceValues: List<Int>): List<ResourceValue>
Content copied to clipboard
getStringResourceInAnnotation
Link copied to clipboard
fun getStringResourceInAnnotation(element: Element, annotationClass: Class<*>, resourceValue: Int): ResourceValue
Content copied to clipboard