Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有两张图片,我需要将它们一张放在另一张上,可以使用 来制作FrameLayout,正如我在这个答案中找到的那样。但是,我需要将该布局设置为我的 tabTitle 之一的背景,如何做到这一点?
FrameLayout
你可以以编程方式做到这一点,
myFrameLayout.setDrawingCacheEnabled(true); myFrameLayout.buildDrawingCache(); Bitmap bitmap = myFrameLayout.getDrawingCache(); myAnotherLayout.setBackgroundDrawable(new BitmapDrawable(bitmap)));