Title: Alternative method for providing R ids with Android 4 · Issue #20 · androidannotations/androidannotations · GitHub
Open Graph Title: Alternative method for providing R ids with Android 4 · Issue #20 · androidannotations/androidannotations
X Title: Alternative method for providing R ids with Android 4 · Issue #20 · androidannotations/androidannotations
Description: In Android 4, the fields of the R inner classes won't be final anymore for library projects (and only for library projects). This means that those ids cannot be used for switches any more (and we don't really care), but also cannot be us...
Open Graph Description: In Android 4, the fields of the R inner classes won't be final anymore for library projects (and only for library projects). This means that those ids cannot be used for switches any more (and we d...
X Description: In Android 4, the fields of the R inner classes won't be final anymore for library projects (and only for library projects). This means that those ids cannot be used for switches any more (and ...
Opengraph URL: https://github.com/androidannotations/androidannotations/issues/20
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Alternative method for providing R ids with Android 4","articleBody":"In Android 4, the fields of the R inner classes won't be final anymore for library projects (and only for library projects).\n\nThis means that those ids cannot be used for switches any more (and we don't really care), but also cannot be use into annotations. That's a problem for us, because the compiler won't allow this any more :\n\n`@ViewById(R.id.myIdFromMyLibraryProject)`\n\nSo I think we'll have to provide an alternative way to specify ids, using strings and complete qualified names :\n\n`@ViewById(alt=\"com.mylibrary.R.id.myIdFromMyLibraryProject\")`\n\nThis is not perfect (not typesafe any more). Ids may become invalid and you won't notice. We can help with our compile time framework, because when can check that the \"com.mylibrary.R.id.myIdFromMyLibraryProject\" field exists, and issue a compile error otherwise. Runtime frameworks won't be that lucky (RoboGuice, ACRA...).\n\nThe Android team introduced this change to improve the build perfs when using library projects. More on this subject :\n\nhttp://tools.android.com/tips/non-constant-fields\nhttps://plus.google.com/u/0/109385828142935151413/posts\nhttp://code.google.com/p/acra/issues/detail?id=85\n","author":{"url":"https://github.com/pyricau","@type":"Person","name":"pyricau"},"datePublished":"2012-01-06T11:01:06.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/20/androidannotations/issues/20"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:4aae0fec-480f-48c8-a4e2-83a41f14dda0 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B2E8:1CD8CC:2C9FB1:3E8508:6A62343E |
| html-safe-nonce | 9e3b46da9ecd78eb243e18c0c5caa388671e3e7d8ae6d0bd1b3e7a08e6bc777e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMkU4OjFDRDhDQzoyQzlGQjE6M0U4NTA4OjZBNjIzNDNFIiwidmlzaXRvcl9pZCI6Ijg0NzM2NDM1OTk3MTY4MjQxMjYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 7ab578fbb4c3df44f4025e8261341c6d67dd2a568f18bf1292e112bf2635b97e |
| hovercard-subject-tag | issue:2746125 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/androidannotations/androidannotations/20/issue_layout |
| twitter:image | https://opengraph.githubassets.com/45c062d1f7f0d461e3c19abd098d67a30477b43c03296feed11af842ee5f3076/androidannotations/androidannotations/issues/20 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/45c062d1f7f0d461e3c19abd098d67a30477b43c03296feed11af842ee5f3076/androidannotations/androidannotations/issues/20 |
| og:image:alt | In Android 4, the fields of the R inner classes won't be final anymore for library projects (and only for library projects). This means that those ids cannot be used for switches any more (and we d... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | pyricau |
| hostname | github.com |
| expected-hostname | github.com |
| None | f01037538d0c99e88fa8e01da1b1825ad354ff4da745198c7392a43592c8398c |
| turbo-cache-control | no-preview |
| go-import | github.com/androidannotations/androidannotations git https://github.com/androidannotations/androidannotations.git |
| octolytics-dimension-user_id | 1315313 |
| octolytics-dimension-user_login | androidannotations |
| octolytics-dimension-repository_id | 3116751 |
| octolytics-dimension-repository_nwo | androidannotations/androidannotations |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3116751 |
| octolytics-dimension-repository_network_root_nwo | androidannotations/androidannotations |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 10b5a8861bf21b66a650f894089f8ce1476c1d49 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width