Regarding text editing

I am new to android. I created one sample page in which I need to indicate the background of the page as white. but then, if not focused, the editing text was not visible on a white background. How can I add a border of the desired color to the editing text so that it becomes visible. In addition, when I pressed the enter button in the edit text box, he added a new line to it. I also want to delete this. Can any body help me with this? thanks in advance

+5
source share
2 answers

You can set drawable for your edittext.

edittext_bg.xml: (put this file in your folder)

<?xml version="1.0" encoding="UTF-8" ?> 
<shape xmlns:android="http://schemas.android.com/apk/res/android">
  <solid android:color="#ffffff" /> 
  <stroke android:width="3dp" android:color="#000000" />   
  <padding android:left="2dp" android:top="2dp" android:right="2dp" android:bottom="2dp" /> 
</shape>

edittext android:background="@drawable/edittext_bg". edittext. edittext , .

android:singleLine="true" edittext, edittext.

+30

EditText Drawable, , . - ( , , / , .) http://androidwizard.net/2010/02/custom-button-backgrounds-using-a-selector-xml-layout/

, , , EditText . Hiral , , , , .

, , Hiral, , , . EditText

0

All Articles