ahrberg
ahrberg

Reputation: 617

Android - Position image inside EditText

I have a multiline textbox (EditText) for the user to enter a text. I need to limit the height of the text. User can also change the text size. So I need to draw a line in the textbox so the user know how much he can write. The line should be an image and positioned relatively in the textbox.

I think I know I need to extend the EditText in some way but I don't have a clue how to do it or if it's the right way...

Upvotes: 1

Views: 1454

Answers (2)

Dharmendra
Dharmendra

Reputation: 33996

For this purpose you can use the shape and draw lines inside the shape and also you can set the height and width of the shape.

Notepad example of the API demos will help you in your case.

Upvotes: 1

Shadow
Shadow

Reputation: 6277

You can create your own custom view components in android. Here is a doc for reference. Also look at this question.

Upvotes: 1

Related Questions