Different ways to handle click events in Android

Member Class: This is useful when several listeners require similar processing than can be handled by a single class. public class MainActivity extends Activity { Button button1;     @Override     public void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.main);        button1=(Button)findViewById(R.id.button1);        button1.setOnClickListener(new … Continue reading Different ways to handle click events in Android


Eliminating Code Overheads in Android Program

Optimisation always falls in 3 categories Memory, I/O ,CPU cycles which in turn target improvement in battery usage.     CPU: 1. Do not nest multi pass layout. 2. Lazy compute complex data when needed 3. Cache heavy computational result for re-use 4. Consider Render Script for performance. 5. Keep work off the Main thread. … Continue reading Eliminating Code Overheads in Android Program

Auto backup of Android Application

Android market has increased tremendously. Every day new mobile phone gets launch, and while uninstalling our app from old phone app's data gets lost.  As a developer it would always be a great idea backup your user's app data to their google drive, so when they reinstall the app they can fetch back their data … Continue reading Auto backup of Android Application

Reduce .apk file size by WebP

If we are dealing with the application which uses significant amount of images then png and jpeg format would be occupying more space. WebP is the Image format from Google for better compression than JPEG and PNG files. Using WebP developer can create rich and compact image. The statics shows that lossless image is 26% … Continue reading Reduce .apk file size by WebP

Color Tool

Google had introduced tool named Color Tool on April 2017. It is one of the best source to create attractive UI by choosing color schemes that include darker and lighter variations of your primary and secondary colors. Well many of us struggled hard to find the attractive and eye appealing color scheme for our application … Continue reading Color Tool