How can I set a border for an ImageView
and change its color in Android?
When the image is loaded, you will see a scrollable toolbar at the bottom of your screen. There you will find the Border tool. Click on it. This should reveal a new window where you can choose the color and thickness of your border.
I set the below xml to the background of the Image View as Drawable. It works.
<?xml version="1.0" encoding="UTF-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android"> <solid android:color="#FFFFFF" /> <stroke android:width="1dp" android:color="#000000" /> <padding android:left="1dp" android:top="1dp" android:right="1dp" android:bottom="1dp" /> </shape>
And then add android:background="@drawable/yourXmlFileName"
to your ImageView
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With