diff --git a/Apps/Motion/AndroidManifest.xml b/Apps/Motion/AndroidManifest.xml
index 4180a54d..2220bc0b 100644
--- a/Apps/Motion/AndroidManifest.xml
+++ b/Apps/Motion/AndroidManifest.xml
@@ -79,8 +79,8 @@
+ android:windowSoftInputMode="adjustPan"
+ android:theme="@style/AppTheme"/>
@@ -74,7 +74,8 @@
+ android:windowSoftInputMode="adjustPan"
+ android:theme="@style/AppTheme"/>
diff --git a/Apps/Writer/src/edu/uml/cs/isense/writer/ManualEntry.java b/Apps/Writer/src/edu/uml/cs/isense/writer/ManualEntry.java
index 8731d69a..2f90535d 100644
--- a/Apps/Writer/src/edu/uml/cs/isense/writer/ManualEntry.java
+++ b/Apps/Writer/src/edu/uml/cs/isense/writer/ManualEntry.java
@@ -17,7 +17,6 @@
package edu.uml.cs.isense.writer;
-import android.annotation.SuppressLint;
import android.content.Context;
import android.content.Intent;
import android.location.Criteria;
@@ -94,7 +93,6 @@ public class ManualEntry extends ActionBarActivity implements LocationListener {
private int scrollY = 0;
- @SuppressLint("NewApi")
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
diff --git a/Google_Play_APK_Files/Motion/Motion-v1_2_0.apk b/Google_Play_APK_Files/Motion/Motion_v1_2_0_alpha1.apk
similarity index 100%
rename from Google_Play_APK_Files/Motion/Motion-v1_2_0.apk
rename to Google_Play_APK_Files/Motion/Motion_v1_2_0_alpha1.apk
diff --git a/Google_Play_APK_Files/Motion/Motion_v1_2_0_alpha2.apk b/Google_Play_APK_Files/Motion/Motion_v1_2_0_alpha2.apk
new file mode 100644
index 00000000..4882174f
Binary files /dev/null and b/Google_Play_APK_Files/Motion/Motion_v1_2_0_alpha2.apk differ
diff --git a/Google_Play_APK_Files/Writer/Writer_ v1_2_0_alpha3.apk b/Google_Play_APK_Files/Writer/Writer_ v1_2_0_alpha3.apk
new file mode 100644
index 00000000..34c3421d
Binary files /dev/null and b/Google_Play_APK_Files/Writer/Writer_ v1_2_0_alpha3.apk differ
diff --git a/Libs/iSENSE Imports/AndroidManifest.xml b/Libs/iSENSE Imports/AndroidManifest.xml
index e199d16d..bb96e724 100644
--- a/Libs/iSENSE Imports/AndroidManifest.xml
+++ b/Libs/iSENSE Imports/AndroidManifest.xml
@@ -14,11 +14,11 @@
+ android:theme="@style/AppTheme" />
+ android:theme="@style/AppThemeNoActionBar" />
-
diff --git a/Libs/iSENSE Imports/res/layout-v11/queueedit_data.xml b/Libs/iSENSE Imports/res/layout-v11/queueedit_data.xml
index 456b6d11..cbe341fe 100644
--- a/Libs/iSENSE Imports/res/layout-v11/queueedit_data.xml
+++ b/Libs/iSENSE Imports/res/layout-v11/queueedit_data.xml
@@ -11,7 +11,6 @@
android:layout_above="@+id/buttons"
android:layout_alignParentTop="true"
android:background="@android:color/transparent"
- android:padding="5dp"
android:scrollbars="vertical" >
+ android:text="@string/save" />
\ No newline at end of file
diff --git a/Libs/iSENSE Imports/res/layout/queueblock_alter.xml b/Libs/iSENSE Imports/res/layout/queueblock_alter.xml
index d9c405a0..5b8121bc 100644
--- a/Libs/iSENSE Imports/res/layout/queueblock_alter.xml
+++ b/Libs/iSENSE Imports/res/layout/queueblock_alter.xml
@@ -57,17 +57,6 @@
android:text="@string/select_proj"
android:textSize="16sp" />
-
-
+ android:text="@string/save" />
\ No newline at end of file
diff --git a/Libs/iSENSE Imports/res/values/strings.xml b/Libs/iSENSE Imports/res/values/strings.xml
index 7ce8929d..b7a8a137 100644
--- a/Libs/iSENSE Imports/res/values/strings.xml
+++ b/Libs/iSENSE Imports/res/values/strings.xml
@@ -30,7 +30,7 @@
Back
Select which data sets you would like to upload to iSENSE.
\n\t• Tap data sets to enable/disable them for upload.
- \n\t• Long press a data set to reconfigure it.
+ \n\t• Long press a data set to edit it.
Type: Data
Type: Picture
Select All
@@ -179,6 +179,7 @@
Altitude
Luminous Flux (Light)
Heading
+ Save
diff --git a/Libs/iSENSE Imports/src/edu/uml/cs/isense/queue/QDataSet.java b/Libs/iSENSE Imports/src/edu/uml/cs/isense/queue/QDataSet.java
index f92593fe..02baffaf 100644
--- a/Libs/iSENSE Imports/src/edu/uml/cs/isense/queue/QDataSet.java
+++ b/Libs/iSENSE Imports/src/edu/uml/cs/isense/queue/QDataSet.java
@@ -106,8 +106,6 @@ public enum Type {
* - If type is QDataSet.DATA, we look here.
* @param picture
* - If type is QDataSet.PIC, we look here.
- * @param requestDataLabelInOrder
- * - If data is already in the correct order and just needs to be given field IDs
*/
public QDataSet(String name, String desc, Type type, String data,
File picture, String projID, LinkedList fields, Boolean dataAlreadyInOrder) {
diff --git a/Libs/iSENSE Imports/src/edu/uml/cs/isense/queue/QueueAlter.java b/Libs/iSENSE Imports/src/edu/uml/cs/isense/queue/QueueAlter.java
index e5c88369..62c8c2ca 100644
--- a/Libs/iSENSE Imports/src/edu/uml/cs/isense/queue/QueueAlter.java
+++ b/Libs/iSENSE Imports/src/edu/uml/cs/isense/queue/QueueAlter.java
@@ -1,12 +1,12 @@
package edu.uml.cs.isense.queue;
-import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
+
import edu.uml.cs.isense.R;
/**
@@ -18,7 +18,7 @@
*/
public class QueueAlter extends ActionBarActivity {
- private Button rename, changeData, selectProj, delete, cancel;
+ private Button rename, changeData, selectProj, cancel;
protected final static String RETURN_CODE = "return_code";
protected final static String IS_ALTERABLE = "is_alterable";
@@ -37,13 +37,12 @@ public void onCreate(Bundle savedInstanceState) {
rename = (Button) findViewById(R.id.queuealter_rename );
changeData = (Button) findViewById(R.id.queuealter_change_data);
selectProj = (Button) findViewById(R.id.queuealter_choose_proj);
- delete = (Button) findViewById(R.id.queuealter_delete );
cancel = (Button) findViewById(R.id.queuealter_cancel );
Bundle extras = getIntent().getExtras();
if (extras != null) {
- boolean isAlterable = false; //extras.getBoolean(IS_ALTERABLE); TODO editing data is broken
+ boolean isAlterable = extras.getBoolean(IS_ALTERABLE);
if (!isAlterable) {
changeData.setVisibility(View.GONE);
}
@@ -84,16 +83,6 @@ public void onClick(View v) {
}
});
- delete.setOnClickListener(new OnClickListener() {
- @Override
- public void onClick(View v) {
- Intent iRet = new Intent(QueueAlter.this, QueueLayout.class);
- iRet.putExtra(RETURN_CODE, DELETE);
- setResult(RESULT_OK, iRet);
- finish();
- }
- });
-
cancel.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
diff --git a/Libs/iSENSE Imports/src/edu/uml/cs/isense/queue/QueueEditData.java b/Libs/iSENSE Imports/src/edu/uml/cs/isense/queue/QueueEditData.java
index cb78cdab..36417b2b 100644
--- a/Libs/iSENSE Imports/src/edu/uml/cs/isense/queue/QueueEditData.java
+++ b/Libs/iSENSE Imports/src/edu/uml/cs/isense/queue/QueueEditData.java
@@ -1,23 +1,26 @@
package edu.uml.cs.isense.queue;
-import java.util.ArrayList;
-
-import org.json.JSONArray;
-
-import android.app.Activity;
import android.app.ProgressDialog;
import android.content.Context;
import android.graphics.Color;
import android.os.AsyncTask;
import android.os.Bundle;
+import android.support.v7.app.ActionBar;
import android.support.v7.app.ActionBarActivity;
import android.text.InputType;
+import android.view.Gravity;
+import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.TextView;
+
+import org.json.JSONArray;
+
+import java.util.ArrayList;
+
import edu.uml.cs.isense.R;
import edu.uml.cs.isense.comm.API;
import edu.uml.cs.isense.objects.RProjectField;
@@ -34,7 +37,7 @@
*/
public class QueueEditData extends ActionBarActivity {
- private Button okay, cancel;
+ private Button save, cancel;
private LinearLayout editDataList;
public static QDataSet alter;
@@ -45,8 +48,8 @@ public class QueueEditData extends ActionBarActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
- setContentView(R.layout.queueedit_data);
- super.onCreate(savedInstanceState);
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.queueedit_data);
alter = QueueLayout.lastDataSetLongClicked;
@@ -56,10 +59,17 @@ public void onCreate(Bundle savedInstanceState) {
api = API.getInstance();
- okay = (Button) findViewById(R.id.queueedit_data_okay);
+ save = (Button) findViewById(R.id.queueedit_data_save);
cancel = (Button) findViewById(R.id.queueedit_data_cancel);
- okay.setOnClickListener(new OnClickListener() {
+ if (android.os.Build.VERSION.SDK_INT >= 11) {
+ ActionBar bar = getSupportActionBar();
+
+ // make the actionbar clickable
+ bar.setDisplayHomeAsUpEnabled(true);
+ }
+
+ save.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
getNewFields();
setResult(RESULT_OK);
@@ -80,62 +90,95 @@ public void onClick(View v) {
}
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+ switch (item.getItemId()) {
+ // Respond to the action bar's Up/Home button
+ case android.R.id.home:
+ setResult(RESULT_CANCELED);
+ finish();
+ return true;
+ }
+ return super.onOptionsItemSelected(item);
+ }
+
private void fillScrollView() {
-
+
int i = 0;
- String rawFieldData = alter.getData().replace("[", "").replace("]", "").replace("\"", "");
+ String rawFieldData = alter.getData().replace("[", "").replace("]", "").replace("\"", "").replace("\\", "");
String[] fieldData = rawFieldData.split(",");
-
+
+ int numPoints = fieldData.length / fieldOrder.size();
// if the data is a space, remove the spaces
for (int j = 0; j < fieldData.length; j++)
if (fieldData[j].equalsIgnoreCase(" ")) fieldData[j] = "";
- for (RProjectField rpf : fieldOrder) {
-
- final View dataRow = View.inflate(mContext, R.layout.edit_row, null);
-
- TextView label = (TextView) dataRow.findViewById(R.id.edit_row_label);
- label.setText(rpf.name);
- label.setBackgroundColor(Color.TRANSPARENT);
- label.setPadding(0, 10, 0, 0);
- LinearLayout.LayoutParams params = (LinearLayout.LayoutParams) label.getLayoutParams();
- params.setMargins(0, 0, 0, -10);
- label.setLayoutParams(params);
-
- EditText data = (EditText) dataRow.findViewById(R.id.edit_row_text);
- data.setText(fieldData[i]);
- // See if data is a number. If not, change input type to text
- try {
- Double.parseDouble(fieldData[i]);
- } catch (NumberFormatException nfe) {
- data.setInputType(InputType.TYPE_CLASS_TEXT);
- }
-
- editDataList.addView(dataRow);
-
- ++i;
- }
+ for(int point=0; point < numPoints; point++) {
+ TextView pointLabel = new TextView(this);
+ pointLabel.setText("Point " + (point+1));
+ pointLabel.setTextSize(16);
+ pointLabel.setPadding(10, 20, 10, 0);
+ pointLabel.setGravity(Gravity.CENTER);
+
+ editDataList.addView(pointLabel);
+
+ for (RProjectField rpf : fieldOrder) {
+ final View dataRow = View.inflate(mContext, R.layout.edit_row, null);
+
+ TextView label = (TextView) dataRow.findViewById(R.id.edit_row_label);
+ label.setText(rpf.name);
+ label.setBackgroundColor(Color.TRANSPARENT);
+ label.setPadding(10, 10, 10, 0);
+ LinearLayout.LayoutParams params = (LinearLayout.LayoutParams) label.getLayoutParams();
+ params.setMargins(10, 0, 10, -10);
+ label.setLayoutParams(params);
+
+ EditText data = (EditText) dataRow.findViewById(R.id.edit_row_text);
+ data.setLayoutParams(params);
+ data.setText(fieldData[i]);
+ // See if data is a number. If not, change input type to text
+ try {
+ Double.parseDouble(fieldData[i]);
+ } catch (NumberFormatException nfe) {
+ data.setInputType(InputType.TYPE_CLASS_TEXT);
+ }
+
+ editDataList.addView(dataRow);
+
+ ++i;
+ }
+ }
}
private void getNewFields() {
-
- int max = editDataList.getChildCount();
- JSONArray data = new JSONArray(),
- row = new JSONArray();
-
- for (int i = 0; i < max; i++) {
-
- View v = editDataList.getChildAt(i);
- EditText dataText = (EditText) v.findViewById(R.id.edit_row_text);
- if (dataText.getText().toString().length() != 0)
- row.put(dataText.getText().toString());
- else
- row.put(" ");
- }
-
- data.put(row);
-
+ JSONArray data = new JSONArray();
+ String rawFieldData = alter.getData();
+ String[] fieldData = rawFieldData.split(",");
+ int numPoints = fieldData.length / fieldOrder.size();
+
+ int i = 0;
+
+ for (int point = 0; point < numPoints; point++) {
+ JSONArray row = new JSONArray();
+ for (int j = 0; j < (fieldOrder.size()+1); j++) { //fields + 1 (datapoint number label)
+ View v = editDataList.getChildAt(i);
+ try {
+ EditText dataText = (EditText) v.findViewById(R.id.edit_row_text);
+ if (dataText.getText().toString().length() != 0)
+ row.put(dataText.getText().toString());
+ else
+ row.put(" ");
+ } catch (Exception e) { //datapoint label
+ ++i;
+ continue;
+ }
+ ++i;
+ }
+
+ data.put(row);
+ }
+
alter.setData(data.toString());
}
diff --git a/Libs/iSENSE Imports/src/edu/uml/cs/isense/queue/QueueLayout.java b/Libs/iSENSE Imports/src/edu/uml/cs/isense/queue/QueueLayout.java
index 6cdfb37e..0214c957 100644
--- a/Libs/iSENSE Imports/src/edu/uml/cs/isense/queue/QueueLayout.java
+++ b/Libs/iSENSE Imports/src/edu/uml/cs/isense/queue/QueueLayout.java
@@ -263,7 +263,6 @@ public void onClick(View v) {
int id = v.getId();
if (id == R.id.upload) {
if(runUploadSanityChecks()) {
- // TODO remove login task and replace with credential managers
if (api.getCurrentUser() == null) {
Intent askLogin = new Intent().setClass(mContext, LoginOrKeyDialog.class);
startActivityForResult(askLogin, ASK_KEY_OR_LOGIN);