Button text issue

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Button text issue

Postby rkarthik » Fri Feb 06, 2009 8:53 pm

Hi Guys,

When i set a text inside a button (using setText() ) , in the view im able to see quite some amount of space between the text and the button borders, can you please help me out as to how i should be reducing it?
rkarthik
Junior Developer
Junior Developer
 
Posts: 17
Joined: Wed Jan 14, 2009 11:40 am

Top

Postby dmc1024 » Sat Feb 07, 2009 12:26 am

can you be a bit more specific with what you want?
you could make the button smaller altogether, or make the text font/size bigger
dmc1024
Freshman
Freshman
 
Posts: 8
Joined: Sat Jan 24, 2009 8:27 am

Postby rkarthik » Sat Feb 07, 2009 8:06 am

WHen i create a button with some text in it, i see some amount of space between the text and the button borders,at all four sides, i want to reduce the the space at the top and bottom and ake the space between the button text and the border lesser. When i try reducing the size of the button i see some portion of the button get cut..Please help
rkarthik
Junior Developer
Junior Developer
 
Posts: 17
Joined: Wed Jan 14, 2009 11:40 am

Postby darolla » Tue Feb 10, 2009 8:41 am

the solution is theme.

the button is a xml file.

inside this xml file there are some .9.png files referenced.

each .9.png file has help lines, the left und upper line tells how to grow the button (which part of the gfx is stretched)

the right und buttom line tells where the text starts.

http://code.google.com/intl/de-DE/andro ... #ninepatch

greetings,
darolla
Attachments
ninepatch_raw[1].png
ninepatch_raw[1].png (18.69 KiB) Viewed 184 times
User avatar
darolla
Master Developer
Master Developer
 
Posts: 273
Joined: Thu Sep 25, 2008 5:16 pm
Location: Dortmund, Germany

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 7 guests