Problem occurs while using high resolution image in device.
imageview a;
InputStream ims = getAssets().open("sam.png");//sam.png=520*1400 device=320*480 or 480*800
Drawable d=Drawable.createFromStream(ims, null);
a.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT));
a.setImageDrawable(d);
by using above code image leaves spaces on top and bottom to next contents or If I shrink an image by giving fixed px, its get blur image on its size. Anyway to solve this issue?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…