Anonymous avatar Anonymous committed cb4e6ea

tweaking SQL columns

Comments (0)

Files changed (11)

android/log_adb.sh

+sudo ~/packages/android-sdk-linux_86/platform-tools/adb logcat

android/placeUvote/AndroidManifest.xml

                 <category android:name="android.intent.category.LAUNCHER" />
             </intent-filter>
         </activity>
-        <activity android:name=".PollDetail" >
+        <activity android:name=".PollDetail" android:label="@string/poll_name">
         </activity>
-        <activity android:name=".PollMap" >
-        </activity>
-        <activity android:name=".PollList" android:label="@string/app_name">
+        <activity android:name=".PollMap" android:label="@string/poll_map">
+         </activity>
+        <activity android:name=".PollList" android:label="@string/list_name">
             <intent-filter>
                 <action android:name="android.intent.action.VIEW" />
                 <action android:name="android.intent.action.EDIT" />
Add a comment to this file

android/placeUvote/bin/classes.dex

Binary file modified.

Add a comment to this file

android/placeUvote/bin/placeUvote.apk

Binary file modified.

Add a comment to this file

android/placeUvote/bin/resources.ap_

Binary file modified.

android/placeUvote/res/layout/map.xml

 		android:id="@+id/mapmain"
     	android:layout_width="fill_parent" 
     	android:layout_height="fill_parent"
-    	android:clickable="true"
-    	android:apiKey="0Xbu8WOKfzLXZC6ZjXrsw-EkrllvHmmS_IpMYoQ"
+    	android:clickable="true"
+    	android:apiKey="0Xbu8WOKfzLW08B8vn5W83seDzWfQqGmd4hLopQ"
     />
 	<TextView  
 	    android:id="@+id/lblPUVPoll" 

android/placeUvote/res/layout/polldetail.xml

 android:id="@+id/btnBack"
 android:layout_width="wrap_content"
 android:layout_height="wrap_content"
+android:layout_marginLeft="10px"
+android:layout_marginRight="10px"
+android:textStyle="bold"
 android:text="Back"
 android:layout_alignParentBottom="true"
 android:layout_alignParentRight="true"
 android:layout_width="wrap_content"
 android:layout_height="wrap_content"
 android:text="Vote"
+android:layout_marginLeft="10px"
+android:layout_marginRight="10px"
+android:textStyle="bold"
 android:layout_alignParentBottom="true"
 android:layout_centerHorizontal="true"
 >
 android:id="@+id/btnMap"
 android:layout_width="wrap_content"
 android:layout_height="wrap_content"
+android:layout_marginLeft="10px"
+android:layout_marginRight="10px"
+android:textStyle="bold"
 android:text="Map"
 android:layout_alignParentBottom="true"
 android:layout_alignParentLeft="true"

android/placeUvote/res/values/strings.xml

 <?xml version="1.0" encoding="utf-8"?>
 <resources>
-    <string name="app_name">placeUvote</string>
+    <string name="app_name">placeUvote</string>
+    <string name="poll_map">Poll map</string>
     <string name="show_list">Show list of locations</string>
-    <string name="list_name">List of locations</string>
-    <string name="location_name">Location detail</string>
-    <string name="poll_name">Poll detail</string>
+    <string name="list_name">List of polls</string>
+    <string name="location_name">Location details</string>
+    <string name="poll_name">Poll details</string>
     <string name="add_location">Add location</string>
     <string name="edit_location">Edit location</string>
     <string name="map_menu_zoom_in">Zoom in</string> 
 DROP TABLE IF EXISTS employers;
 DROP TABLE IF EXISTS workers;
 DROP TABLE IF EXISTS status;
-create table poll(id INTEGER PRIMARY KEY AUTOINCREMENT, key TEXT, question TEXT, private INTEGER, anonymous INTEGER, onechoice INTEGER, locations INTEGER, dates INTEGER, created_on TEXT, created_by TEXT, l\
-ast_vote TEXT, total_votes INTEGER, user TEXT, email TEXT);
+create table poll(id INTEGER PRIMARY KEY AUTOINCREMENT, key TEXT, question TEXT, private INTEGER, anonymous INTEGER, onechoice INTEGER, locations INTEGER, dates INTEGER, createdon TEXT, createdby TEXT, last_vote TEXT, total_votes INTEGER, user TEXT, email TEXT);
 create table choice(_id INTEGER PRIMARY KEY AUTOINCREMENT, key TEXT, poll_id INTEGER, choice TEXT, loc_lat INTEGER, loc_long INTEGER, address TEXT, url TEXT, votes INTEGER);
 create table datechoice(_id INTEGER PRIMARY KEY AUTOINCREMENT, key TEXT, poll_id INTEGER, datetime TEXT, dateortime INTEGER, votes INTEGER);
