You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
Starting from recent appcompat library versions (I'm not sure which one exactly), the need to cast the result of findViewById seem to have gone away. In fact, if the casting in current form stays, then compiling with "-Xlint:unchecked" will raise warnings like this:
required: T
found: View
where T is a type-variable:
T extends View declared in method <T>internalFindViewById(int)
/git/project/app/src/main/java/SomeActivity_.java:40: warning: [unchecked] unchecked cast
return ((T) this.findViewById(id));
This would probably require different style of code generation depending on the activities parent class (AppCompatActivity, Activity) and if the findViewById call supports the casting already.
Starting from recent appcompat library versions (I'm not sure which one exactly), the need to cast the result of
findViewByIdseem to have gone away. In fact, if the casting in current form stays, then compiling with"-Xlint:unchecked"will raise warnings like this:AndroidAnnotations version: 4.4.0
Android compile SDK version: 26
Annotated code:
Expected generated code:
Actual generated code:
This would probably require different style of code generation depending on the activities parent class (AppCompatActivity, Activity) and if the findViewById call supports the casting already.