Typing box

4

I'm trying to implement the similar google contacts model in my application. I already tried to put app:civ_border_width="1dp" in xml but also did not. I would like to do the image below:

asked by anonymous 28.06.2016 / 18:27

1 answer

4

in the drawable folder, create a new xml file with this code:

<?xml version="1.0" encoding="UTF-8"?>
<shape android:shape="rectangle"
       xmlns:android="http://schemas.android.com/apk/res/android">
       <solid android:color="#00ffffff" /> // Cor de fundo
       <stroke android:width="1.0dip" android:color="#ffd4d4d4" /> // tamanho e cor da borda
       <corners android:topLeftRadius="5.0dip" android:topRightRadius="5.0dip" android:bottomLeftRadius="5.0dip" android:bottomRightRadius="5.0dip" /> // Radius da borda
</shape>

And in your EditText add the xml you created as background:

android:background="@drawable/seu_xml"

Alias, app:civ_border_width="1dp" can only be used with the library CircleImageView (civ is the abbreviation).

    
28.06.2016 / 18:53