I have a seamless background, and I have successfully show it on the screen repeatedly using below code:
BitmapDrawable bitmapDrawable = new BitmapDrawable(getResources(), bitmap);
bitmapDrawable.setTileModeX(Shader.TileMode.REPEAT);
bitmapDrawable.setTileModeY(Shader.TileMode.REPEAT);
mBackground.setBackground(bitmapDrawable);
However, I got an issue with getting the bitmap to save later. The background is matched screen size in width and height. When I try with below code to get the bitmap, the saved image is just the original seamless pattern.
((BitmapDrawable) mBackground.getBackground()).getBitmap()
I have no idea how to generate repeated background image.