How to border ImageView on Android

Asked 2 years ago, Updated 2 years ago, 121 views

I want to put the border in ImageView and color it, what can I do?

android border imageview

2022-09-22 22:23

1 Answers

Put the drawable below in the background property of ImageView.

<?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>


2022-09-22 22:23

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.