-create table voter(_id INTEGER PRIMARY KEY AUTOINCREMENT, key TEXT, poll_id INTEGER, choice_id INTEGER, datechoice_id INTEGER, created_by TEXT, created_on TEXT);
-insert into poll(id, key, question, private, anonymous, onechoice, locations, dates, created_on, created_by, last_vote, total_votes, user, email) values (1, 'agpwbGFjZXV2b3RlcgoLEgRQb2xsGAEM', 'Lets go for a drink next month', 0, 1, 0, \
+create table voter(_id INTEGER PRIMARY KEY AUTOINCREMENT, key TEXT, poll_id INTEGER, choice_id INTEGER, datechoice_id INTEGER, createdby TEXT, createdon TEXT);
+insert into poll(id, key, question, private, anonymous, onechoice, locations, dates, createdon, createdby, last_vote, total_votes, user, email) values (1, 'agpwbGFjZXV2b3RlcgoLEgRQb2xsGAEM', 'Lets go for a drink next month', 0, 1, 0, \
 3, 2, '01-10-2010', 'Ed', '01-11-2010', 3, 'Ed', 'ed.crewe@bris.ac.uk');
 insert into choice(_id, key, poll_id, choice, loc_lat, loc_long, address, url, votes) values (1, 'agpwbGFjZXV2b3RlcgoLEgRQb2asdfsdfads', 1, 'Cat and Wheel', '53', '0.2', 'The Arches', 'http://catandwheel.com', 3);
 insert into choice(_id, key, poll_id, choice, loc_lat, loc_long, address, url, votes) values (2, 1, 'agpwbGFjZXV2b3aadgfadgfasdgf', 'Prince of Wales', '53', '0.25', '20 Gloucester Rd', 'http://pow.com', 2);
 insert into choice(_id, key, poll_id, choice, loc_lat, loc_long, address, url, votes) values (3, 1, 'agpwbGFjZXV2b3Rdgfadfg', 'Robin Hood', '53', '0.3', '50 Gloucester Rd', 'http://robinhood.com', 4);
 insert into datechoice(_id, key, poll_id, datetime, dateortime, votes) values (1, 'agpwbGFjZX345drfgd', 1, '21-12-2010', 0, 3);
 insert into datechoice(_id, key, poll_id, datetime, dateortime, votes) values (2, 'agpwbGFj345dfsdgf', 1, '18-12-2010', 0, 5);
-insert into voter(_id, key, poll_id, choice_id, datechoice_id, created_by, created_on) values (1, 'agpwbGFjZXV2bsgfdfgdgfGAEM', 1, 1, 0, 'Freddy', '21-10-2010');
-insert into voter(_id, key, poll_id, choice_id, datechoice_id, created_by, created_on) values (2, 'dfgdgfdfgEgRQb2xsGAEM', 1, 2, 0, 'Jim', '21-10-2010');
-insert into voter(_id, key, poll_id, choice_id, datechoice_id, created_by, created_on) values (3, 'sdgadfgadfgV2b3RlcgoLEgRQb2xsGAEM', 1, 0, 2, 'Freddy', '21-10-2010');
-insert into voter(_id, key, poll_id, choice_id, datechoice_id, created_by, created_on) values (4, 'wqeshjdgjhV2b3RlcgoLEgRQb2xsGAEM', 1, 0, 3, 'Jim', '21-10-2010');
+insert into voter(_id, key, poll_id, choice_id, datechoice_id, createdby, createdon) values (1, 'agpwbGFjZXV2bsgfdfgdgfGAEM', 1, 1, 0, 'Freddy', '21-10-2010');
+insert into voter(_id, key, poll_id, choice_id, datechoice_id, createdby, createdon) values (2, 'dfgdgfdfgEgRQb2xsGAEM', 1, 2, 0, 'Jim', '21-10-2010');
+insert into voter(_id, key, poll_id, choice_id, datechoice_id, createdby, createdon) values (3, 'sdgadfgadfgV2b3RlcgoLEgRQb2xsGAEM', 1, 0, 2, 'Freddy', '21-10-2010');
+insert into voter(_id, key, poll_id, choice_id, datechoice_id, createdby, createdon) values (4, 'wqeshjdgjhV2b3RlcgoLEgRQb2xsGAEM', 1, 0, 3, 'Jim', '21-10-2010');
 "</string>
     <string name="PUVDatabase_onUpgrade">"
 DROP TABLE IF EXISTS jobs

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

     	private static final String QUERY = 
     		"SELECT id, key, question, private, "+
     		"anonymous, onechoice, locations, dates, "+
-    		"created_on, created_by, last_vote, total_votes, user, email" +
-       		"FROM poll "+
-       		"ORDER BY ";  		
+    		"createdon, createdby, last_vote, total_votes, user, email " +
+       		"FROM poll where id = "; 
+       		//"ORDER BY ";  		
     		//where _id =";
     	/** Cursor constructor */
 		private PollsCursor(SQLiteDatabase db, SQLiteCursorDriver driver,

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

         db = new PUVDatabase(this);
 
         // Get current position
-        final Location myLocation
-            = getCurrentLocation((LocationManager) getSystemService(Context.LOCATION_SERVICE));
+        final Location myLocation = getCurrentLocation((LocationManager) getSystemService(Context.LOCATION_SERVICE));
 
         Spinner spnLocations = (Spinner) findViewById(R.id.spnLocations);
         mvMap = (MapView) findViewById(R.id.mapmain);

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

 
         // 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"));
+        //poll_id = Integer.valueOf(bIn.getInt("_id"));
+        poll_id = 1;
 
         db = new PUVDatabase(this);
         poll = db.getPollDetails(poll_id.longValue());
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.