我想做那样的事.

这是一个列表视图行,其中包含名称和用户图像.
我做了一些搜索并完成了图像循环,但不是完美的解决方案.任何帮助都会帮助我.
我的代码添加到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, …Run Code Online (Sandbox Code Playgroud) 我想创建一个带有加号和减号的圆形按钮,并在Android Contacts应用程序中使用,如下图所示:


我试着在这个应用程序中做圆圈菜单.
在"扩展"模式下,我绘制如下组件:
<RelativeLayout android:id="@+id/bigCircle">
<!--color full borders-->
<my.custom.component android:id="@+id/middleCircle">
<!--circle for buttons-->
<RelativeLayout android:id="@+id/smallCircle">
<!--minus button-->
</RelativeLayout>
</my.custom.component>
</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)
在onDraw方法中,my.custom.component我使用android.graphics.Pathwith android.graphics.Paint和一些数学在8个部分上划分圆圈.
在视觉上我完全如截图所示.但是当我按下圆圈的一部分时,我需要用另一种颜色重新绘制这个部分,以向用户显示正在发生的事情.
例如,我如何重新绘制部分画布从画布的另一部分切掉android.graphics.Path.
换句话说,我知道在onDraw方法中应该做什么重绘画布,我知道我可以在photoshop中绘制一些可绘制的绘图并且有一些"多屏障",我知道如何确定用户按下的部分.但我不知道如何选择画布的一部分并重新绘制它.