Unexpected button click on ICS

I have a custom button with a dropdown list of states that has a tight layout with very little indentation. This button looks great on MDPI and HDPI devices, but the gasket on the Motorola Xoom (ICS, MDPI device) is incorrect. Changing the padding and margin attributes does nothing.

Anyone have suggestions on what might cause unnecessary filling? I am pretty sure that both the state list can be used, and 9patch drawables is excellent (they are displayed fine on other MDPI devices).

An example of how the final product looks is attached - a green border indicates its ideal appearance (and the way the button looks at other devices); a magenta frame indicates an appearance on the Xoom. enter image description here

+1
source share
1 answer

I ran into some situation while developing appwidget. I added a button and try to cut off all the gaskets to make it small, but unsuccessful, there is always an upper gasket and a lower gasket. I believe this is a limitation of the Android system, so that all the buttons in the appwidget are large enough for end users to use them. However, sometimes we insist on small buttons because of the boss ... As the Melllvar workaround pointed out, I used a focused text TextView instead of the Button, it works as expected.

0
source

All Articles