Commits

Anonymous committed 51e0344

renaming

Comments (0)

Files changed (15)

android/placeUvote/AndroidManifest.xml

                 <category android:name="android.intent.category.LAUNCHER" />
             </intent-filter>
         </activity>
-        <activity android:name=".ShowDescription" >
+        <activity android:name=".PollDetail" >
+        </activity>
+        <activity android:name=".PollMap" >
         </activity>
         <activity android:name=".PollList" android:label="@string/app_name">
             <intent-filter>
                 <data android:name="vnd.android.cursor.item/vnd.placeUvote.polls" />
             </intent-filter>
         </activity>
-        <activity android:name=".PollDetail" android:label="@string/location_name">
+        <activity android:name=".PollVote" android:label="@string/location_name">
             <intent-filter>
                 <action android:name="android.intent.action.VIEW" />
                 <action android:name="android.intent.action.EDIT" />

android/placeUvote/bin/classes.dex

Binary file modified.

android/placeUvote/bin/placeUvote.apk

Binary file modified.

android/placeUvote/bin/resources.ap_

Binary file modified.

android/placeUvote/res/layout/polldetail.xml

-<?xml version="1.0" encoding="utf-8"?>
-<RelativeLayout
-android:layout_width="fill_parent"
-android:layout_height="fill_parent"
-xmlns:android="http://schemas.android.com/apk/res/android"
-android:orientation="vertical"
->
-<!-- android:background="#4000ffff" -->
-      <TextView
-			android:id="@+id/txtQuestion"
-			android:layout_width="300px"
-			android:layout_height="wrap_content"
-			android:paddingLeft="10px"
-			android:text="Question"
-			></TextView>  
-<TextView android:id="@+id/txtKey" android:textStyle="bold" android:paddingLeft="10px" 
-android:layout_height="wrap_content" android:text="Key" android:layout_width="300px" 
-		    android:layout_below="@+id/txtQuestion"
-></TextView>
-
-<TextView android:id="@+id/dateCreatedOn" android:textStyle="bold" android:paddingLeft="10px" 
-android:layout_height="wrap_content" android:text="dateCreatedOn" android:layout_width="300px" 
-		    android:layout_below="@+id/txtKey"
-></TextView>
-<TextView android:id="@+id/txtCreatedBy" android:textStyle="bold" android:paddingLeft="10px" 
-android:layout_height="wrap_content" android:text="CreatedBy" android:layout_width="300px" 
-		    android:layout_below="@+id/dateCreatedOn"
-></TextView>
-<TextView android:id="@+id/dateLastVote" android:textStyle="bold" android:paddingLeft="10px" 
-android:layout_height="wrap_content" android:text="dateLastVote" android:layout_width="300px" 
-		    android:layout_below="@+id/txtCreatedBy"
-></TextView>
-<TextView android:id="@+id/numTotalVotes" android:textStyle="bold" android:paddingLeft="10px" 
-android:layout_height="wrap_content" android:text="numTotalVotes" android:layout_width="300px" 
-		    android:layout_below="@+id/dateLastVote"
-></TextView>
-<CheckBox android:layout_height="wrap_content" android:text="@+id/chkPrivate" 
-android:layout_below="@+id/txtKey" android:id="@+id/chkPrivate" android:layout_width="wrap_content" 
-android:layout_alignLeft="@+id/txtKey"></CheckBox>
-<CheckBox android:layout_height="wrap_content" 
-android:layout_width="wrap_content" 
-android:text="@+id/chkAnonymous" 
-android:id="@+id/chkAnonymous"
-android:layout_below="@+id/chkPrivate"></CheckBox>
-<CheckBox android:layout_height="wrap_content" 
-android:layout_width="wrap_content" 
-android:text="@+id/chkOneChoice" 
-android:id="@+id/chkOneChoice"
-android:layout_below="@+id/chkAnonymous"></CheckBox>
-
-
-
-<TableLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/tblRating" 
-    android:layout_width="fill_parent" 
-    android:layout_height="wrap_content" 
-    android:layout_below="@+id/chkOneChoice"
-    >
-     <TableRow 
-          android:layout_width="fill_parent" 
-          android:layout_height="wrap_content"> 
-			<TextView
-			android:id="@+id/lblRating"
-			android:layout_width="300px"
-			android:layout_height="wrap_content"
-			android:text="Rating"
-			android:textStyle="bold"
-			>
-			</TextView>
-			<TextView
-			android:id="@+id/txtRating"
-			android:layout_width="300px"
-			android:layout_height="wrap_content"
-			android:paddingLeft="10px"
-			>
-			<!-- android:background="#ffffffff" -->
-			</TextView>
-     </TableRow> 
-</TableLayout>
-
-
-
-
-</RelativeLayout>
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout
+android:id="@+id/widget30"
+android:layout_width="fill_parent"
+android:layout_height="fill_parent"
+xmlns:android="http://schemas.android.com/apk/res/android"
+>
+<Button
+android:id="@+id/btnBack"
+android:layout_width="wrap_content"
+android:layout_height="wrap_content"
+android:text="Back"
+android:layout_alignParentBottom="true"
+android:layout_alignParentRight="true"
+>
+</Button>
+<Button
+android:id="@+id/btnVote"
+android:layout_width="wrap_content"
+android:layout_height="wrap_content"
+android:text="Vote"
+android:layout_alignParentBottom="true"
+android:layout_centerHorizontal="true"
+>
+</Button>
+<Button
+android:id="@+id/btnMap"
+android:layout_width="wrap_content"
+android:layout_height="wrap_content"
+android:text="Map"
+android:layout_alignParentBottom="true"
+android:layout_alignParentLeft="true"
+>
+</Button>
+<TextView
+android:id="@+id/storybox"
+android:layout_width="fill_parent"
+android:layout_height="wrap_content"
+android:text="Poll details go here ...."
+android:layout_alignParentTop="true"
+android:layout_alignParentLeft="true"
+>
+</TextView>
+</RelativeLayout>

android/placeUvote/src/com/placeuvote/android/PUVDatabase.java

 	/** Called when the database must be upgraded */
 	@Override
 	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
