Drawable Bitmap get width height Android

		Drawable dr = getResources().getDrawable(R.drawable.algebra);
		int h = dr.getIntrinsicHeight();
		int w = dr.getIntrinsicWidth();
 
		Bitmap ball = BitmapFactory.decodeResource(getResources(), R.drawable.algebra);
		int _nWidth = ball.getWidth();
		int _nHeight = ball.getHeight();
This entry was posted in Android Examples Code, Bitmap, drawing and tagged , . Bookmark the permalink.


Comments are closed.



5,938 views