tags:

views:

30

answers:

1

Hello, I created my TextView through code rather than XML. I want to draw a border around the TextView.How can we do this using code rather than XML? I also wanted when I try to setText for the TextView which is of some 2 lines then TextView is moving downward? plz also guide me to solve this problem. I will be waititng for reply .
Regarda,

A: 

Probably the easiest way to get a nice border to your text view would be to create a 9-patch image and set it as background to your text field. Just get padding right in your image and you have a border for your text view

I don't really understand your second question. Would setting your text field as a single line help? link to TextView API

Juhani