Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Lazy Android Developers - Be Productive

Lazy Android Developers - Be Productive

Lazy Android Developers - Be Productive. Talk delivered at Android Developer Days, Ankara on 17th May, 2014.

Paresh Mayani

May 16, 2014
Tweet

More Decks by Paresh Mayani

Other Decks in Technology

Transcript

  1. Lazy Android Developers: Be Productive Paresh Mayani

  2. Paresh Mayani Sr. Software Engineer @ InfoStretch, India Manager, GDG

    Ahmedabad
  3. Are you lazy #AndroidDev?

  4. No Googling…

  5. Writing boilerplate code

  6. Let’s be Productive While being lazy

  7. But……How?

  8. Tip: #1 Productive Development Environment

  9. IDE

  10. Emulator

  11. Tip: #2 Write less code, Solve more problems

  12. {Less code} {Less Mistakes} {Faster Development}

  13. {Code Snippets} + {Open source libraries}

  14. Open source libraries Source: http://www.blackducksoftware.com/

  15. More than 100,000 results

  16. 68 repositories

  17. Android Libraries Portal

  18. Android Libraries Portal

  19. Code snippets portal

  20. UI & Custom Views Custom Views • Crouton • Staggered

    GridView • GoogleProgressBar • Sticky List Headers • Card UI • Fading ActionBar • Swipe ListView
  21. Networking REST Clients • Spring for Android • Retrofit Async

    Requests • OKHttp • Volley Image source: http://instructure.github.io/blog/2013/12/09/volley-vs-retrofit/
  22. Asynchronous Image Loading • Picasso • Universal Image loader (Nostra)

    • UrlImageViewHelper & ion (Koush) http://www.technotalkative.com/lazy-productive-android-developer-part-5-image-loading-library/
  23. Database • OrmLite • Green DAO • SQL Cipher

  24. Dependency Injection Class • Dagger View Injection • Butter Knife

    Universal • RoboGuice • Android Annotations (AA)
  25. Example //Before using Android annotation library public class ActivityWithoutAA extends

    Activity{ Button button1; ImageView imgView1; @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); button1 = (Button) findViewById(R.id.button1); imgView1 = (ImageView) findViewById(R.id.imageView1); button1.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub imgView1.setImageResource(R.drawable.ic_launcher);} }); } }
  26. Example //After using Android annotation library, result is less code.

    @EActivity(R.layout.activity_main) public class MainActivity extends Activity { @ViewById Button button1; @ViewById ImageView imageView1; @Click void button1() { imageView1.setImageResource(R.drawable.ic_launcher); } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); } } View Initialization Click Listener
  27. Tip: #3 Use Available Tools

  28. Mockup design tool

  29. Shrink icon/image size

  30. None
  31. None
  32. None
  33. Device Art Generator http://developer.android.com/distribute/promote/device-art.html

  34. None
  35. http://gradleplease.appspot.com/

  36. http://angrytools.com/android/button/

  37. http://goo.gl/j8lBgH

  38. http://coh.io/adpi/

  39. None
  40. None
  41. http://jsonlint.com/

  42. http://jsonviewer.stack.hu/

  43. Tip: #4 Don’t Waste Time!

  44. How?

  45. Bootstrap your project Did you heard about Twitter Bootstrap? How?

  46. http://www.androidbootstrap.com/

  47. http://androidkickstartr.com/

  48. Tip: #5 Learn from Open Source Projects

  49. iosched https://code.google.com/p/iosched/

  50. WordPress for Android https://github.com/wordpress-mobile/WordPress-Android

  51. More open source projects • http://en.wikipedia.org/wiki/List_of_free_and_open- source_Android_applications • http://www.aopensource.com/

  52. Tip: #6 Learn and Check UI Patterns

  53. http://www.android-app-patterns.com/

  54. http://androidpttrns.com/

  55. http://android.inspired-ui.com/

  56. Thank You