-        Log.w(PUVMap.LOG_TAG, "Upgrading database from version " + oldVersion + " to " +
+        Log.w(PollMap.LOG_TAG, "Upgrading database from version " + oldVersion + " to " +
                 newVersion + ", which will destroy all old data");
 
 		String[] sql = mContext.getString(R.string.PUVDatabase_onUpgrade).split("\n");

android/placeUvote/src/com/placeuvote/android/PUVMap.java

-package com.placeuvote.android;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
-import android.content.Context;
-import android.content.Intent;
-import android.graphics.drawable.Drawable;
-import android.location.Location;
-import android.location.LocationManager;
-import android.os.Bundle;
-import android.util.Log;
-import android.view.KeyEvent;
-import android.view.Menu;
-import android.view.MenuItem;
-import android.view.View;
-import android.widget.AdapterView;
-import android.widget.ArrayAdapter;
-import android.widget.Button;
-import android.widget.Spinner;
-import android.widget.TextView;
-import android.widget.AdapterView.OnItemSelectedListener;
-
-import com.google.android.maps.GeoPoint;
-import com.google.android.maps.ItemizedOverlay;
-import com.google.android.maps.MapActivity;
-import com.google.android.maps.MapController;
-import com.google.android.maps.MapView;
-import com.google.android.maps.MyLocationOverlay;
-import com.google.android.maps.OverlayItem;
-import com.placeuvote.android.R;
-import com.placeuvote.android.PUVDatabase.LocationsCursor;
-import com.placeuvote.android.PUVDatabase.PollsCursor;
-/**
- * Poll Locations
- */
-public class PUVMap extends MapActivity {
-    /**
-     * Application-wide log tag
-     */
-	static final String LOG_TAG = "placeUvote";
-
-	/** 
-	 * Database cursor to access user information
-	 */
-	private LocationsCursor Locations;
-	private Long poll_id;
-    /**
-     * LocationsOverlay
-     */
-    private class PUVOverlay extends ItemizedOverlay<OverlayItem> {
-
-        /**
-         * @param marker the push-pin
-         */
-        public PUVOverlay(Drawable marker) {
-            super(marker);
-            populate();
-        }
-
-        /**
-         * @see com.google.android.maps.ItemizedOverlay#size()
-         */
-        @Override
-        public int size() {
-        	int size = db.getLocationsCount(poll_id);
-        	return size;
-        }
-
-        /**
-         * @see com.google.android.maps.ItemizedOverlay#createItem(int)
-         */
-        @Override
-        protected OverlayItem createItem(int i) {
-        	LocationsCursor c = db.getLocations(i+1);
-        	String contactName = c.getColChoice();
-        	String description = c.getColAddress();
-        	int lat = (int) c.getColLat();
-        	int lon = (int) c.getColLong();
-        	return new OverlayItem(new GeoPoint(lat, lon), contactName, description);
-        }
-
-        /**
-         * React to tap events on Map by showing an appropriate detail activity
-         *
-         * @see com.google.android.maps.ItemizedOverlay#onTap(com.google.android.maps.GeoPoint, com.google.android.maps.MapView)
-         */
-        @Override
-        public boolean onTap(GeoPoint p, MapView mvMap1) {
-            long lat = p.getLatitudeE6();
-            long lon = p.getLongitudeE6();
-          
-            long rowid = -1;
-            LocationsCursor c = db.getLocations(poll_id); //LocationsCursor.SortBy.title
-            for( int i=0; i<c.getCount(); i++){
-            	if (Math.abs(c.getColLat()-lat)<1000 && Math.abs(c.getColLong()-lon)<1000){
-            		rowid = c.getColLocationsId();
-            		break;
-            	} else {
-            		c.moveToNext();
-            	}
-            }
-            
-            if (0 > rowid) { return false; }
-            
-            Bundle b = new Bundle();
-            b.putLong("_id", rowid);
-            Intent i = new Intent(PUVMap.this, PollDetail.class);
-            i.putExtras(b);
-            startActivity(i);
-
-            return true;
-        }
-    }
-
-
-    MapView mvMap;
-    PUVDatabase db;
-    MyLocationOverlay mMyLocationOverlay;
-    int latitude, longitude;
-
-    /**
-     * Called when the activity is first created.
-     *
-     * @see com.google.android.maps.MapActivity#onCreate(android.os.Bundle)
-     */
-    @Override
-    public void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-
-        setContentView(R.layout.main);
-
-        db = new PUVDatabase(this);
-
-        // Get current position
-        final Location myLocation
-            = getCurrentLocation((LocationManager) getSystemService(Context.LOCATION_SERVICE));
-
-        Spinner spnLocations = (Spinner) findViewById(R.id.spnLocations);
-        mvMap = (MapView) findViewById(R.id.mapmain);
-
-        // get the map controller
-        final MapController mc = mvMap.getController();
-
-        mMyLocationOverlay = new MyLocationOverlay(this, mvMap);
-        mMyLocationOverlay.enableMyLocation();
-        mMyLocationOverlay.runOnFirstFix(
-            new Runnable() {
-                public void run() {
-                    mc.animateTo(mMyLocationOverlay.getMyLocation());
-                    mc.setZoom(16);
-                }
-            });
-
-        Drawable marker = getResources().getDrawable(R.drawable.marker_image);
-        marker.setBounds(0, 0, marker.getIntrinsicWidth(), marker.getIntrinsicHeight());
-        mvMap.getOverlays().add(new PUVOverlay(marker));
-
-        mvMap.setClickable(true);
-        mvMap.setEnabled(true);
-        mvMap.setSatellite(false);
-        mvMap.setTraffic(false);
-        mvMap.setStreetView(false);
-        
-        // start out with a general zoom
-        mc.setZoom(16);
-        mvMap.invalidate();
-
-        // Create a button click listener for the List Locations button.
-        Button btnList = (Button) findViewById(R.id.btnShowList);
-        btnList.setOnClickListener(new Button.OnClickListener() {
-            public void onClick(View v) {
-                Intent intent = new Intent(PUVMap.this.getApplication(), PollList.class);
-                startActivity(intent);
-            }
-        });
-
-        // Load a HashMap with locations and positions
-        List<String> lsLocations = new ArrayList<String>();
-        final HashMap<String, GeoPoint> hmLocations = new HashMap<String, GeoPoint>();
-        hmLocations.put("Current Location", new GeoPoint(latitude, longitude));
-        lsLocations.add("Current Location");
-
-        // Add favorite locations from this user's record in Polls table
-        Locations = db.getLocations(poll_id);
-        for( int rowNum=0; rowNum<Locations.getCount(); rowNum++){
-        	Locations.moveToPosition(rowNum);
-         	hmLocations.put(Locations.getColAddress(), new GeoPoint((int)Locations.getColLat(), (int)Locations.getColLong()));
-            lsLocations.add(Locations.getColChoice());
-        }
-        
-        ArrayAdapter<String> aspnLocations
-            = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, lsLocations);
-        aspnLocations.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
-        spnLocations.setAdapter(aspnLocations);
-
-        // Setup a callback for the spinner
-        spnLocations.setOnItemSelectedListener(
-            new OnItemSelectedListener() {
-                public void onNothingSelected(AdapterView<?> arg0) { }
-
-                public void onItemSelected(AdapterView<?> parent, View v, int position, long id)  {
-                    TextView vt = (TextView) v;
-                    if ("Current Location".equals(vt.getText())) {
-                    	mMyLocationOverlay.enableMyLocation();
-                    	try {
-                    		mc.animateTo(mMyLocationOverlay.getMyLocation());
-                    	}
-                    	catch (Exception e) {
-                    		Log.i("MicroLocations", "Unable to animate map", e);
-                    	}
-                    	mvMap.invalidate();
-                    } else {
-                    	mMyLocationOverlay.disableMyLocation();
-                        mc.animateTo(hmLocations.get(vt.getText()));
-                    }
-                    mvMap.invalidate();
-                }
-            });
-    }
-
-    protected GeoPoint setCurrentGeoPoint(){
-    	return mMyLocationOverlay.getMyLocation();
-    }
-    
-    /**
-     * @see com.google.android.maps.MapActivity#onPause()
-     */
-    @Override
-    public void onPause() {
-        super.onPause();
-        mMyLocationOverlay.disableMyLocation();
-    }
-
-    // stop tracing when application ends
-    @Override
-    public void onDestroy() {
-        super.onDestroy();
-    }
-
-    /**
-     * @see com.google.android.maps.MapActivity#onResume()
-     */
-    @Override
-    public void onResume() {
-        super.onResume();
-        mMyLocationOverlay.enableMyLocation();
-    }
-
-    /**
-     * Setup menus for this page
-     *
-     * @see android.app.Activity#onCreateOptionsMenu(android.view.Menu)
-     */
-    @Override
-    public boolean onCreateOptionsMenu(Menu menu) {
-        boolean supRetVal = super.onCreateOptionsMenu(menu);
-        menu.add(Menu.NONE, 0, Menu.NONE, getString(R.string.map_menu_zoom_in));
-        menu.add(Menu.NONE, 1, Menu.NONE, getString(R.string.map_menu_zoom_out));
-        menu.add(Menu.NONE, 2, Menu.NONE, getString(R.string.map_menu_set_satellite));
-        menu.add(Menu.NONE, 3, Menu.NONE, getString(R.string.map_menu_set_map));
-        menu.add(Menu.NONE, 4, Menu.NONE, getString(R.string.map_menu_set_traffic));
-        menu.add(Menu.NONE, 5, Menu.NONE, getString(R.string.map_menu_show_list));
-        return supRetVal;
-    }
-
-    /**
-     * @see android.app.Activity#onOptionsItemSelected(android.view.MenuItem)
-     */
-    @Override
-    public boolean onOptionsItemSelected(MenuItem item) {
-        switch (item.getItemId()) {
-            case 0:
-                // Zoom in
-                zoomIn();
-                return true;
-            case 1:
-                // Zoom out
-                zoomOut();
-                return true;
-            case 2:
-                // Toggle satellite views
-                mvMap.setSatellite(!mvMap.isSatellite());
-                return true;
-            case 3:
-                // Toggle street views
-                mvMap.setStreetView(!mvMap.isStreetView());
-                return true;
-            case 4:
-                // Toggle traffic views
-                mvMap.setTraffic(!mvMap.isTraffic());
-                return true;
-            case 5:
-                // Show the job list activity
-                startActivity(new Intent(PUVMap.this, PollList.class));
-                return true;
-        }
-        return false;
-    }
-
-    /**
-     * @see android.app.Activity#onKeyDown(int, android.view.KeyEvent)
-     */
-    @Override
-    public boolean onKeyDown(int keyCode, KeyEvent event) {
-        switch (keyCode) {
-            case KeyEvent.KEYCODE_DPAD_UP: // zoom in
-                zoomIn();
-                return true;
-            case KeyEvent.KEYCODE_DPAD_DOWN: // zoom out
-                zoomOut();
-                return true;
-            case KeyEvent.KEYCODE_BACK: // go back (meaning exit the app)
-                finish();
-                return true;
-            default:
-                return false;
-        }
-    }
-
-    /**
-     * Required method to indicate whether we display routes
-     */
-    @Override
-    protected boolean isRouteDisplayed() { return false; }
-
-    /**
-     * Zoom in on the map
-     */
-    private void zoomIn() {
-        mvMap.getController().setZoom(mvMap.getZoomLevel() + 1);
-    }
-
-    /**
-     * Zoom out on the map, but not past level 10
-     */
-    private void zoomOut() {
-        int zoom = mvMap.getZoomLevel() - 1;
-        if (zoom < 5) { zoom = 5; }
-        mvMap.getController().setZoom(zoom);
-    }
-
-    /**
-     * @return the current location
-     */
-    private Location getCurrentLocation(LocationManager lm) {
-         Location l = lm.getLastKnownLocation("gps");
-        if (null != l) { return l; }
-
-        // getLastKnownLocation returns null if loc provider is not enabled
-        l = new Location("gps");
-        l.setLatitude(42.352299);
-        l.setLatitude(-71.063979);
-
-        return l;
-    }
-
-}

