Lazy Android Developers - Be Productive. Talk delivered at Android Developer Days, Ankara on 17th May, 2014.
Lazy Android Developers: Be ProductiveParesh Mayani
View Slide
Paresh MayaniSr. Software Engineer @ InfoStretch, IndiaManager, GDG Ahmedabad
Are you lazy #AndroidDev?
No Googling…
Writing boilerplate code
Let’s be ProductiveWhile being lazy
But……How?
Tip: #1Productive Development Environment
IDE
Emulator
Tip: #2Write less code, Solve more problems
{Less code}{Less Mistakes}{Faster Development}
{Code Snippets}+{Open source libraries}
Open source librariesSource: http://www.blackducksoftware.com/
More than 100,000 results
68 repositories
Android Libraries Portal
Code snippets portal
UI & Custom ViewsCustom Views• Crouton• Staggered GridView• GoogleProgressBar• Sticky List Headers• Card UI• Fading ActionBar• Swipe ListView
NetworkingREST Clients• Spring for Android• RetrofitAsync Requests• OKHttp• VolleyImage source: http://instructure.github.io/blog/2013/12/09/volley-vs-retrofit/
Asynchronous Image Loading• Picasso• Universal Image loader (Nostra)• UrlImageViewHelper & ion (Koush)http://www.technotalkative.com/lazy-productive-android-developer-part-5-image-loading-library/
Database• OrmLite• Green DAO• SQL Cipher
Dependency InjectionClass• DaggerView Injection• Butter KnifeUniversal• RoboGuice• Android Annotations (AA)
Example//Before using Android annotation librarypublic class ActivityWithoutAA extends Activity{Button button1;ImageView imgView1;@Overrideprotected void onCreate(Bundle savedInstanceState) {// TODO Auto-generated method stubsuper.onCreate(savedInstanceState);setContentView(R.layout.activity_main);button1 = (Button) findViewById(R.id.button1);imgView1 = (ImageView) findViewById(R.id.imageView1);button1.setOnClickListener(new OnClickListener() {@Overridepublic void onClick(View v) {// TODO Auto-generated method stubimgView1.setImageResource(R.drawable.ic_launcher);}});}}
Example//After using Android annotation library, result is less code.@EActivity(R.layout.activity_main)public class MainActivity extends Activity {@ViewByIdButton button1;@ViewByIdImageView imageView1;@Clickvoid button1() {imageView1.setImageResource(R.drawable.ic_launcher);}@Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);}}View InitializationClick Listener
Tip: #3Use Available Tools
Mockup design tool
Shrink icon/image size
Device Art Generatorhttp://developer.android.com/distribute/promote/device-art.html
http://gradleplease.appspot.com/
http://angrytools.com/android/button/
http://goo.gl/j8lBgH
http://coh.io/adpi/
http://jsonlint.com/
http://jsonviewer.stack.hu/
Tip: #4Don’t Waste Time!
How?
Bootstrap your projectDid you heard about Twitter Bootstrap?How?
http://www.androidbootstrap.com/
http://androidkickstartr.com/
Tip: #5Learn from Open Source Projects
ioschedhttps://code.google.com/p/iosched/
WordPress for Androidhttps://github.com/wordpress-mobile/WordPress-Android
More open source projects• http://en.wikipedia.org/wiki/List_of_free_and_open-source_Android_applications• http://www.aopensource.com/
Tip: #6Learn and Check UI Patterns
http://www.android-app-patterns.com/
http://androidpttrns.com/
http://android.inspired-ui.com/
Thank You