答案 0 :(得分:1)
您可以使用FrameLayout。
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<ImageView
android:id="@+id/image1"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<ImageView
android:id="@+id/image1"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</RelativeLayout>
或使用
Bitmap bitmap = Bitmap.createBitmap(100, 100, Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(bitmap);
Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);
paint.setColor(Color.BLACK);
canvas.drawBitmap(yourBitmap, 0, 0, paint) ; //Draw bitmap
canvas.drawCircle(50, 50, 10, paint); //Draw Circle
imageView.setImageBitmap(bitmap);
OR 您可以使用此库“https://github.com/codepath/android_guides/wiki/Basic-Painting-with-Views”