Whenever i am using transparent PNG images, on my android device ( nexus ), i get a border on one side of transparent part. What is the way to sort out this problem ?
Asked
Active
Viewed 92 times
-2
-
Post the code of how you're using it, and preferably an image of the problem so we can see what you're talking about. – Gabe Sechan Jul 04 '14 at 19:31
-
post the xml code and java code also if you are doing something to ImageView in java code. – rachit Jul 04 '14 at 19:34
-
I am using AIR for android. So, there is no code. Just adding image on the stage. – Vishwas Jul 05 '14 at 06:41
1 Answers
0
The image you are trying to add may not be transparent.Check it...
In the xml file, use this code to add an ImageView
and set a resource for it:
<ImageView
android:id="@+id/image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/sample" />
To access the ImageView
from the java code ,use the following code.
ImageView imgView = (ImageView) findViewById(R.id.image);
You can also set a resource programatically:
imgView.setImageResource(R.drawable.sample);

Philipp Jahoda
- 50,880
- 24
- 180
- 187

Darish
- 11,032
- 5
- 50
- 70