Blog

Lazy but productive Android Developer (Part-3)

There is so much boilerplate code in Android Activity, so if there is a way to eliminate it then we can just focus on our business logic. There are so many projects the relieve developers from this pain but the main difference between them is; some generate code at compile time (no performance impact) and some generate code on the fly using Reflection, that is very slow and increases the chances of app crashing. There are so many benefits of using Android Annotations, one of the benefit is you need to write less code and absolutely less bugs, less development, maintenance time spent and improved stability. The technique used by these libraries is called Dependency Injection. Android Annotations can also relieve you from another big pain of requesting some code to run on UI Thread or on Background Thread and it’s also very efficient because it maintains a pool of threads. So you just need to use annotation for e.g. @UiThread or @background code1



code2

@Eactivity Specifies layout file associated with specific activity @ViewById Associates layout components with Java variables so that it can referenced from Java code. @Click associate the click functionality of layout components to java method To associate, multiple components's click to only 1 Java method, we can write something like this: code3

Similar for, (1) Fragment @EFragment (2) Service @EService (3) BroadcastReceiver @EReceiver (4) Application @EApplication (5) ContentProvider @EProvider (6) NotificationManager @SystemService (7) Object @Bean (8) MyRestClient @RestService (9) Transaction support in Database Operations @Transactional

https://github.com/excilys/androidannotations/wiki/Cookbook https://github.com/excilys/androidannotations/wiki/AvailableAnnotations

Words translated by CCJK

146,096,379

Request a call or contact us

  •  

    Call ccjk.support for professional assistance

  •  

    Click Here to leave us a message and be as detailed as possible.

We are Certified

Our Client Satisfaction

rating for previous quarte

4.00
  •  
    Inquiry Form

    Please take few minutes to fill
    inquiry form and get Free Quote

  •  
    Request a Call

    Click to receive Free Call, Our
    Representative will contact you

  •  
    Leave a Message

    Please leave us a message and
    be as detailed as possible

Over 95% of our clients recommend our language services to others


Copyright © CCJK Technologies Co., Ltd. 2000-2017. All rights reserved.
TOP