android/placeUvote/src/com/placeuvote/android/PollDetail.java

 package com.placeuvote.android;
 
+import com.placeuvote.android.R;
+
+
 import android.app.Activity;
-import android.app.AlertDialog;
-import android.content.DialogInterface;
+import android.os.Bundle;
+import android.widget.Button;
+import android.widget.TextView;
 import android.content.Intent;
-import android.os.Bundle;
-import android.os.Handler;
-import android.os.Message;
-import android.view.Menu;
-import android.view.MenuItem;
-import android.view.View;
-import android.widget.Button;
-import android.widget.ImageButton;
-import android.widget.TextView;
-import android.widget.CheckBox;
+import android.view.*;
 
-import com.placeuvote.android.R;
-import com.placeuvote.android.PUVDatabase.PollsCursor;
+import com.placeuvote.android.PollMap;
+import com.placeuvote.android.PollVote;
 
 
-/**
- * PollDetail
- */
-public class PollDetail extends Activity {
-    private static Integer poll_id;
-    private static TextView txtKey;
-    private static CheckBox chkPrivate;
-    private static CheckBox chkAnonymous;
-    private static CheckBox chkOneChoice;
-    private static TextView numLocations;
-    private static TextView numDates;
-    private static TextView dateCreatedOn;
-    private static TextView txtCreatedBy;
-    private static TextView dateLastVote;
-    private static TextView numTotalVotes;
-    private static TextView txtUser;
-    private static TextView txtEmail;
-    private static TextView txtQuestion;
+public class PollDetail extends Activity 
+{
+	
+    private static Button btnMap; 
+    private static Button btnVote; 
+    private static Button btnBack;
     
-    PUVDatabase db;
+    public void onCreate(Bundle icicle) 
+    {
+        super.onCreate(icicle);
+        setContentView(R.layout.polldetail);
+        
+        String theStory = null;
+        
+        
+        Intent startingIntent = getIntent();
+        
+        if (startingIntent != null)
+        {
+        	Bundle b = startingIntent.getBundleExtra("android.intent.extra.INTENT");
+        	if (b == null)
+        	{
+        		theStory = "Sorry could not retrieve poll details";
+        	}
+        	else
+    		{
+        		theStory = b.getString("title") + "\n\n" + b.getString("pubdate") + "\n\n" + b.getString("description").replace('\n',' ') + "\n\nMore information:\n" + b.getString("link");
+    		}
+        }
+        else
+        {
+        	theStory = "Information Not Found.";
+        
+        }
+        
+        TextView db= (TextView) findViewById(R.id.storybox);
+        db.setText(theStory);
+        
+        btnBack = (Button) findViewById(R.id.btnBack);
+        btnBack.setOnClickListener(btnBackClick);
+        btnMap = (Button) findViewById(R.id.btnMap);
+        btnMap.setOnClickListener(btnMapClick);
+        btnVote = (Button) findViewById(R.id.btnVote);
+        btnVote.setOnClickListener(btnVoteClick);        
+    }
+ 
+    private final Button.OnClickListener btnBackClick = new Button.OnClickListener() 
+    {
+        public void onClick(View v) 
+        {
+        	finish();
+        }
+    };  
+    
+    private final Button.OnClickListener btnMapClick = new Button.OnClickListener() {
+        public void onClick(View v) {
+            Intent i = new Intent(PollDetail.this, PollMap.class);
+            Bundle b = new Bundle();
+            b.putInt("poll_id", (int) 1);
+            i.putExtras(b);
 
-    private PollsCursor poll;
-    /**
-    final CheckBox chkPrivate = (CheckBox) findViewById(R.id.chkPrivate);
-    chkPrivate.setOnClickListener(new OnClickListener() {
-	    public void onClick(View v) {
-		// Perform action on clicks, depending on whether it's now checked
-		if (((CheckBox) v).isChecked()) {
-		    Toast.makeText(HelloFormStuff.this, "Selected", Toast.LENGTH_SHORT).show();
-		} else {
-		    Toast.makeText(HelloFormStuff.this, "Not selected", Toast.LENGTH_SHORT).show();
-		}
-	    }
-	});
-    */
-	public boolean IntToBool(int intValue)
-	{
-	    return (intValue != 0);
-	}
+            startActivity(i);
+        }
+    };  
     
-    /**
-     * Called when the activity is first created.
-     *
-     * @see android.app.Activity#onCreate(android.os.Bundle)
-     */
-    @Override
-    public void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-/** Edit res/layout/polldetail.xml to match these form elements
- *  - txtEmail, txtUser, numLocations and numDates not displayed */
-        setContentView(R.layout.polldetail);
-        txtKey = (TextView) findViewById(R.id.txtKey);
-        chkPrivate = (CheckBox) findViewById(R.id.chkPrivate);
-        chkAnonymous = (CheckBox) findViewById(R.id.chkAnonymous);
-        chkOneChoice = (CheckBox) findViewById(R.id.chkOneChoice);
-        dateCreatedOn = (TextView) findViewById(R.id.dateCreatedOn);
-        txtCreatedBy = (TextView) findViewById(R.id.txtCreatedBy);
-        dateLastVote = (TextView) findViewById(R.id.dateLastVote);
-        numTotalVotes = (TextView) findViewById(R.id.numTotalVotes);
-        txtQuestion = (TextView) findViewById(R.id.txtQuestion);
+    private final Button.OnClickListener btnVoteClick = new Button.OnClickListener() {
+        public void onClick(View v) {
+            Intent i = new Intent(PollDetail.this, PollVote.class);
+            Bundle b = new Bundle();
+            b.putInt("poll_id", (int) 1);
+            i.putExtras(b);
 
-        // get the poll_id for this poll from the bundle passed by PollList
-        Bundle bIn = this.getIntent().getExtras();
-        poll_id = Integer.valueOf(bIn.getInt("_id"));
-
-        db = new PUVDatabase(this);
-        poll = db.getPollDetails(poll_id.longValue());
-
-		java.text.DateFormat dateFormat = android.text.format.DateFormat.getDateFormat(getApplicationContext());
-	        // fill in the form and display
-		txtKey.setText(poll.getColKey());
-		chkPrivate.setChecked(IntToBool(poll.getColPrivate()));
-		chkAnonymous.setChecked(IntToBool(poll.getColAnonymous()));
-		chkOneChoice.setChecked(IntToBool(poll.getColOneChoice()));
-		dateCreatedOn.setText("Created: " + dateFormat.format(poll.getColCreatedOn()));
-		txtCreatedBy.setText(poll.getColCreatedBy());
-		dateLastVote.setText("Last vote: " + dateFormat.format(poll.getColLastVote()));
-		numTotalVotes.setText(poll.getColTotalVotes());
-        txtUser.setText(poll.getColUser());
-        txtQuestion.setText(poll.getColQuestion());
-
-    }
-
-    /**
-     * Setup menus for this page.
-     *
-     * @see android.app.Activity#onCreateOptionsMenu(android.view.Menu)
-     */
-    @Override
-    public boolean onCreateOptionsMenu(Menu menu) {
-        boolean supRetVal = super.onCreateOptionsMenu(menu);
-        menu.add(0, 0, Menu.NONE, getString(R.string.detail_menu_back_to_list));
-        menu.add(0, 1, Menu.NONE, getString(R.string.detail_menu_poll_info));
-        menu.add(0, 2, Menu.NONE, getString(R.string.detail_menu_delete_location));
-        menu.add(0, 3, Menu.NONE, getString(R.string.detail_menu_edit_location));
-        return supRetVal;
-    }
-
-    /**
-     * @see android.app.Activity#onOptionsItemSelected(android.view.MenuItem)
-     */
-    @Override
-    public boolean onOptionsItemSelected(MenuItem item) {
-        switch (item.getItemId()) {
-            case 0:
-                // Go back to the list page
-                finish();
-                return true;
-            case 1:
-                // Go to the employer detail page
-                Intent iEmp = new Intent(PollDetail.this, VoterDetail.class);
-                Bundle bEmp = new Bundle();
-                bEmp.putInt("_id", poll_id.intValue());
-                iEmp.putExtras(bEmp);
-
-                startActivity(iEmp);
-                return true;
-            case 2:
-            	// Delete this job
-                // Setup Delete Alert Dialog
-            	final int DELETE_JOB = 0;
-            	final int CANCEL_DELETE = 1;
-            	
-                Handler mHandler = new Handler() {    	
-                    public void handleMessage(Message msg) {
-                        switch (msg.what) {
-                            case DELETE_JOB:
-                            db.deleteLocation(poll_id);
-                            startActivity(new Intent(PollDetail.this, PollList.class));
-                            break;
-                    
-                            case CANCEL_DELETE:
-                            // Do nothing
-                            break;
-                        }
-                    }
-                };
-                // "Answer" callback.
-                final Message acceptMsg = Message.obtain();
-                acceptMsg.setTarget(mHandler);
-                acceptMsg.what = DELETE_JOB;
-                    
-                // "Cancel" callback.
-                final Message rejectMsg = Message.obtain();
-                rejectMsg.setTarget(mHandler);
-                rejectMsg.what = CANCEL_DELETE;
-
-                new AlertDialog.Builder(this)
-                  .setMessage("Are you sure you want to delete this poll?")
-                  .setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
-                	  public void onClick(DialogInterface dialog, int value) {
-                		  rejectMsg.sendToTarget();
-                	  }})
-                  .setPositiveButton("Delete", new DialogInterface.OnClickListener() {
-                	  public void onClick(DialogInterface dialog, int value) {
-                    		  acceptMsg.sendToTarget();
-                	  }})
-                  .setOnCancelListener(new DialogInterface.OnCancelListener() {
-                        public void onCancel(DialogInterface dialog) {
-                          rejectMsg.sendToTarget();
-                      }})
-                      .show();    
-            	return true;
-            case 3:
-            	// Edit this job
-            	// Start the Edit Location Activity, passing this poll's id
-                Intent iEdit = new Intent(PollDetail.this, EditPoll.class);
-                Bundle bEdit = new Bundle();
-                bEdit.putInt("_id", poll_id);
-                iEdit.putExtras(bEdit);
-                startActivity(iEdit);            	
-            	return true;
-            	
-            default:
-                return false;
+            startActivity(i);
         }
-    }
+    };       
+    
+    
 }

