Those notes aren’t from Actionbarsherlock and yes of the Android Annotations.
To Actionbarsherlock is responsible for providing an implementation of ActionBar
for devices with Android version less than 3.0. Currently the library appcompat
already provides this compatibility implementation, it is no longer necessary to use the Actionbarsherlock. Besides ActionBar
is going into disuse in favor of the Toolbar
version 5.0, which the appcompat
also provides compatibility.
The library Android Annotations adds some annotations, which serve as shortcuts for certain actions, functionalities and declarations, which generally reduce the amount of redundant and repetitive written code ("Boilerplate"). The biggest advantage dictated by the creators of the library would be the increase in productivity.
Example:
@ViewById -> chama o findViewById da Activity após o setContentView
@EActivity -> chama o setContentView com o id especificado na anotação
The use of this library has its advantages and disadvantages, it depends a lot on each project/team.
The suffix _
in NomeActivity_
is a side effect because for each class noted, for example NomeActivity
, generates a new class with this suffix, with all the auto-generated code corresponding to each of these annotations.
These functions in principle do not impact performance, because all extra code is generated at compile time, but it may be that the code is not the most optimized (sometimes it doesn’t even matter for legibility/productivity).
You can look in the folder gen
of Eclipse or search it using the Ctrl-R
or Ctrl-T
and view the auto-generated code.
In the case of Android Studio, I believe you need to go target/generated-sources/annotations
and see the generated code.
For more details: http://androidannotations.org
About the version, the two libraries support Android 2.3. I suggest you survey which libraries the project has and check on their Androidmanifest which versions they put as a minimum.
If you don’t have any, I recommend doing a very thorough test/analysis of the code as there may be calls to the API for newer versions that will generate error at runtime (some lint may be alert at compile time). E.g: Animation API (Objectanimator, Valueanimator, Viewpropertyanimator and etc...).