0

I was wondering how you can accomplish drawing the border for a text view.I was looking for shape properties to achieve this. But turns out we cant do it there.

enter image description here

AskNilesh
  • 67,701
  • 16
  • 123
  • 163

1 Answers1

0

Create a drawable file

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="line">

    <stroke
       android:color="#f536a1"
       android:dashWidth="10px"
       android:dashGap="10px"
       android:width="1dp"/>
    </shape>

and use it as a background to your view.

Rahul Khurana
  • 8,577
  • 7
  • 33
  • 60