Typing box

Asked

Viewed 105 times

4

I want to implement in my application the similar model of google Contacts. I’ve tried to put app:civ_border_width="1dp" in xml but also failed. I would like to do the same image below:

inserir a descrição da imagem aqui


1 answer

4


in the briefcase drawable 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 his EditText add the xml that Voce 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).

  • Look at the error you made: Error:Execution failed for task ':app:mergeDebugResources'.&#xA;> org.xml.sax.SAXParseException; systemId: file:/C:/Projetos/Decorus/app/src/main/res/drawable/translucid.xml; lineNumber: 1; columnNumber: 44; O destino da instrução de processamento correspondente "[xX][mM][lL]" não é permitido.

  • I edited the answer.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.