<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Gaunt Face &#124; Matthew Gaunt &#187; Development</title>
	<atom:link href="http://www.gauntface.co.uk/blog/tag/development/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gauntface.co.uk/blog</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Tue, 31 Jan 2012 23:21:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Android Unusual Behaviour &#8211; Nine Patch PNG&#8217;s</title>
		<link>http://www.gauntface.co.uk/blog/2009/09/01/android-unusual-behaviour-nine-patch-pngs/</link>
		<comments>http://www.gauntface.co.uk/blog/2009/09/01/android-unusual-behaviour-nine-patch-pngs/#comments</comments>
		<pubDate>Tue, 01 Sep 2009 21:49:49 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Nine Patch PNG]]></category>

		<guid isPermaLink="false">http://www.gauntface.co.uk/blog/?p=299</guid>
		<description><![CDATA[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 [...]]]></description>
			<content:encoded><![CDATA[<p>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.</p>
<p>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]).</p>
<p style="text-align: center;"><img class="size-medium wp-image-300    aligncenter" title="Where-To-Do Button Eclipse" src="http://www.gauntface.co.uk/blog/wp-content/uploads/2009/09/Screenshot1-223x300.png" alt="Where-To-Do Button Eclipse" width="223" height="300" /> <img class="size-medium wp-image-301 alignnone" title="Where-To-Do Emulator Button" src="http://www.gauntface.co.uk/blog/wp-content/uploads/2009/09/device-200x300.png" alt="Where-To-Do Emulator Button" width="200" height="300" /></p>
<p style="text-align: left;"><span id="more-299"></span></p>
<p style="text-align: left;">The problem was that android was putting in an empty space for text but didn&#8217;t know where to put it as I hadn&#8217;t set an area the bin image could put content, as soon as I put this in the 9 patch png, I got the required result.</p>
<p style="text-align: left;">So if anyone gets weird results, play with the 9.png if you are using them as this can mess up your layout as well as the actual layout itself.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gauntface.co.uk/blog/2009/09/01/android-unusual-behaviour-nine-patch-pngs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

