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

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -