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 set开发者_运维问答Text 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,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
精彩评论