<?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>Wrenbjor</title>
	<atom:link href="http://wrenbjor.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://wrenbjor.com</link>
	<description>Application Developer (PHP, Android, iOS)</description>
	<lastBuildDate>Mon, 02 Apr 2012 04:54:05 +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>Loving the WordPress app for iPad</title>
		<link>http://wrenbjor.com/2012/03/23/loving-the-wordpress-app-for-ipad/</link>
		<comments>http://wrenbjor.com/2012/03/23/loving-the-wordpress-app-for-ipad/#comments</comments>
		<pubDate>Fri, 23 Mar 2012 04:02:49 +0000</pubDate>
		<dc:creator>wrenbjor</dc:creator>
				<category><![CDATA[iOS]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://wrenbjor.com/?p=143</guid>
		<description><![CDATA[I really love how easy it is to manage my blog with this app. I love it so much that I am actually going to start writing again.]]></description>
			<content:encoded><![CDATA[<p>I really love how easy it is to manage my blog with this app. I love it so much that I am actually going to start writing again.</p>
]]></content:encoded>
			<wfw:commentRss>http://wrenbjor.com/2012/03/23/loving-the-wordpress-app-for-ipad/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Time for your CSS to get a little Sass</title>
		<link>http://wrenbjor.com/2012/03/23/time-for-your-css-to-get-a-little-sass/</link>
		<comments>http://wrenbjor.com/2012/03/23/time-for-your-css-to-get-a-little-sass/#comments</comments>
		<pubDate>Fri, 23 Mar 2012 04:00:38 +0000</pubDate>
		<dc:creator>wrenbjor</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://wrenbjor.com/?p=125</guid>
		<description><![CDATA[I don&#8217;t mean sass as in attitude, I mean Sass. &#8220;Sass makes CSS fun again. Sass is an extension of CSS3, adding nested rules, variables, mixins, selector inheritance, and more. It’s translated to well-formatted, standard CSS using the command line [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t mean sass as in attitude, I mean <a title="Sass" href="http://sass-lang.com">Sass</a>.</p>
<blockquote><p>&#8220;Sass makes CSS fun again. Sass is an extension of CSS3, adding nested rules, variables, mixins, selector inheritance, and more. It’s translated to well-formatted, standard CSS using the command line tool or a web-framework plugin.&#8221;</p></blockquote>
<h2>Getting Started</h2>
<p>The quote above covers everything Sass is about but lets go into some detail. Sass is a Ruby Gem that runs via the command line and watches a source file. As you save the file, Sass processes it and outputs a fully readable and useable CSS file for your site. </p>
<p>If you have Windows you can install <a href="http://www.ruby-lang.org/" title="Ruby">Ruby from here</a>. OS X has Ruby by default on the system but it is a 1.8.x version. If you want to upgrade to 1.9.x you can, I would suggest <a href="https://rvm.beginrescueend.com/" title="RMV">RMV</a>. It will let you run a virtual ruby environment with any version of Ruby you like. Some versions of Linux such as Ubuntu, come with package managers such as Aptitude. Try running <strong>sudo apt-get install -y ruby1.9.1-full</strong>. </p>
<p>Once you have Ruby installed, you need <a href="http://rubyforge.org/projects/rubygems/" title="Ruby Gems">Ruby Gems</a>. Now that we have all the prerequisites out of the way you can start using Sass.</p>
<p>Install Sass by typing <strong>sudo gem install sass</strong>.</p>
<p>No go to your project directory and type <strong>sass &#8211;watch style.scss:style.css</strong></p>
<p>Do all of you CSS editing in the style.scss file and every time you save Sass will convert it to the style.css file that you can load in your page.</p>
<h2>Dive into Sass</h2>
<p></p>
<h3>Variables</h3>
<p>Lets say your project has specific color pallet. You will more than likely use the same color is different places in your CSS file. The problem most designers face is if you need a change, you now have to go through all the lines of code that require the color change. Sass solves this issue by introducing variables.</p>
<p>The old way of color implementation:<br />
<code><br />
.box<br />
{<br />
    color: #0000FF;<br />
}</p>
<p>.title<br />
{<br />
    color: #0000FF;<br />
}</p>
<p>.sidebar<br />
{<br />
    color: #0000FF;<br />
}<br />
</code></p>
<p>As you can see if you need to change to a new text color, you now have to go into three places to make that change. Now here is the same example using Sass.</p>
<p><code><br />
$textColor = #0000FF;</p>
<p>.box<br />
{<br />
    color: $textColor;<br />
}</p>
<p>.title<br />
{<br />
    color: $textColor;<br />
}</p>
<p>.sidebar<br />
{<br />
    color: $textColor;<br />
}<br />
</code></p>
<p>The CSS file will look just like the 1st example but if you need to make a change, you only need to change the value of $textColor in one place and all of the values change.</p>
<p>That&#8217;s a sample for now, keep posted for other updates.</p>
]]></content:encoded>
			<wfw:commentRss>http://wrenbjor.com/2012/03/23/time-for-your-css-to-get-a-little-sass/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Growing Up with PHP, Zend Framework Enter stage left&#8230;</title>
		<link>http://wrenbjor.com/2011/09/11/growing-up-with-php-zend-framework-enter-stage-left/</link>
		<comments>http://wrenbjor.com/2011/09/11/growing-up-with-php-zend-framework-enter-stage-left/#comments</comments>
		<pubDate>Sun, 11 Sep 2011 05:13:30 +0000</pubDate>
		<dc:creator>wrenbjor</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[pdo]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[zend]]></category>

		<guid isPermaLink="false">http://wrenbjor.com/?p=122</guid>
		<description><![CDATA[I have been using PHP for nearly 10 years but my growth within the language stalled a while back. I could try to blame it on lack of challenges but really it&#8217;s been a lack of drive. Even if I [...]]]></description>
			<content:encoded><![CDATA[<p>I have been using PHP for nearly 10 years but my growth within the language stalled a while back. I could try to blame it on lack of challenges but really it&#8217;s been a lack of drive. Even if I had projects that I could have used to learn more about the language, I think I would have stuck to old programming habits because thats what I was familiar with. Lately at my day job, my projects have started to get more and more complex and I am quickly realizing that I need to grow in PHP and in my programming style.</p>
<p>About a year ago I started looking into PHP frameworks as well as the MCV structure for applications. At first I looked at CakePHP, then CodeIgnighter. I also found Kohana and Zend. I tried my hand at CodeIgnighter for a project or two but I really couldn&#8217;t get into it. I naturally went right to Kohana (It was forked from CI&#8217;s source but was built for PHP5). I ran into the same issues, I could get the framework up, build a sample project but it really didn&#8217;t excite me. At that point I stopped trying to work with frameworks and really focused on the language.</p>
<p>I learned about PDO, I started building classes, and I really focused on better programming with out the help of a framework. So fast forward to last month. I started to revisit PHP frameworks again. After looking at the current states of the frameworks I really feel that Zend will work best for me. I think the reason I could not get into the flow with the other frameworks was that I was jumping in head first into both a framework and MCV. Zend is the only one of the frameworks that allows you to work with it and not force your apps to be in the MVC structure. I have started working with Zend 1.11 but I am using it without MVC. I am really liking it so far and once I get more familiar with the framework I will jump into MVC.</p>
<p>If you want to follow along in my journey, you can start with these Zend resources:</p>
<ul>
<li><a href="http://zendframework.com/download/latest" title="Download the Zend Framework">Download the Zend Framework</a></li>
<li><a href="http://www.zend.com/en/resources/webinars/framework" title="Zend Framework Webinars">Zend Framework Webinars</a></li>
<li><a href="http://www.youtube.com/results?search_query=zend+framework+1.11+tutorial&#038;aq=4&#038;oq=zend+frame" title="Zend videos on Youtube">Zend videos on Youtube</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://wrenbjor.com/2011/09/11/growing-up-with-php-zend-framework-enter-stage-left/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cheat Day</title>
		<link>http://wrenbjor.com/2011/05/24/cheat-day/</link>
		<comments>http://wrenbjor.com/2011/05/24/cheat-day/#comments</comments>
		<pubDate>Tue, 24 May 2011 12:13:28 +0000</pubDate>
		<dc:creator>wrenbjor</dc:creator>
				<category><![CDATA[Four Hour Body]]></category>

		<guid isPermaLink="false">http://wrenbjor.com/?p=116</guid>
		<description><![CDATA[So It&#8217;s cheat day, Time to stuff your face with tons of candy and soda and all the junk you can&#8217;t have during the week right? Personally, I don&#8217;t look at cheat day as an excuse to binge. I use [...]]]></description>
			<content:encoded><![CDATA[<p>So It&#8217;s cheat day, Time to stuff your face with tons of candy and soda and all the junk you can&#8217;t have during the week right? Personally, I don&#8217;t look at cheat day as an excuse to binge. I use it as just eating like I used to before Slow-Carb. Skipping breakfast, a lunch, candy, soda, dinner, and desert. My food intake was never that large to begin with, my food intake quality is the reason my weight went out of control.</p>
<p>So use cheat day how you see fit, I think I will just use it to eat food with carbs <img src='http://wrenbjor.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  On that note, if you have any good recipes for Slow-Carb meals, send them my way and I will post them!</p>
]]></content:encoded>
			<wfw:commentRss>http://wrenbjor.com/2011/05/24/cheat-day/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Slow-Carb Breakfast</title>
		<link>http://wrenbjor.com/2011/05/22/slow-carb-breakfast/</link>
		<comments>http://wrenbjor.com/2011/05/22/slow-carb-breakfast/#comments</comments>
		<pubDate>Sun, 22 May 2011 19:29:10 +0000</pubDate>
		<dc:creator>wrenbjor</dc:creator>
				<category><![CDATA[Four Hour Body]]></category>

		<guid isPermaLink="false">http://wrenbjor.com/?p=113</guid>
		<description><![CDATA[This is what I have for breakfast every day on the Slow-Carb Diet. My base is always the same and I change up one or two things for verity. Base Ingredients (These Never Change): 2 Hardboiled eggs 1 1/2 Cup [...]]]></description>
			<content:encoded><![CDATA[<p>This is what I have for breakfast every day on the Slow-Carb Diet. My base is always the same and I change up one or two things for verity.</p>
<p>Base Ingredients (These Never Change):</p>
<p>2 Hardboiled eggs<br />
1 1/2 Cup Chopped Spinach<br />
1/4 Cup Salsa</p>
<p>Extras (One of any of these):</p>
<p>1/2lb Ground Turkey<br />
1 8oz Chicken Breast<br />
1 Cup Kidney Beans</p>
]]></content:encoded>
			<wfw:commentRss>http://wrenbjor.com/2011/05/22/slow-carb-breakfast/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Slow-Carb Chili-Redux</title>
		<link>http://wrenbjor.com/2011/05/22/slow-carb-chili-redux/</link>
		<comments>http://wrenbjor.com/2011/05/22/slow-carb-chili-redux/#comments</comments>
		<pubDate>Sun, 22 May 2011 19:04:25 +0000</pubDate>
		<dc:creator>wrenbjor</dc:creator>
				<category><![CDATA[Four Hour Body]]></category>

		<guid isPermaLink="false">http://wrenbjor.com/?p=109</guid>
		<description><![CDATA[I have been on the Four Hour Body program for about 2 weeks. I have been looking all over for good recipes and I was pointed to this Slow-Carb Chili recipe. It&#8217;s really good but I tweaked it a bit [...]]]></description>
			<content:encoded><![CDATA[<p>I have been on the Four Hour Body program for about 2 weeks. I have been looking all over for good recipes and I was pointed to this <a href="http://acollectionofrandomness.blogspot.com/2011/02/slow-carb-beef-chili.html">Slow-Carb Chili</a> recipe. It&#8217;s really good but I tweaked it a bit by removing some of the ingredients and making my own chili flavor mix. Heres what I did:</p>
<p>INGREDIENTS:<br />
2lb organic ground beef<br />
1 large yellow onion, chopped<br />
2 stalks of celery, chopped<br />
2 tbsp olive oil<br />
1 can red kidney beans, drained and rinsed well<br />
1 can black beans, drained and rinsed well<br />
4 chopped bell peppers<br />
2 cans stewed tomatos</p>
<p>Start by adding the olive oil in to a medium hot pan. Add the chopped onion and the chopped bell peppers to the pan and sauté them until the onions are translucent and the peppers are startting to soften. Add the beef and cook until there is no pink left. </p>
<p>Add the beans, celery, and the tomatos. Mix well and let it come to a boil. Add the chili seasoning and let simmer for 30min.</p>
<p>Chili Seasoning Ingredients:<br />
2 tablespoon paprika<br />
4 teaspoons kosher salt<br />
2 teaspoons onion powder<br />
2 teaspoons garlic powder<br />
2 teaspoons ground cayenne pepper (Use 1 teaspoon if you want it mild)<br />
2 teaspoons black pepper<br />
1 teaspoon dried thyme<br />
1 teaspoon dried oregano</p>
]]></content:encoded>
			<wfw:commentRss>http://wrenbjor.com/2011/05/22/slow-carb-chili-redux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Arrays</title>
		<link>http://wrenbjor.com/2011/05/09/php-arrays/</link>
		<comments>http://wrenbjor.com/2011/05/09/php-arrays/#comments</comments>
		<pubDate>Mon, 09 May 2011 04:53:49 +0000</pubDate>
		<dc:creator>wrenbjor</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[array]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://wrenbjor.com/?p=98</guid>
		<description><![CDATA[Ok I have been dealing with people that just don&#8217;t understand arrays&#8230; I don&#8217;t know why they cant grasp the concept but I am going to explain single and multi-demential arrays and how to use them. PHP Arrays An array [...]]]></description>
			<content:encoded><![CDATA[<p>Ok I have been dealing with people that just don&#8217;t understand arrays&#8230; I don&#8217;t know why they cant grasp the concept but I am going to explain single and multi-demential arrays and how to use them.</p>
<p><strong>PHP Arrays</strong></p>
<p>An array is a list of items that are tracked by an index number (or name &#8220;key&#8221;). Here is an example of a list of names:</p>
<p><code><br />
    &lt;?php<br />
        $array = array("Joe", "Bill", "Susan", "Kim");<br />
        echo "&lt;pre&gt;";<br />
        print_r($array);<br />
        echo "&lt;/pre&gt;";<br />
    ?&gt;<br />
</code></p>
<p>The above lines of code create an array (list) of names in order. In programming and most engineering fields we start counting at 0 and not 1. So the &#8220;First&#8221; item in the array is &#8220;Joe&#8221; but we call it the value at index 0. There are four items in the array, most people would count it like this:</p>
<p>    1 => &#8220;Joe&#8221;, 2 => &#8220;Bill&#8221;, 3 => &#8220;Susan&#8221;, 4 => &#8220;Kim&#8221;</p>
<p>but programmers count it like this:</p>
<p>    0 => &#8220;Joe&#8221;, 1 => &#8220;Bill&#8221;, 2 => &#8220;Susan&#8221;, 3 => &#8220;Kim&#8221;</p>
<p>Ok, so now when we run the code the &#8220;
<pre></pre>
<p>&#8221; tags will format the output for us and make it more readable. Another note, I echoed the
<pre> tags to the screen but you can't echo an Array. You must use print_r() to display the contents of the array to the screen as text.</p>
<p><code><br />
    ARRAY<br />
    {<br />
        0 => "Joe"<br />
        1 => "Bill"<br />
        2 => "Susan"<br />
        3 => "Kim"<br />
    }<br />
</code></p>
<p>Now if we want the value of index #2 we would do this:</p>
<p><code><br />
    echo $array[2];<br />
</code></p>
<p>We would see "Susan". Now this can get confusing with the numbers being shifted so I introduce Associative Arrays.</p>
<p><code><br />
    &lt;?php<br />
        $array = array("Boss" => "Joe", "Janitor" => "Bill", "Nurse" => "Susan", "Customer" => "Kim");<br />
        echo "&lt;pre&gt;";<br />
        print_r($array);<br />
        echo "&lt;/pre&gt;";<br />
    ?&gt;<br />
</code></p>
<p>You will notice that the main difference is the addition of a named index. So now we can call this</p>
<p><code><br />
    echo $array["Boss"];<br />
</code></p>
<p>We will get "Joe" as our output. All the examples I have shown are single demential arrays. Moving on...</p>
<p>Multi-demential Arrays are Arrays that have Arrays inside of them, observe:</p>
<p><code><br />
    &lt;?php<br />
        $array = array("Bosses" => array("Joe", "Matt"), "Customers" => array("Bill", "Susan", "Kim") );<br />
        echo "&lt;pre&gt;";<br />
        print_r($array);<br />
        echo "&lt;/pre&gt;";<br />
    ?&gt;<br />
</code></p>
<p>Now we have a list of positions that have a list of people.</p>
<p><code><br />
    ARRAY<br />
    {<br />
        "Bosses"<br />
        {<br />
            0 => "Joe"<br />
            1 => "Matt"<br />
        }</p>
<p>        "Customers"<br />
        {<br />
            0 => "Bill"<br />
            1 => "Susan"<br />
            2 => "Kim"<br />
        }<br />
    }<br />
</code></p>
<p>Now, to get this data we do this:</p>
<p><code><br />
    echo $array["Bosses"][0];<br />
    echo $array["Customers"][2];<br />
</code></p>
<p>This will output "Joe: and "Kim". We can make this an associative array and make it a little easier. </p>
<p><code><br />
    &lt;?php<br />
        $array = array("Bosses" => array("East Boss" => "Joe", "West Boss" => "Matt"), "Customers" => array("Rich" => "Bill", "Poor" => "Susan", "Avg" => "Kim") );<br />
        echo "&lt;pre&gt;";<br />
        print_r($array);<br />
        echo "&lt;/pre&gt;";<br />
    ?&gt;<br />
</code></p>
<p>Now we can get our data like this:</p>
<p><code><br />
    echo $array["Bosses"]["East Boss"]; // output will be "Joe"<br />
    echo $array["Customers"]["Poor"]; // output will be "Susan"<br />
</code></p>
<p>I hope this helps anyone that is confused.</p>
]]></content:encoded>
			<wfw:commentRss>http://wrenbjor.com/2011/05/09/php-arrays/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ListViews</title>
		<link>http://wrenbjor.com/2011/03/02/listviews/</link>
		<comments>http://wrenbjor.com/2011/03/02/listviews/#comments</comments>
		<pubDate>Wed, 02 Mar 2011 04:00:29 +0000</pubDate>
		<dc:creator>wrenbjor</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[List]]></category>
		<category><![CDATA[ListAdaptor]]></category>
		<category><![CDATA[ListView]]></category>
		<category><![CDATA[Toast]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://wrenbjor.com/?p=57</guid>
		<description><![CDATA[Today I am going to cover Lists. Lists can be made several ways, today I will show you how to make a static text based list. After we are displaying the list I will then show you how to send [...]]]></description>
			<content:encoded><![CDATA[<p>Today I am going to cover Lists. Lists can be made several ways, today I will show you how to make a static text based list. After we are displaying the list I will then show you how to send the text from the list to a Toast (popup) when the item is clicked.</p>
<p>Lets start with the XML.</p>
<pre>

&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;LinearLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
    android:orientation=&quot;vertical&quot;
    android:layout_width=&quot;fill_parent&quot;
    android:layout_height=&quot;fill_parent&quot;
    &gt;
&lt;ListView xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
	android:id=&quot;@+id/fulllist&quot;
	android:layout_width=&quot;fill_parent&quot;
	android:layout_height=&quot;fill_parent&quot;
/&gt;
&lt;/LinearLayout&gt;
</pre>
<p>This sets up a basic ListView widget to hold the list data and display it to the screen.</p>
<p>Now we want to make an Activity like normal but for this example your class should extend ListActivity. We will then create a list of movie monsters.</p>
<p>So speaking of&#8230; Here is the list of monsters.</p>
<pre>
static final String[] MONSTERS = new String[] { "Zombie", "Vampire", "Warewulf", "Blob" };
</pre>
<p>Now for the basic onCreate method:</p>
<pre>
@Override
public void onCreate(Bundle savedInstanceState)
{
    super.onCreate(savedInstanceState);
}
</pre>
<p>Now we need to make an adapter to hold the monsters. After the super call add:</p>
<pre>
setListAdapter(new ArrayAdapter&lt;String&gt;(this, android.R.layout.simple_list_item_1, MONSTERS));
</pre>
<p>android.R.layout.simple_list_item_1 is a default xml view for displaying a list. This can be customized for a variety of list displays.</p>
<p>Now lets make a ListView object that links to the XML widget:</p>
<pre>
ListView lv = getListView(); // Grabs the ListView widget that is tied to the Activity.
lv.setTextFilterEnabled(true); // Enable the Text Filter. Typing when this view has focus will filter the children to match the users input
</pre>
<p>Now we are going to create the click listener and the onItemClick event</p>
<pre>
lv.setOnItemClickListener(new OnItemClickListener()
{
    public void onItemClick(AdapterView&lt;?&gt; parent, View view, int position, long id)
    {
        // Do Stuff Here
    }
});
</pre>
<p>Lastly we will add the Toast call, put this in the onItemClick stub:</p>
<pre>
Toast.makeText(getApplicationContext(), ((TextView) view).getText(),Toast.LENGTH_SHORT).show();
</pre>
<p>Here is the whole Class:</p>
<pre>
public class Lister extends ListActivity {
	static final String[] MONSTERS = new String[] { &quot;Zombie&quot;, &quot;Vampire&quot;, &quot;Warewulf&quot;, &quot;Blob&quot; };

	@Override
	public void onCreate(Bundle savedInstanceState)
	{
	  super.onCreate(savedInstanceState);

	  setListAdapter(new ArrayAdapter&lt;String&gt;(this, android.R.layout.simple_list_item_1, MONSTERS));

	  ListView lv = getListView();
	  lv.setTextFilterEnabled(true);

	  lv.setOnItemClickListener(new OnItemClickListener()
	  {
	    public void onItemClick(AdapterView&lt;?&gt; parent, View view, int position, long id)
	    {
	    	Toast.makeText(getApplicationContext(), ((TextView) view).getText(),Toast.LENGTH_SHORT).show();
	    }
	  });
	}
}
</pre>

<a href='http://wrenbjor.com/2011/03/02/listviews/list1/' title='list1'><img width="150" height="150" src="http://wrenbjor.com/wp-content/uploads/2011/03/list1-150x150.png" class="attachment-thumbnail" alt="list1" title="list1" /></a>
<a href='http://wrenbjor.com/2011/03/02/listviews/list2/' title='list2'><img width="150" height="150" src="http://wrenbjor.com/wp-content/uploads/2011/03/list2-150x150.png" class="attachment-thumbnail" alt="list2" title="list2" /></a>

]]></content:encoded>
			<wfw:commentRss>http://wrenbjor.com/2011/03/02/listviews/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom Android Buttons</title>
		<link>http://wrenbjor.com/2011/01/12/custom-android-buttons/</link>
		<comments>http://wrenbjor.com/2011/01/12/custom-android-buttons/#comments</comments>
		<pubDate>Wed, 12 Jan 2011 05:18:09 +0000</pubDate>
		<dc:creator>wrenbjor</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Button]]></category>
		<category><![CDATA[DPI]]></category>
		<category><![CDATA[PNG]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://wrenbjor.com/?p=44</guid>
		<description><![CDATA[So I have been looking into buttons for my app and just like in HTML I hate the default &#60;button&#62; styling. So I started looking into custom buttons. A custom button is pretty easy, you just have to make 3 [...]]]></description>
			<content:encoded><![CDATA[<p>So I have been looking into buttons for my app and just like in HTML I hate the default &lt;button&gt; styling. So I started looking into custom buttons. </p>
<p>A custom button is pretty easy, you just have to make 3 button graphics and place it into your res/drawable-hdpi, res/drawable-mdpi, and res/drawable-ldpi folders. The folders are used for the different screen resolutions and pixel densities that exist in the Android world. There is a great article <a href="http://mobile.tutsplus.com/tutorials/mobile-design-tutorials/how-to-get-started-in-android-app-design/">here</a> and even greater detail <a href="http://developer.android.com/guide/practices/screens_support.html">here.</a></p>
<p>This is an example from one of my apps:</p>
<p>You start with an XML file to map the states of the button. Call it buttonmap.xml and put it in the same res/drawable-<h, l, m>dpi folder as the graphics you are pointing to. </p>
<pre>
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
 &lt;selector xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;&gt;
     &lt;item android:state_pressed=&quot;true&quot;
           android:drawable=&quot;@drawable/newbuttonpressed&quot; /&gt; &lt;!-- pressed --&gt;
     &lt;item android:state_focused=&quot;true&quot;
           android:drawable=&quot;@drawable/newbuttonfocused&quot; /&gt; &lt;!-- focused --&gt;
     &lt;item android:drawable=&quot;@drawable/newbutton&quot; /&gt; &lt;!-- default --&gt;
 &lt;/selector&gt;
</pre>
<p>Then in the activity&#8217;s XML layout file point to the buttonmap.xml definition file.</p>
<pre>
&lt;Button
    	android:id=&quot;@+id/addButton&quot;
    	android:layout_width=&quot;wrap_content&quot;
    	android:layout_height=&quot;wrap_content&quot;
    	android:background=&quot;@drawable/buttonmap&quot;
    	android:width=&quot;200dp&quot;
    	android:height=&quot;50dp&quot;
    	android:layout_gravity=&quot;center_horizontal&quot;
    	android:layout_marginTop=&quot;25dp&quot; /&gt;
</pre>
<p>The android:width=&#8221;200dp&#8221; and android:height=&#8221;50dp&#8221; force the button to be 200px X 50px. I only have one set of graphics so I am forcing to be that size on purpose. Before I am done with the app I will make 3 different buttons and remove the height and width attributes so Android can size it for me.</p>
<p>You can have the same pic made at different sizes in the folders listed above and Android chooses the best set of graphics based on the screen size of the device. If you only have one set of graphics then they could end up distorted on different screens.</p>
]]></content:encoded>
			<wfw:commentRss>http://wrenbjor.com/2011/01/12/custom-android-buttons/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The AndroidManifest.xml file&#8230;. (Updated)</title>
		<link>http://wrenbjor.com/2011/01/12/the-androidmanifest-xml-file/</link>
		<comments>http://wrenbjor.com/2011/01/12/the-androidmanifest-xml-file/#comments</comments>
		<pubDate>Wed, 12 Jan 2011 02:20:10 +0000</pubDate>
		<dc:creator>wrenbjor</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Manifest]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://wrenbjor.com/?p=20</guid>
		<description><![CDATA[This little file seems to be the bane of my Android programming existence&#8230; It is really not referenced well in the Android books and good luck finding good information on it online other than the Android Javadoc located here. I [...]]]></description>
			<content:encoded><![CDATA[<p>This little file seems to be the bane of my Android programming existence&#8230; It is really not referenced well in the Android books and good luck finding good information on it online other than the Android Javadoc located <a href="http://developer.android.com/guide/topics/manifest/manifest-intro.html">here</a>. I am going to cover what I have discovered on my own and hopefully help out some people along the way.</p>
<pre>
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
      package=&quot;com.wrenbjor.android.app.helloAndroid&quot;
      android:versionCode=&quot;1&quot;
      android:versionName=&quot;1.0&quot;&gt;
    &lt;application android:icon=&quot;@drawable/icon&quot; android:label=&quot;@string/app_name&quot;&gt;
        &lt;activity android:name=&quot;.helloAndroid&quot; android:label=&quot;@string/app_name&quot;&gt;
            &lt;intent-filter&gt;
                &lt;action android:name=&quot;android.intent.action.MAIN&quot; /&gt;
                &lt;category android:name=&quot;android.intent.category.LAUNCHER&quot; /&gt;
            &lt;/intent-filter&gt;
        &lt;/activity&gt;
        &lt;activity android:name=&quot;.GoodByeAndroid&quot; android:label=&quot;@string/app_name&quot; /&gt;
    &lt;/application&gt;
    &lt;uses-sdk android:minSdkVersion=&quot;7&quot; /&gt;

&lt;/manifest&gt;
</pre>
<p>This is a sample manifest file from a hello world app that has two views. From my extensive searching, most people have problems with intents and activities because they don&#8217;t have the manifest file setup correctly. To get started you really just need to add an <activity> tag for each class file (activity) that your application will launch.</p>
<pre>
&lt;activity android:name=&quot;.GoodByeAndroid&quot; android:label=&quot;@string/app_name&quot;&gt;&lt;/activity&gt;
&lt;!-- android:name is the name of the Class you are calling IT IS CASE SENSITIVE!!!
This is where most people mess up and get &quot;Force Close&quot; failures during testing. --&gt;
</pre>
<p>You will also see tags in example XML files that show an <intent-filter>, we will cover this in a later post but you can ignore it for now. This allows the system to launch pieces of our application.</p>
<p>Thats is for now, more to come later.</p>
]]></content:encoded>
			<wfw:commentRss>http://wrenbjor.com/2011/01/12/the-androidmanifest-xml-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

