我创建了一个自定义ImageView以在图像中创建一个透明矩形,从而使其后面的ImageView可见。但是,我做对了。我看了很多其他答案,这就是我想出的:publicclassMaskImageViewextendsImageView{privatePaintmaskPaint;publicMaskImageView(Contextcontext){super(context);init();}publicMaskImageView(Contextcontext,AttributeSetattrs){super(context,attrs);init();}publicMaskImag