I am working on an app for the xoom with the Honeycomb sdk. I have a basic gradient shape defined in res/drawable-hdpi/button.xml
... <item>
<shape>
<gradient
android:endColor="#848d00"
android:startColor="#c5d401" />
</shape>
</item> ...
I created a styles.xml and themes.xml which is referenced in AndroidManifest.xml to apply this style to all buttons.
For some reason when I view the buttons in the emulator they show up as unsymmetrical boxes:
http://postimage.org/image/1ozqno0uc/
Check that link to see what i'm talking about. Am I missing an attribute, is this a bug in the emulator? I applied more styles to curve the corner, but it remains divided in the middle by a pixel. I'd like it to be a regular 开发者_运维知识库looking box with no excess edge.
Thanks!
Yes, it's normal for 3.x emulators to show misaligned lines. It's only the emulator, not on the device, so don't worry. Probably it's because of the implementation of hardware accelerated graphics.
However, it will be of great advantages for you to use a real device for 3.x and above. The emulator is painfully slow.
精彩评论