Method One:
In XML, set the following
<
ImageView
android:id
=
"@+id/xx_id"
android:layout_width
=
"wrap_content"
android:layout_height
=
"wrap_content"
android:background
=
"@drawable/xx"
/>
<
ImageView
android:id
=
"@+id/xx_id"
android:layout_width
=
"wrap_content"
android:layout_height
=
"wrap_content"
android:background
=
"@drawable/xx"
/>
In the Java code
private
ImageView image;
image = (ImageView) findViewById(R.id.xx_id);
image.getBackground().setAlpha(
0
);
Method Two:
In XML, set the following
<
ImageView
android:id
=
"@+id/xx_id"
android:layout_width
=
"wrap_content"
android:layout_height
=
"wrap_content"
android:src
=
"@drawable/xx"
/>
<
ImageView
android:id
=
"@+id/xx_id"
android:layout_width
=
"wrap_content"
android:layout_height
=
"wrap_content"
android:src
=
"@drawable/xx"
/>
In the Java code
private
ImageView image;
image = (ImageView) findViewById(R.id.xx_id);
image.setAlpha(
0
);
Android ImageView picture is set to transparent