Android使用透明png屏蔽位图

Android使用透明png屏蔽位图,android,bitmap,android-image,bitmapfactory,Android,Bitmap,Android Image,Bitmapfactory,我有一个png图像和一些透明区域(如渐变透明),我想“添加”这个图像到位图上,并从这两个创建一个新的位图 这在Android中可能吗? <FrameLayout android:layout_width="fill_parent" android:layout_height="wrap_content"> <ImageView android:id="@+id/imageView1" android:layout_wid

我有一个png图像和一些透明区域(如渐变透明),我想“添加”这个图像到位图上,并从这两个创建一个新的位图

这在Android中可能吗?


<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放入其中。

谢谢,但我不需要同时显示它们,而是从这两个视图创建一个实际的图像文件!