android/placeUvote/src/com/placeuvote/android/PollList.java

     // job
     private final Button.OnClickListener btnViewClick = new Button.OnClickListener() {
         public void onClick(View v) {
-            Intent i = new Intent(PollList.this, PollDetail.class);
+            Intent i = new Intent(PollList.this, PollVote.class);
             Bundle b = new Bundle();
             puvButton vb = (puvButton) v;
             cursor.moveToPosition(vb.jrow);

android/placeUvote/src/com/placeuvote/android/PollMap.java

+package com.placeuvote.android;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+import android.content.Context;
+import android.content.Intent;
+import android.graphics.drawable.Drawable;
+import android.location.Location;
+import android.location.LocationManager;
+import android.os.Bundle;
+import android.util.Log;
+import android.view.KeyEvent;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.view.View;
+import android.widget.AdapterView;
+import android.widget.ArrayAdapter;
+import android.widget.Button;
+import android.widget.Spinner;
+import android.widget.TextView;
+import android.widget.AdapterView.OnItemSelectedListener;
+
+import com.google.android.maps.GeoPoint;
+import com.google.android.maps.ItemizedOverlay;
+import com.google.android.maps.MapActivity;
+import com.google.android.maps.MapController;
+import com.google.android.maps.MapView;
+import com.google.android.maps.MyLocationOverlay;
+import com.google.android.maps.OverlayItem;
+import com.placeuvote.android.R;
+import com.placeuvote.android.PUVDatabase.LocationsCursor;
+import com.placeuvote.android.PUVDatabase.PollsCursor;
+/**
+ * Poll Map
+ */
+public class PollMap extends MapActivity {
+    /**
+     * Application-wide log tag
+     */
+	static final String LOG_TAG = "placeUvote";
+
+	/** 
+	 * Database cursor to access user information
+	 */
+	private LocationsCursor Locations;
+	private Long poll_id;
+    /**
+     * LocationsOverlay
+     */
+    private class PUVOverlay extends ItemizedOverlay<OverlayItem> {
+
+        /**
+         * @param marker the push-pin
+         */
+        public PUVOverlay(Drawable marker) {
+            super(marker);
+            populate();
+        }
+
+        /**
+         * @see com.google.android.maps.ItemizedOverlay#size()
+         */
+        @Override
+        public int size() {
+        	int size = db.getLocationsCount(poll_id);
+        	return size;
+        }
+
+        /**
+         * @see com.google.android.maps.ItemizedOverlay#createItem(int)
+         */
+        @Override
+        protected OverlayItem createItem(int i) {
+        	LocationsCursor c = db.getLocations(i+1);
+        	String contactName = c.getColChoice();
+        	String description = c.getColAddress();
+        	int lat = (int) c.getColLat();
+        	int lon = (int) c.getColLong();
+        	return new OverlayItem(new GeoPoint(lat, lon), contactName, description);
+        }
+
+        /**
+         * React to tap events on Map by showing an appropriate detail activity
+         *
+         * @see com.google.android.maps.ItemizedOverlay#onTap(com.google.android.maps.GeoPoint, com.google.android.maps.MapView)
+         */
+        @Override
+        public boolean onTap(GeoPoint p, MapView mvMap1) {
+            long lat = p.getLatitudeE6();
+            long lon = p.getLongitudeE6();
+          
+            long rowid = -1;
+            LocationsCursor c = db.getLocations(poll_id); //LocationsCursor.SortBy.title
+            for( int i=0; i<c.getCount(); i++){
+            	if (Math.abs(c.getColLat()-lat)<1000 && Math.abs(c.getColLong()-lon)<1000){
+            		rowid = c.getColLocationsId();
+            		break;
+            	} else {
+            		c.moveToNext();
+            	}
+            }
+            
+            if (0 > rowid) { return false; }
+            
+            Bundle b = new Bundle();
+            b.putLong("_id", rowid);
+            Intent i = new Intent(PollMap.this, PollVote.class);
+            i.putExtras(b);
+            startActivity(i);
+
+            return true;
+        }
+    }
+
+
+    MapView mvMap;
+    PUVDatabase db;
+    MyLocationOverlay mMyLocationOverlay;
+    int latitude, longitude;
+
+    /**
+     * Called when the activity is first created.
+     *
+     * @see com.google.android.maps.MapActivity#onCreate(android.os.Bundle)
+     */
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+
+        setContentView(R.layout.map);
+
+        db = new PUVDatabase(this);
+
+        // Get current position
+        final Location myLocation
+            = getCurrentLocation((LocationManager) getSystemService(Context.LOCATION_SERVICE));
+
+        Spinner spnLocations = (Spinner) findViewById(R.id.spnLocations);
+        mvMap = (MapView) findViewById(R.id.mapmain);
+
+        // get the map controller
+        final MapController mc = mvMap.getController();
+
+        mMyLocationOverlay = new MyLocationOverlay(this, mvMap);
+        mMyLocationOverlay.enableMyLocation();
+        mMyLocationOverlay.runOnFirstFix(
+            new Runnable() {
+                public void run() {
+                    mc.animateTo(mMyLocationOverlay.getMyLocation());
+                    mc.setZoom(16);
+                }
+            });
+
+        Drawable marker = getResources().getDrawable(R.drawable.marker_image);
+        marker.setBounds(0, 0, marker.getIntrinsicWidth(), marker.getIntrinsicHeight());
+        mvMap.getOverlays().add(new PUVOverlay(marker));
+
+        mvMap.setClickable(true);
+        mvMap.setEnabled(true);
+        mvMap.setSatellite(false);
+        mvMap.setTraffic(false);
+        mvMap.setStreetView(false);
+        
+        // start out with a general zoom
+        mc.setZoom(16);
+        mvMap.invalidate();
+
+        // Create a button click listener for the List Locations button.
+        Button btnList = (Button) findViewById(R.id.btnShowList);
+        btnList.setOnClickListener(new Button.OnClickListener() {
+            public void onClick(View v) {
+                Intent intent = new Intent(PollMap.this.getApplication(), PollList.class);
+                startActivity(intent);
+            }
+        });
+
+        // Load a HashMap with locations and positions
+        List<String> lsLocations = new ArrayList<String>();
+        final HashMap<String, GeoPoint> hmLocations = new HashMap<String, GeoPoint>();
+        hmLocations.put("Current Location", new GeoPoint(latitude, longitude));
+        lsLocations.add("Current Location");
+
+        // Add favorite locations from this user's record in Polls table
+        Locations = db.getLocations(poll_id);
+        for( int rowNum=0; rowNum<Locations.getCount(); rowNum++){
+        	Locations.moveToPosition(rowNum);
+         	hmLocations.put(Locations.getColAddress(), new GeoPoint((int)Locations.getColLat(), (int)Locations.getColLong()));
+            lsLocations.add(Locations.getColChoice());
+        }
+        
+        ArrayAdapter<String> aspnLocations
+            = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, lsLocations);
+        aspnLocations.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
+        spnLocations.setAdapter(aspnLocations);
+
+        // Setup a callback for the spinner
+        spnLocations.setOnItemSelectedListener(
+            new OnItemSelectedListener() {
+                public void onNothingSelected(AdapterView<?> arg0) { }
+
+                public void onItemSelected(AdapterView<?> parent, View v, int position, long id)  {
+                    TextView vt = (TextView) v;
+                    if ("Current Location".equals(vt.getText())) {
+                    	mMyLocationOverlay.enableMyLocation();
+                    	try {
+                    		mc.animateTo(mMyLocationOverlay.getMyLocation());
+                    	}
+                    	catch (Exception e) {
+                    		Log.i("MicroLocations", "Unable to animate map", e);
+                    	}
+                    	mvMap.invalidate();
+                    } else {
+                    	mMyLocationOverlay.disableMyLocation();
+                        mc.animateTo(hmLocations.get(vt.getText()));
+                    }
+                    mvMap.invalidate();
+                }
+            });
+    }
+
+    protected GeoPoint setCurrentGeoPoint(){
+    	return mMyLocationOverlay.getMyLocation();
+    }
+    
+    /**
+     * @see com.google.android.maps.MapActivity#onPause()
+     */
+    @Override
+    public void onPause() {
+        super.onPause();
+        mMyLocationOverlay.disableMyLocation();
+    }
+
+    // stop tracing when application ends
+    @Override
+    public void onDestroy() {
+        super.onDestroy();
+    }
+
+    /**
+     * @see com.google.android.maps.MapActivity#onResume()
+     */
+    @Override
+    public void onResume() {
+        super.onResume();
+        mMyLocationOverlay.enableMyLocation();
+    }
+
+    /**
+     * Setup menus for this page
+     *
+     * @see android.app.Activity#onCreateOptionsMenu(android.view.Menu)
+     */
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        boolean supRetVal = super.onCreateOptionsMenu(menu);
+        menu.add(Menu.NONE, 0, Menu.NONE, getString(R.string.map_menu_zoom_in));
+        menu.add(Menu.NONE, 1, Menu.NONE, getString(R.string.map_menu_zoom_out));
+        menu.add(Menu.NONE, 2, Menu.NONE, getString(R.string.map_menu_set_satellite));
+        menu.add(Menu.NONE, 3, Menu.NONE, getString(R.string.map_menu_set_map));
+        menu.add(Menu.NONE, 4, Menu.NONE, getString(R.string.map_menu_set_traffic));
+        menu.add(Menu.NONE, 5, Menu.NONE, getString(R.string.map_menu_show_list));
+        return supRetVal;
+    }
+
+    /**
+     * @see android.app.Activity#onOptionsItemSelected(android.view.MenuItem)
+     */
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        switch (item.getItemId()) {
+            case 0:
+                // Zoom in
+                zoomIn();
+                return true;
+            case 1:
+                // Zoom out
+                zoomOut();
+                return true;
+            case 2:
+                // Toggle satellite views
+                mvMap.setSatellite(!mvMap.isSatellite());
+                return true;
+            case 3:
+                // Toggle street views
+                mvMap.setStreetView(!mvMap.isStreetView());
+                return true;
+            case 4:
+                // Toggle traffic views
+                mvMap.setTraffic(!mvMap.isTraffic());
+                return true;
+            case 5:
+                // Show the job list activity
+                startActivity(new Intent(PollMap.this, PollList.class));
+                return true;
+        }
+        return false;
+    }
+
+    /**
+     * @see android.app.Activity#onKeyDown(int, android.view.KeyEvent)
+     */
+    @Override
+    public boolean onKeyDown(int keyCode, KeyEvent event) {
+        switch (keyCode) {
+            case KeyEvent.KEYCODE_DPAD_UP: // zoom in
+                zoomIn();
+                return true;
+            case KeyEvent.KEYCODE_DPAD_DOWN: // zoom out
+                zoomOut();
+                return true;
+            case KeyEvent.KEYCODE_BACK: // go back (meaning exit the app)
+                finish();
+                return true;
+            default:
+                return false;
+        }
+    }
+
+    /**
+     * Required method to indicate whether we display routes
+     */
+    @Override
+    protected boolean isRouteDisplayed() { return false; }
+
+    /**
+     * Zoom in on the map
+     */
+    private void zoomIn() {
+        mvMap.getController().setZoom(mvMap.getZoomLevel() + 1);
+    }
+
+    /**
+     * Zoom out on the map, but not past level 10
+     */
+    private void zoomOut() {
+        int zoom = mvMap.getZoomLevel() - 1;
+        if (zoom < 5) { zoom = 5; }
+        mvMap.getController().setZoom(zoom);
+    }
+
+    /**
+     * @return the current location
+     */
+    private Location getCurrentLocation(LocationManager lm) {
+         Location l = lm.getLastKnownLocation("gps");
+        if (null != l) { return l; }
+
+        // getLastKnownLocation returns null if loc provider is not enabled
+        l = new Location("gps");
+        l.setLatitude(42.352299);
+        l.setLatitude(-71.063979);
+
+        return l;
+    }
+
+}

