Skip to content

Generate a resources class like the R used on Android #12

Description

@flsobral

The idea is to make it easier to reference resources and controls from the code, by generating a class with direct reference to them.

For example, instead of:

Button plus = (Button) xmlCont.getControlByID("@+id/plus");
plus.addPressListener(new PressListener() {
...

something like:

R.controls.plus.addPressListener(new PressListener() {
...

The main objective isn't simply reducing loc, but to reduce the chance of error during development, with less typecasts and referencing controls using strings.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions