0

I have two images, and I need to put them one on another, that can be made using FrameLayout, as I found in this answer. However, I need to set that layout as background to one of my tabTitle, how it can be done?

Community
  • 1
  • 1
Mickey Tin
  • 3,408
  • 10
  • 42
  • 71

1 Answers1

2

You can do that programmatically,

myFrameLayout.setDrawingCacheEnabled(true);
myFrameLayout.buildDrawingCache();
Bitmap bitmap = myFrameLayout.getDrawingCache();

myAnotherLayout.setBackgroundDrawable(new BitmapDrawable(bitmap)));
Niko
  • 8,093
  • 5
  • 49
  • 85