我有一個主要產品圖像,它總是顯示在我的ImageView
中。現在有可能有多個疊加層(與原始圖像大小相同,但有很多透明區域)。用畢加索覆蓋圖像
所有這些圖像來自遠程URL。例如: -
是否有可能對所有這些加載到一個ImageView
?
我有一個主要產品圖像,它總是顯示在我的ImageView
中。現在有可能有多個疊加層(與原始圖像大小相同,但有很多透明區域)。用畢加索覆蓋圖像
所有這些圖像來自遠程URL。例如: -
是否有可能對所有這些加載到一個ImageView
?
您可以自定義ImageView
,load bitmaps with Picasso然後在畫布上繪製的位圖:
@Override
protected void onDraw(final Canvas canvas) {
super.onDraw(canvas);
canvas.drawBitmap(bitmap1, 0, 0, null); // lower image
canvas.drawBitmap(bitmap2, 0, 0, null); // upper image
}
你可以試試這個XML
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<ImageView
android:id="@+id/image"
android:layout_width="60dip"
android:layout_height="60dip"
android:adjustViewBounds="true"
android:layout_centerInParent="true"
android:scaleType="centerCrop" />
<ImageView
android:id="@+id/imagef"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_centerInParent="true"
android:background="@drawable/ph_bg" />
</RelativeLayout>
我在問一個ImageView – 4ndro1d
Yes..you能夠做到這一點使用的FrameLayout –
使用多個ImageViews雖然? – 4ndro1d