Posts

Showing posts with the label android annotations

Android Annotations - cleans your code

     Did you ever find yourself starting a new project or even a new activity and going through all the tiring process off binding UI controls to XML elements such as TextView , EditTexts , ListView etc .. ? I know I did. but there's a solution for this, along with some other code shortening elements for us to use. presenting : Android Annotations -  http://androidannotations.org/ A free to use library which can be added quite easily to an Android project with some minor calibrations. what does it allow us to do ? (taken from the androidannotations website) Dependency injection : inject views, extras, system services, resources, ... Simplified threading model : annotate your methods so that they execute on the UI thread or on a background thread. Event binding : annotate methods to handle events on views,   no more ugly anonymous listener classes ! REST client : create a client interface, AndroidAnnotations generates the implementatio...