0
나는 원형 이미지 뷰를 얻기 위해이 작업을 수행public static Bitmap getRoundedShape(Bitmap scaleBitmapImage,int width) { int targetWidth = width; int targetHeight = width; Bitmap targetBitmap = Bitmap.createBitmap(targetWidth, targetHeight,Bitmap.Config.ARGB_8888); Canvas canvas = new Canvas(targetBitmap); Path path = new Path(); path.addCircle(((float) targetWidth - 1)/2, ((float) targetHeight - 1)/2, (Math.min(((float) targetWidth), ((float) targetHeight))/2), Path.Direction.CCW); canvas.clipPath(path); Bitmap sourceBitmap = scaleBitmapImage; canvas.drawBitmap(sourceBitmap, new Rect(0, 0, sourceBitmap.getWidth(), sourceBitmap.getHeight()), new Rect(0, 0, targetWidth, targetHeight), null); return targetBitmap; }
,이 그림처럼 주위에 원형 테두리를 추가 할 수있는 방법은 매우 흥미로운 게시물은 이것에 대해이 http://i.stack.imgur.com/x8PhM.png안드로이드 원형 국경 주변에 원형 이미지