It’s getting increasingly impossible to have a perfect working environment. However, you can work smarter without having to work harder. Time is not your enemy. If you… Read more “The Pomodoro Technique For Developer”
Handling data change in RecyclerView gracefully using DiffUtil
Originally posted on TheRubberDuckDev:
DiffUtil is an Android support library utility class which helps to ease out the process of finding which item changed in a list…
Android – Proper way to cancel AsyncTask
Originally posted on Vikas Patel's Blog:
Hi friends, After some months of experience in Android, I got some issue with canceling ProgressDialog. Default behavior is, you…
System Util class for Android
Source: System Util class for Android
Pimp-up your splash screen
Originally posted on 80/20:
In the past, splash screen in Android was a dirty word, It was usually a bad sign to an app that was converted from…
Change Status Bar to Custom Drawable
Source: Change Status Bar to Custom Drawable
Change Status Bar to Custom Drawable
Originally posted on CARLTHEANDROID:
Change the Android statusbar to a custom drawable on Lollipop devices. by Napalm. StatusBarView public class StatusBarView extends View { private int mStatusBarHeight;…
Image File Save
package siva.myprob.SaveImage; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.os.Environment; import android.widget.Toast; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; /** * Created by ${Sivashankar} on 10/1/17. */ public class SaveImage { String directoryName; String fileName; boolean isExternal; private Context context; public SaveImage(Context context) { this.context = context; } public static boolean isExternalStorageWritable() { final […]
Java Enum and Android IntDef/StringDef annotation
Originally posted on NoOb CoDeR:
When we want a variable x to have values from some predefined constants then what can we do. We can declare the…
Animated Vector Drawable
In API 21 the Android team released bunch of very cool things for material design, most of the things focus around the design specs like colors or transition animation, other were for the new widgets like FAB, card view or recycle view, but within all those things there were also two things that barely discussed- VectorDrawable and AnimatedVectorDrawable.
Edit: looks like those classes became so popular that the Android team decided to add them to the latest support library, yay!
Android resources
In Android, recourses took lots of space in the final APK, tools like Proguard or loading modules dynamically helped the developers very much decreasing their app size, but when it came to assets, we were very limited. You had to choose between create asset for each density or paying with cpu time and let android doing the resizing and risk by not perfect asset.
I saw couple of apps that choose…
View original post 992 more words