android - Image display small in lollipop 5.0 -
i showing bitmap image in code through url. image appears correct size in other devices appears too small in lollipop version.
how can solve issue?
here code:
try { string imageurl=params[0]; url = new url(appconstants.base_url+"images/"+imageurl); bm = imagethreadloader.readbitmapfromnetwork(url); bitmap_new = bitmap.createbitmap(bm.getwidth(),bm.getheight(), config.argb_8888); canvas canvas = new canvas(bitmap_new); final int color = 0xff424242; final paint paint = new paint(); final rect rect = new rect(0, 0, bm.getwidth(),bm.getheight()); final rectf rectf = new rectf(rect); final float roundpx = 17.0f; paint.setantialias(true); canvas.drawargb(0, 0, 0, 0); paint.setcolor(color); canvas.drawroundrect(rectf, roundpx, roundpx, paint); paint.setxfermode(new porterduffxfermode(mode.src_in)); canvas.drawbitmap(bm, rect, rect, paint); } catch (malformedurlexception e) { // todo auto-generated catch block e.printstacktrace(); }
your, lollipop device should have higher resolution if can find resolution
link - android changing image size depending on screen size?
Comments
Post a Comment