android - Get drawable size without scale -
i want size of drawable without scaling. function take drawable , can't take uri :
static private drawable applytheme (drawable drawable) { bitmap bitmap; if (drawable instanceof bitmapdrawable) { bitmap notmutable =((bitmapdrawable)drawable).getbitmap(); bitmap = notmutable.copy(bitmap.config.argb_8888, true); log.w(tag, "bitmap width:"+bitmap.getwidth()); } // etc... }
actually code print 93px width drawable whereas original image width 140px. difficulty can't drawable uri because function must not take in argument.
just need have original width & height of drawable.
and ration imagescale/appscale return 1...
thanks.
Comments
Post a Comment