Reputation: 1093
I am curious about how Android annotation works so i start reading it's google wiki but i thinks it's still a mystery , because it says:
A subclass is generated for each @EActivity(R.layout.something) where onCreate method will will be created with super.onCreate() and set content View as R.layout.something
But Real Question is what if i have already implemented some stuff in onCreate method of Activity where I put @EActivity(R.layout.something)
.
Other beginner Question is what are the best possible tips to avoid App not responding
dialog (i know about not doing long processing stuff in Uithread)
what about other possible situations where i can get this Message while using AA ?
Thanks is advance
Upvotes: 0
Views: 56
Reputation: 12207
You can put any code in your Activity
s onCreate()
method, because the generated class will call every overriden method with super.XXX()
. Code in your class will be never ignored.
However remember that injected resources are only available in @AfterInject
annotated methods, and injected views are only available in @AfterViews
annotated methods.
The other question is pretty general indeed: you should not run any long-running operations on the main thread, you have to move them to another thread. There are lot of solutions for that in the Android API and other libraries.
Upvotes: 1