开发者

Remove bottom padding on widgets

As you can see in the link below there is an extra padding (around 2mm) below the EditText field. I can't seem to remove 开发者_高级运维this padding in anyway. This occurs with other widgets as well (like Buttons). It looks like Android is default adding this extra padding to all elements.

http://img266.imageshack.us/img266/4000/bottompadding.png


I suspect that is a function of the background image. Specifically, textfield*.9.png would appear to be your culprits (5 total images). You could take those images from your SDK, eliminate the extra padding, create a custom StateListDrawable that references them, and so forth.


After API 16 you can use the setViewPadding Method:

http://developer.android.com/reference/android/widget/RemoteViews.html#setViewPadding(int, int, int, int, int)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