我有六个带画廊的图像按钮。当我单击第一个按钮时,背景图像出现在滚动视图中。在我单击任何按钮后,我从图库中选择图像并设置为背景图像..之后我想将它们合并为一个!
这是我的背景图片
http://i.stack.imgur.com/WxEpQ.png
我在背景图像上设置了这个图像。我点击这个按钮然后出现这种类型的图像。
http://i.stack.imgur.com/7Cb0z.png
我有六个带画廊的图像按钮。当我单击第一个按钮时,背景图像出现在滚动视图中。在我单击任何按钮后,我从图库中选择图像并设置为背景图像..之后我想将它们合并为一个!
这是我的背景图片
http://i.stack.imgur.com/WxEpQ.png
http://i.stack.imgur.com/7Cb0z.png
图像遮罩是合并两个图像的好方法。将其转换为一个位图图像,然后设置为单个图像视图。
将第一个图像设置为背景并动态更改 android drawble 顶部图像。请参阅以下代码 xml 文件代码。
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button"
android:onClick="openNewApplication"
android:background="@drawable/apj_kalam"
android:drawableTop="@drawable/rect"/>