Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
flsobral opened this issue Jul 10, 2020 · 0 comments
Open

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

flsobral opened this issue Jul 10, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@flsobral
Copy link
Member

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.

@flsobral flsobral added the enhancement New feature or request label Jul 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant