screenshot - take screen shot of a transparent image android -
i have main layout , linear layout llsplitpic on transparent image set background. when i'm trying capture screenshot threw code below returns transparent image want main layout image because i'm using llsplitview frame .
llsplitpic.setdrawingcacheenabled(true); llsplitpic.builddrawingcache(); llsplitpic.setdrawingcachequality(view.drawing_cache_quality_high); bitmap bmp = llsplitpic.getdrawingcache();
try method-
bitmap file = takesnapshot(parentlayout); bitmap takesnapshot(view v) { bitmap b = bitmap.createbitmap(v.getwidth(), v.getheight(), bitmap.config.argb_8888); canvas c = new canvas(b); v.draw(c); return b; }
Comments
Post a Comment