Posts Tagged ‘Development’

Android Unusual Behaviour – Nine Patch PNG’s

September 1st, 2009 @ 10:49 pm

0

I was doing some development on an app and got some weird behaviour where 3 buttons, all of the same background would line up as expected in eclipse and the emulator, but when I inserted a different button in the centre, it messed up when ran on the emulator.

I played around with a number different layouts trying to work out how I was going to fix this, assuming it was just my layout that was playing up. But I got curious and played around with the 9 patch png used for the new button and quickly realised that was the problem. To explain further, compare the left image (The layout shown in eclipse, how I wanted the view to display, and the right is how it displayed when inflated in the emulator [Ignore the button widths - that was me playing around, just look at the heights]).

Where-To-Do Button Eclipse Where-To-Do Emulator Button

(more…)

Tags: , ,
Posted in Uncategorized | No Comments »