本文介绍了如何使圆形图案边框ImageView的编程机器人的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想打了code轮图像的色彩gradiant喜欢这幅画

I want to make round image by code with gradiant color like this picture

推荐答案

勾选此解决方案
它为我工作。

Check this solution https://github.com/vinc3m1/RoundedImageViewIt works for me.

与边境示例:

        <RoundedImageView
            android:id="@+id/imageViewAvatar"
            android:layout_width="150dp"
            android:layout_height="150dp"
            android:layout_gravity="center_horizontal|bottom"
            android:background="@drawable/border"
            android:cropToPadding="true"
            android:padding="7dp"
            android:scaleType="centerCrop"
            my:is_oval="true"
            my:round_background="false" />

在哪里边境你想要的任何边界的PNG。所有你需要设置填充,这是wiil你的形象和边框之间的距离。并设置课程的形象。

Where border is your png with any border you want. All you need is set padding, that wiil be a distance between your image and border. And Set the image, of course.

这篇关于如何使圆形图案边框ImageView的编程机器人的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-14 10:54