-1

I am trying to create an EditText field which looks like the one used on the gmail app (compose new e-mail screen) for to field. (It is a field with a bracketed underline)

When I implement a text box, it comes like a box which can contain text.

What should I do to get a text field which should look like gmail.

I am new to Android. Thanks for your help.

Clarification: I think I have not been able to explain clearly what I want. Please refer to the image in the link http://tinypic.com/view.php?pic=261lzli&s=6 this is what I want. But when I am trying to implement EditText I get a different look and feel. I do not get this blue underline as a EtitText box, rather I get a box which has borders on all sides. Hope I have been able to clarify the requirement now.

Rohit
  • 261
  • 3
  • 9
  • seems to be similar question ! **check this** : http://stackoverflow.com/questions/13747809/android-edittext-gmail-like-to-field may help you ! – Tarsem Singh Jul 11 '13 at 14:24
  • Thanks but I had checked that link earlier. Didn't help as I am looking for something else. I want the editText field to just look like the gmail field i.e. a field which is not surrounded by borders on all sides but just a bracketed underline. – Rohit Jul 11 '13 at 14:25

1 Answers1

0

You would set that as a background resource. You'll need two different resources. One for if the EditText has focus. One for when it doesn't.

Ben Kane
  • 9,331
  • 6
  • 36
  • 58
  • I think I have not been able to explain clearly what I want. Please refer to the image in the link http://tinypic.com/view.php?pic=261lzli&s=6 this is what I want. But when I am trying to implement EditText I get a different look and feel. I do not get this blue underline as a EtitText box, rather I get a box which has borders on all sides. Hope I have been able to clarify the requirement now. Adding it to the question also. – Rohit Jul 12 '13 at 04:48
  • No I understand what you want. You just want the look not the behavior. Like I said. You'll need to set a background resource for that. Also, check your theme. You're probably on a Light theme. – Ben Kane Jul 15 '13 at 12:25