我想做这样的事情。
这是带有名称和用户图像的列表视图行。
我进行了一些搜索,并完成了图像循环,但不是完美的解决方案。任何帮助都会帮助我。
我的代码添加到Image Loader类
public Bitmap processBitmap(Bitmap bitmap) {
int pixels = 0;
if (mRound == 0)
pixels = 120;
else
pixels = mRound;
Bitmap output = Bitmap.createBitmap(bitmap.getWidth(),
bitmap.getHeight(), Config.ARGB_8888);
Canvas canvas = new Canvas(output);
final int color = 0xff424242;
final Paint paint = new Paint();
final Rect rect = new Rect(0, 0, bitmap.getWidth(), bitmap.getHeight());
final RectF rectF = new RectF(rect);
final float roundPx = pixels;
paint.setAntiAlias(true);
canvas.drawARGB(0, 0, 0, 0);
paint.setColor(color);
canvas.drawRoundRect(rectF, roundPx, roundPx, paint);
paint.setXfermode(new PorterDuffXfermode(Mode.SRC_IN));
canvas.drawBitmap(bitmap, rect, rect, paint);
return output;
}
莫回无
收到一只叮咚
慕婉清6462132
相关分类