Android layout custom shap circular ImageView can set the background and picture separately

1、 Picture preview:

1、 Implementation functions:

It is required to realize that the layout is a circular picture, and the picture background and icon are separated and merged into one ImageView.

2、 Specific implementation:

ImageView is defined in the layout in XML. The key is to set two parameters: Android: backgroup (set background), Android: SRC (set picture in ImageView), and XML shape style (solid color, size width \ high) is defined under circular picture making drawable

The XML code is as follows:

Drawable style XML is as follows:

Through the above content, we introduced the knowledge that the Android layout custom shap circular ImageView can set the background and pictures separately. We hope it will be helpful to your future work and study.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>