android/placeUvote/src/com/placeuvote/android/PollVote.java

+package com.placeuvote.android;
+
+import android.app.Activity;
+import android.app.AlertDialog;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.os.Bundle;
+import android.os.Handler;
+import android.os.Message;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.view.View;
+import android.widget.Button;
+import android.widget.ImageButton;
+import android.widget.TextView;
+import android.widget.CheckBox;
+
+import com.placeuvote.android.R;
+import com.placeuvote.android.PUVDatabase.PollsCursor;
+
+
+/**
+ * PollVote
+ */
+public class PollVote extends Activity {
+    private static Integer poll_id;
+    private static TextView txtKey;
+    private static CheckBox chkPrivate;
+    private static CheckBox chkAnonymous;
+    private static CheckBox chkOneChoice;
+    private static TextView numLocations;
+    private static TextView numDates;
+    private static TextView dateCreatedOn;
+    private static TextView txtCreatedBy;
+    private static TextView dateLastVote;
+    private static TextView numTotalVotes;
+    private static TextView txtUser;
+    private static TextView txtEmail;
+    private static TextView txtQuestion;
+    
+    PUVDatabase db;
+
+    private PollsCursor poll;
+    /**
+    final CheckBox chkPrivate = (CheckBox) findViewById(R.id.chkPrivate);
+    chkPrivate.setOnClickListener(new OnClickListener() {
+	    public void onClick(View v) {
+		// Perform action on clicks, depending on whether it's now checked
+		if (((CheckBox) v).isChecked()) {
+		    Toast.makeText(HelloFormStuff.this, "Selected", Toast.LENGTH_SHORT).show();
+		} else {
+		    Toast.makeText(HelloFormStuff.this, "Not selected", Toast.LENGTH_SHORT).show();
+		}
+	    }
+	});
+    */
+	public boolean IntToBool(int intValue)
+	{
+	    return (intValue != 0);
+	}
+    
+    /**
+     * Called when the activity is first created.
+     *
+     * @see android.app.Activity#onCreate(android.os.Bundle)
+     */
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+/** Edit res/layout/polldetail.xml to match these form elements
+ *  - txtEmail, txtUser, numLocations and numDates not displayed */
+        setContentView(R.layout.pollvote);
+        txtKey = (TextView) findViewById(R.id.txtKey);
+        chkPrivate = (CheckBox) findViewById(R.id.chkPrivate);
+        chkAnonymous = (CheckBox) findViewById(R.id.chkAnonymous);
+        chkOneChoice = (CheckBox) findViewById(R.id.chkOneChoice);
+        dateCreatedOn = (TextView) findViewById(R.id.dateCreatedOn);
+        txtCreatedBy = (TextView) findViewById(R.id.txtCreatedBy);
+        dateLastVote = (TextView) findViewById(R.id.dateLastVote);
+        numTotalVotes = (TextView) findViewById(R.id.numTotalVotes);
+        txtQuestion = (TextView) findViewById(R.id.txtQuestion);
+
+        // get the poll_id for this poll from the bundle passed by PollList
+        Bundle bIn = this.getIntent().getExtras();
+        poll_id = Integer.valueOf(bIn.getInt("_id"));
+
+        db = new PUVDatabase(this);
+        poll = db.getPollDetails(poll_id.longValue());
+
+		java.text.DateFormat dateFormat = android.text.format.DateFormat.getDateFormat(getApplicationContext());
+	        // fill in the form and display
+		txtKey.setText(poll.getColKey());
+		chkPrivate.setChecked(IntToBool(poll.getColPrivate()));
+		chkAnonymous.setChecked(IntToBool(poll.getColAnonymous()));
+		chkOneChoice.setChecked(IntToBool(poll.getColOneChoice()));
+		dateCreatedOn.setText("Created: " + dateFormat.format(poll.getColCreatedOn()));
+		txtCreatedBy.setText(poll.getColCreatedBy());
+		dateLastVote.setText("Last vote: " + dateFormat.format(poll.getColLastVote()));
+		numTotalVotes.setText(poll.getColTotalVotes());
+        txtUser.setText(poll.getColUser());
+        txtQuestion.setText(poll.getColQuestion());
+
+    }
+
+    /**
+     * Setup menus for this page.
+     *
+     * @see android.app.Activity#onCreateOptionsMenu(android.view.Menu)
+     */
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        boolean supRetVal = super.onCreateOptionsMenu(menu);
+        menu.add(0, 0, Menu.NONE, getString(R.string.detail_menu_back_to_list));
+        menu.add(0, 1, Menu.NONE, getString(R.string.detail_menu_poll_info));
+        menu.add(0, 2, Menu.NONE, getString(R.string.detail_menu_delete_location));
+        menu.add(0, 3, Menu.NONE, getString(R.string.detail_menu_edit_location));
+        return supRetVal;
+    }
+
+    /**
+     * @see android.app.Activity#onOptionsItemSelected(android.view.MenuItem)
+     */
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        switch (item.getItemId()) {
+            case 0:
+                // Go back to the list page
+                finish();
+                return true;
+            case 1:
+                // Go to the employer detail page
+                Intent iEmp = new Intent(PollVote.this, VoterDetail.class);
+                Bundle bEmp = new Bundle();
+                bEmp.putInt("_id", poll_id.intValue());
+                iEmp.putExtras(bEmp);
+
+                startActivity(iEmp);
+                return true;
+            case 2:
+            	// Delete this job
+                // Setup Delete Alert Dialog
+            	final int DELETE_JOB = 0;
+            	final int CANCEL_DELETE = 1;
+            	
+                Handler mHandler = new Handler() {    	
+                    public void handleMessage(Message msg) {
+                        switch (msg.what) {
+                            case DELETE_JOB:
+                            db.deleteLocation(poll_id);
+                            startActivity(new Intent(PollVote.this, PollList.class));
+                            break;
+                    
+                            case CANCEL_DELETE:
+                            // Do nothing
+                            break;
+                        }
+                    }
+                };
+                // "Answer" callback.
+                final Message acceptMsg = Message.obtain();
+                acceptMsg.setTarget(mHandler);
+                acceptMsg.what = DELETE_JOB;
+                    
+                // "Cancel" callback.
+                final Message rejectMsg = Message.obtain();
+                rejectMsg.setTarget(mHandler);
+                rejectMsg.what = CANCEL_DELETE;
+
+                new AlertDialog.Builder(this)
+                  .setMessage("Are you sure you want to delete this poll?")
+                  .setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
+                	  public void onClick(DialogInterface dialog, int value) {
+                		  rejectMsg.sendToTarget();
+                	  }})
+                  .setPositiveButton("Delete", new DialogInterface.OnClickListener() {
+                	  public void onClick(DialogInterface dialog, int value) {
+                    		  acceptMsg.sendToTarget();
+                	  }})
+                  .setOnCancelListener(new DialogInterface.OnCancelListener() {
+                        public void onCancel(DialogInterface dialog) {
+                          rejectMsg.sendToTarget();
+                      }})
+                      .show();    
+            	return true;
+            case 3:
+            	// Edit this job
+            	// Start the Edit Location Activity, passing this poll's id
+                Intent iEdit = new Intent(PollVote.this, EditPoll.class);
+                Bundle bEdit = new Bundle();
+                bEdit.putInt("_id", poll_id);
+                iEdit.putExtras(bEdit);
+                startActivity(iEdit);            	
+            	return true;
+            	
+            default:
+                return false;
+        }
+    }
+}

