我有一个带有一些透明区域(如渐变透明)的png图像,我想将此图像"添加"到位图上,并从这两个区域创建一个新位图。
这在安卓系统中可能吗?
<FrameLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="sliding banner here" />
<ImageView
android:id="@+id/slider_des"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom|center"
android:layout_marginTop="40dp"
android:hint="text"
android:paddingBottom="20dp"
/>
</FrameLayout>
上面的代码可以修改以实现您想要的!第一个图像视图将用于位图,第二个用于重叠图像视图,您可以将透明png放置在其中。