Reputation: 876
I have a edit text and I want to out a line and the buttons like this:
I want to put he buttons too. If anyone know how to do this I appreciate the help. How to put the line and how to avoid the text to cross the line?
Upvotes: 0
Views: 616
Reputation: 876
Thank you for all the answers. I did It. I added a imageview on the EditText. Then I added a padding right on the edittext to the text not to cross the line. One more time, Thank you very much for all the answers.
Upvotes: 0
Reputation: 12372
As pointed by Collin, this is a compound view. All those buttons are not inside text box. You can consider a LinerLayout using horizontal orientation. Here goes the layout hierarchy:
LinearLayout (horizontal orientation)
|
+- EditText (fill parent)
|
+- LinearLayout (vertical orientation, width-30dp, gravity-right)
|
+- TextView (show remaining chars)
|
+- Button
|
+- Button
Note: I am giving just an idea how you can layout views to achieve said goal. You might need to tweak a little.
Upvotes: 0
Reputation: 771
What you actually want is a compound layout of your own construction. Something like:
One top level linear layout with the text view, a line drawable, and another LinearLayout which holds (vertically) the '160/1', the clip button, and the 'Enviar' button.
Upvotes: 1