android/placeUvote/src/com/placeuvote/android/RSSReader.java

 import android.content.Intent;
 
 import com.placeuvote.android.R;
-import com.placeuvote.android.ShowDescription;
+import com.placeuvote.android.PollDetail;
 
 public class RSSReader extends Activity implements OnItemClickListener
 {
      {
     	 Log.i(tag,"item clicked! [" + feed.getItem(position).getTitle() + "]");
 
-    	 Intent itemintent = new Intent(this, ShowDescription.class);
+    	 Intent itemintent = new Intent(this, PollDetail.class);
          
     	 Bundle b = new Bundle();
     	 b.putString("title", feed.getItem(position).getTitle());

android/placeUvote/src/com/placeuvote/android/ShowDescription.java

-package com.placeuvote.android;
-
-import com.placeuvote.android.R;
-
-import android.app.Activity;
-import android.os.Bundle;
-import android.widget.Button;
-import android.widget.TextView;
-import android.content.Intent;
-import android.view.*;
-
-public class ShowDescription extends Activity 
-{
-    public void onCreate(Bundle icicle) 
-    {
-        super.onCreate(icicle);
-        setContentView(R.layout.showdescription);
-        
-        String theStory = null;
-        
-        
-        Intent startingIntent = getIntent();
-        
-        if (startingIntent != null)
-        {
-        	Bundle b = startingIntent.getBundleExtra("android.intent.extra.INTENT");
-        	if (b == null)
-        	{
-        		theStory = "bad bundle?";
-        	}
-        	else
-    		{
-        		theStory = b.getString("title") + "\n\n" + b.getString("pubdate") + "\n\n" + b.getString("description").replace('\n',' ') + "\n\nMore information:\n" + b.getString("link");
-    		}
-        }
-        else
-        {
-        	theStory = "Information Not Found.";
-        
-        }
-        
-        TextView db= (TextView) findViewById(R.id.storybox);
-        db.setText(theStory);
-        
-        Button backbutton = (Button) findViewById(R.id.back);
-        
-        backbutton.setOnClickListener(new Button.OnClickListener() 
-        {
-            public void onClick(View v) 
-            {
-            	finish();
-            }
-        });        
-    }
-}

android/placeUvote/src/com/placeuvote/android/VoterDetail.java

                 return true;
             case 1:
                 // Go to the voter detail page
-                Intent i = new Intent(VoterDetail.this, PollDetail.class);
+                Intent i = new Intent(VoterDetail.this, PollVote.class);
                 Bundle b = new Bundle();
                 b.putInt("_id", voter_id.intValue());
                 i.putExtras(b);

android/restart_adb.sh

-sudo /media/data/android-sdk-linux_86/tools/adb kill-server
-sudo /media/data/android-sdk-linux_86/tools/adb start-server
+sudo ~/packages/android-sdk-linux_86/platform-tools/adb kill-server
+sudo ~/packages/android-sdk-linux_86/platform-tools/adb start-server