Android examples for android.graphics:Bitmap Operation
Mutate the bitmap and reset tilemode
//package com.java2s; import android.graphics.Shader.TileMode; import android.graphics.drawable.BitmapDrawable; public class Main { /** Mutate the bitmap and reset tilemode **/ public static void fixBitmapRepeat(BitmapDrawable bmp) { bmp.mutate(); // make sure that we aren't sharing state anymore bmp.setTileModeXY(TileMode.REPEAT, TileMode.REPEAT); }//from w w w . j a v a2 s . c o m }