Task: fit large characters into a small button.
Problem: I noticed what when you create a button using non-alpha characters such as -, +, =.. etc, there is a lot of "padding" below and above the text, especially when you increase the font size. When you use alpha characters, it appears fine. ie. this is what hap开发者_运维百科pens
________ | | | | | ___ | | |___| | | | | | |________|when i want this..
________ | ___ | | |___| | |________| where the rectangle in the middle is a big giant dash.I have tried setting the padding to zero, but that doesn't work. Any ideas?
padding in font not in drawing system in android ! you can :
1- Add Typeface font dealing with such as typing purposess
2- Or try create your Own font for this you can use Private Character Edit in XP for more info take a look on this : http://www.techtipsgeek.com/design-font-characters-own-choice-windows-xp/1621/
3-Better practices, try to use images than typing those patters.
But note that when you make it working, use shipped typeface font with application because you cannot guarantee all devices will use the same font which you use to create patters.
good luck,
Mohammed,
精彩评论