This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SingleThreadScheduler { | |
private static final SingleThreadScheduler ourInstance = new SingleThreadScheduler(); | |
private static Scheduler scheduler = Schedulers.from(Executors.newSingleThreadExecutor()); | |
/**Returns a single thread Scheduler that can be used for realm read and writes | |
* | |
* @return returns a Scheduler that works on single thread | |
*/ | |
public static Scheduler disk() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.graphics.Bitmap; | |
import android.graphics.Bitmap.Config; | |
import android.graphics.BitmapShader; | |
import android.graphics.Canvas; | |
import android.graphics.Paint; | |
import android.graphics.RectF; | |
import android.graphics.Shader; | |
// enables hardware accelerated rounded corners | |
// original idea here : http://www.curious-creature.org/2012/12/11/android-recipe-1-image-with-rounded-corners/ |