Title: findViewById called twice when using @ItemClick (and similar) on injected View · Issue #552 · androidannotations/androidannotations · GitHub
Open Graph Title: findViewById called twice when using @ItemClick (and similar) on injected View · Issue #552 · androidannotations/androidannotations
X Title: findViewById called twice when using @ItemClick (and similar) on injected View · Issue #552 · androidannotations/androidannotations
Description: When having a View injected (@ViewById) and also ataching an ItemClick Listener (@ItemClick), the findViewById method is called twice in the generated afterSetContentView_ method. The downside is that findViewById is not a very cheap met...
Open Graph Description: When having a View injected (@ViewById) and also ataching an ItemClick Listener (@ItemClick), the findViewById method is called twice in the generated afterSetContentView_ method. The downside is t...
X Description: When having a View injected (@ViewById) and also ataching an ItemClick Listener (@ItemClick), the findViewById method is called twice in the generated afterSetContentView_ method. The downside is t...
Opengraph URL: https://github.com/androidannotations/androidannotations/issues/552
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"findViewById called twice when using @ItemClick (and similar) on injected View","articleBody":"When having a View injected (@ViewById) and also ataching an ItemClick Listener (@ItemClick), the findViewById method is called twice in the generated afterSetContentView_ method.\n\nThe downside is that findViewById is not a very cheap method, is it?\n\nExample:\nClass:\n\n```\npublic class Class{\n...\n @ViewById\n protected View placesList;\n\n @ItemClick(R.id.placesList)\n public void editPlace(Place place){}\n...\n}\n```\n\nGenerated:\n\n```\n...\n private void afterSetContentView_() {\n placesList = ((ListView) findViewById(com.rallyberry.android.R.id.placesList));\n {\n AdapterView\u003c?\u003e view = ((AdapterView\u003c?\u003e ) findViewById(com.rallyberry.android.R.id.placesList));\n\n...\n\n```\n\nThanks and keep doing the great work you are doing!\n","author":{"url":"https://github.com/cosminstefanxp","@type":"Person","name":"cosminstefanxp"},"datePublished":"2013-04-08T14:19:54.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/552/androidannotations/issues/552"}
| 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:261fb38b-d7ae-d732-4158-3311cbfa72c1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C290:13907A:2160EF7:30D774E:6A60C78E |
| html-safe-nonce | 47962fa8a7deb254fd83294be287de80416e87d5acf412b406ac83c9ee8d8266 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMjkwOjEzOTA3QToyMTYwRUY3OjMwRDc3NEU6NkE2MEM3OEUiLCJ2aXNpdG9yX2lkIjoiNjI4MzcyNTc0MzU1MTcyNzUwMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | a37077faab6d94992494b70731975a693c73142bf1e89c1c3abfb0f7413fbb08 |
| hovercard-subject-tag | issue:12925308 |
| 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/552/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8a13b6a23b63cac0272a1db3bbb82ec9495d491099776aad729427fe4fba8375/androidannotations/androidannotations/issues/552 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8a13b6a23b63cac0272a1db3bbb82ec9495d491099776aad729427fe4fba8375/androidannotations/androidannotations/issues/552 |
| og:image:alt | When having a View injected (@ViewById) and also ataching an ItemClick Listener (@ItemClick), the findViewById method is called twice in the generated afterSetContentView_ method. The downside is t... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | cosminstefanxp |
| hostname | github.com |
| expected-hostname | github.com |
| None | e30aeaafb59b2438b8b0aaa24f4c6777e8e86dae0737625adfc928cac5443cd5 |
| 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 | 34b43e23ce2dc970fbfce25d0e96500f2af8266d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width