Android - resize resources
텍스트 가운데로
feedbackactivity에는 메뉴이름써주자
feedbackactivity에는 메뉴이름써주자
Bitmap bitmap= BitmapFactory.decodeResource(getResources(),R.mipmap.ic_memo); int width=bitmap.getWidth(); int height=bitmap.getHeight(); int newWidth=50; int newHeight=50; float scaleWidth=((float) newWidth)/width; float scaleHeight=((float) newHeight)/height; Matrix matrix=new Matrix(); matrix.postScale(scaleWidth,scaleHeight); Bitmap resizedBitmap=Bitmap.createBitmap(bitmap,0,0,width,height,matrix,true); bmd=new BitmapDrawable(getContext().getResources(),resizedBitmap);
댓글
댓글 쓰기