// Created by plusminus on 18:23:13 - 03.10.2008
package org.andnav.osm.samples;

import java.util.ArrayList;

import android.app.ListActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.ListView;


public class SampleLoader extends ListActivity {
	// ===========================================================
	// Constants
	// ===========================================================

	// ===========================================================
	// Fields
	// ===========================================================

	// ===========================================================
	// Constructors
	// ===========================================================

	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		
		final ArrayList<String> list = new ArrayList<String>();
		
		list.add("OSMapView with Minimap, ZoomControls, Animations and MyLocationOverlay");
		list.add("Sample OSMContributor");
		list.add("OSMapView with ItemizedOverlay");
		list.add("OSMapView with ItemizedOverlayWithFocus");
		list.add("OSMapView with Minimap and ZoomControls");
		list.add("OSM Tracker");
		
		this.setListAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, list));
	}
	// ===========================================================
	// Getter & Setter
	// ===========================================================

	// ===========================================================
	// Methods from SuperClass/Interfaces
	// ===========================================================
	
	@Override
	protected void onListItemClick(ListView l, View v, int position, long id) {
		switch(position){
			case 0:
				this.startActivity(new Intent(this, SampleExtensive.class));
				break;
			case 1:
				this.startActivity(new Intent(this, SampleOSMContributor.class));
				break;
			case 2:
				this.startActivity(new Intent(this, SampleWithMinimapItemizedoverlay.class));
				break;
			case 3:
				this.startActivity(new Intent(this, SampleWithMinimapItemizedoverlayWithFocus.class));
				break;
			case 4:
				this.startActivity(new Intent(this, SampleWithMinimapZoomcontrols.class));
				break;
			case 5:
				this.startActivity(new Intent(this, SampleOSMTracking.class));
				break;
		}
	}

	// ===========================================================
	// Methods
	// ===========================================================

	// ===========================================================
	// Inner and Anonymous Classes
	// ===========================================================
}

@@ -1296,24 +1296,26 @@
 ontrols%22);%0D%0A
+//
 %09%09list.add(%22
@@ -2378,32 +2378,34 @@
 );%0D%0A%09%09%09%09break;%0D%0A
+//
 %09%09%09case 5:%0D%0A%09%09%09%09
@@ -2400,16 +2400,18 @@
 ase 5:%0D%0A
+//
 %09%09%09%09this
@@ -2462,32 +2462,34 @@
 cking.class));%0D%0A
+//
 %09%09%09%09break;%0D%0A%09%09%7D%0D

Remove OSMTracking sample