imageview red dot subscript

Project information is used red dot subscript problem. Online read some implementations, all custom view, in ondraw draw a circle in the upper right corner iamgeview. But many can not achieve the subscript circle cut in the top right corner of imageview this function, all angle standard and imageview. It can actually be used in the form of a combination of view of implementation.


14425331-79caf7479b5dc370.png
Renderings .png

Imageview and is implemented by overlapping it textview;


14425331-68f9a9aafb0f8de3.png
code.png

My parent container is ConstraintLayout; with relativelayout is achievable. Record and share!

Reproduced in: https: //www.jianshu.com/p/adf355209d56

Guess you like

Origin blog.csdn.net/weixin_34041003/article/details/91074786