Bitmap bitmapOrg = BitmapFactory.decodeResource(this.getContext().getResources(), R.drawable.moon); Matrix matrix = new Matrix(); matrix.postRotate(-40); Bitmap resizedBitmap = Bitmap.createBitmap(bitmapOrg, 0, 0, bitmapOrg.getWidth(), bitmapOrg.getHeight(), matrix, true); BitmapDrawable bmd = new BitmapDrawable(resizedBitmap);
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/10404.html