把本地图片形状做成圆形方法:

//id(drawable类型)

publicstaticvoidsetcircle(Contextcontext,intid,ImageViewimg)

{

Bitmapbitmap=BitmapFactory.decodeResource(context.getResources(),id);

RoundedBitmapDrawablemRound

=RoundedBitmapDrawableFactory.create(context.getResources(),bitmap);

mRound.setCircular(true);

img.setImageDrawable(mRound);

}