From 8f58d1b223bcf3ef4c3429c8d37737add9ed87d0 Mon Sep 17 00:00:00 2001 From: Bobby Date: Mon, 6 Apr 2015 14:14:13 -0400 Subject: [PATCH 1/9] material design for pictures app --- Apps/Pictures/res/menu/menu.xml | 25 ++++++++++--------- Apps/Pictures/res/values/strings.xml | 8 +++--- .../uml/cs/isense/riverwalk/Continuous.java | 3 ++- .../edu/uml/cs/isense/riverwalk/Pictures.java | 11 ++------ .../uml/cs/isense/riverwalk/SharePicture.java | 3 ++- .../cs/isense/riverwalk/dialogs/About.java | 3 ++- .../isense/riverwalk/dialogs/Description.java | 3 ++- .../uml/cs/isense/riverwalk/dialogs/Help.java | 3 ++- .../cs/isense/riverwalk/dialogs/NoGps.java | 3 ++- .../uml/cs/isense/riverwalk/dialogs/NoQR.java | 3 ++- .../isense/riverwalk/dialogs/ReadyUpload.java | 3 ++- 11 files changed, 35 insertions(+), 33 deletions(-) diff --git a/Apps/Pictures/res/menu/menu.xml b/Apps/Pictures/res/menu/menu.xml index a1a1481c..62ad0fd8 100644 --- a/Apps/Pictures/res/menu/menu.xml +++ b/Apps/Pictures/res/menu/menu.xml @@ -1,21 +1,22 @@ - + + app:showAsAction="ifRoom"/> + android:title="@string/project" + app:showAsAction="ifRoom"/> + android:title="@string/login" + app:showAsAction="ifRoom"/> + android:title="@string/continuous" + app:showAsAction="ifRoom"/> + android:title="@string/About_Title" + app:showAsAction="ifRoom"/> + android:title="@string/help" + app:showAsAction="ifRoom"/> diff --git a/Apps/Pictures/res/values/strings.xml b/Apps/Pictures/res/values/strings.xml index eba59b2c..27693f6e 100644 --- a/Apps/Pictures/res/values/strings.xml +++ b/Apps/Pictures/res/values/strings.xml @@ -57,7 +57,7 @@ Other Project - Credentials + Account Continuously Take Photos Time Interval (seconds): Press Here to Continuously Take Pictures @@ -85,9 +85,9 @@ To use the App via the Share Feature in Gallery: While viewing images in your ga \n\nThis app can record data regardless of Internet or Wi-Fi connection. After finished recording data, the points you recorded will remain saved. Later, if you have internet connection, you can click on upload (a menu option located at the top of the app). This will show you the session name and time that your data was recorded. Clicking on the upload button will publish that information to iSENSE.\n\n \nHow to Create a Project for this App:\n\n1. Go to isenseproject.org\n\n2. Login or Register for an Account.\n\n3. Click on Projects.\n\n4. Click on Create Project.\n\n5. Enter a name for your project, then click finish. \n\n6. Enter a Description.\n\n7. When formatting the project, the fields should be as follows:\n\n -Name:\t\t\t\t\t\t\t\tType:\n\n -Timestamp\t\t\t\t\tTimestamp\n -Latitude\t\t\t\t\t\t\tLatitude\n +Name:\t\t\t\t\t\t\t\t\t\tType:\n\n +Timestamp\t\t\t\tTimestamp\n +Latitude\t\t\t\t\t\t\t\t\tLatitude\n Longitude\t\t\t\t\t\tLongitude \n\n8. Your project\'s QR code is shown near the top left corner of the page and the project number will be listed two lines under the project\'s title.\n\n9. Remember to change the project number in the app to match your project number!\n\nYou may also use the Create a Project feature in this app by clicking on the data recorded in the upload menu then pressing “Select Project” and then selecting “Create New Project” from the new menu that pops up. This will allow you to create a new project with the proper fields set up for you. diff --git a/Apps/Pictures/src/edu/uml/cs/isense/riverwalk/Continuous.java b/Apps/Pictures/src/edu/uml/cs/isense/riverwalk/Continuous.java index 3d27650f..8e722214 100644 --- a/Apps/Pictures/src/edu/uml/cs/isense/riverwalk/Continuous.java +++ b/Apps/Pictures/src/edu/uml/cs/isense/riverwalk/Continuous.java @@ -6,13 +6,14 @@ import android.annotation.SuppressLint; import android.app.Activity; import android.os.Bundle; +import android.support.v7.app.ActionBarActivity; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.CheckBox; import android.widget.EditText; -public class Continuous extends Activity { +public class Continuous extends ActionBarActivity { public static int continuous_interval; diff --git a/Apps/Pictures/src/edu/uml/cs/isense/riverwalk/Pictures.java b/Apps/Pictures/src/edu/uml/cs/isense/riverwalk/Pictures.java index cbff9963..9bc0d6b9 100644 --- a/Apps/Pictures/src/edu/uml/cs/isense/riverwalk/Pictures.java +++ b/Apps/Pictures/src/edu/uml/cs/isense/riverwalk/Pictures.java @@ -35,6 +35,7 @@ import android.provider.MediaStore; import android.provider.Settings; import android.support.v4.content.CursorLoader; +import android.support.v7.app.ActionBarActivity; import android.util.Log; import android.view.Display; import android.view.Menu; @@ -64,7 +65,7 @@ //import android.app.ProgressDialog; -public class Pictures extends Activity implements LocationListener { +public class Pictures extends ActionBarActivity implements LocationListener { private static final int CAMERA_PIC_REQUESTED = 101; private static final int LOGIN_REQUESTED = 102; private static final int NO_GPS_REQUESTED = 103; @@ -135,14 +136,6 @@ public void onCreate(Bundle savedInstanceState) { mContext = this; - // Initialize action bar customization for API >= 11 - if (android.os.Build.VERSION.SDK_INT >= 11) { - ActionBar bar = getActionBar(); - - // make the actionbar clickable - bar.setDisplayHomeAsUpEnabled(true); - } - useMenu = true; mMediaPlayer = MediaPlayer.create(this, R.raw.beep); diff --git a/Apps/Pictures/src/edu/uml/cs/isense/riverwalk/SharePicture.java b/Apps/Pictures/src/edu/uml/cs/isense/riverwalk/SharePicture.java index 3d32dc7a..f9358dcb 100644 --- a/Apps/Pictures/src/edu/uml/cs/isense/riverwalk/SharePicture.java +++ b/Apps/Pictures/src/edu/uml/cs/isense/riverwalk/SharePicture.java @@ -11,6 +11,7 @@ import android.net.Uri; import android.os.AsyncTask; import android.os.Bundle; +import android.support.v7.app.ActionBarActivity; import android.util.Log; import android.view.View; import android.view.View.OnClickListener; @@ -24,7 +25,7 @@ import edu.uml.cs.isense.waffle.Waffle; -public class SharePicture extends Activity { +public class SharePicture extends ActionBarActivity { final int PROJECT_REQUESTED = 101; final int LOGIN_REQUESTED = 102; diff --git a/Apps/Pictures/src/edu/uml/cs/isense/riverwalk/dialogs/About.java b/Apps/Pictures/src/edu/uml/cs/isense/riverwalk/dialogs/About.java index a10d8ae8..4ffb07c2 100644 --- a/Apps/Pictures/src/edu/uml/cs/isense/riverwalk/dialogs/About.java +++ b/Apps/Pictures/src/edu/uml/cs/isense/riverwalk/dialogs/About.java @@ -2,11 +2,12 @@ import android.app.Activity; import android.os.Bundle; +import android.support.v7.app.ActionBarActivity; import android.view.View; import android.widget.Button; import edu.uml.cs.isense.riverwalk.R; -public class About extends Activity { +public class About extends ActionBarActivity { private Button okButton; @Override diff --git a/Apps/Pictures/src/edu/uml/cs/isense/riverwalk/dialogs/Description.java b/Apps/Pictures/src/edu/uml/cs/isense/riverwalk/dialogs/Description.java index 9d901ade..c004b884 100644 --- a/Apps/Pictures/src/edu/uml/cs/isense/riverwalk/dialogs/Description.java +++ b/Apps/Pictures/src/edu/uml/cs/isense/riverwalk/dialogs/Description.java @@ -3,13 +3,14 @@ import android.annotation.SuppressLint; import android.app.Activity; import android.os.Bundle; +import android.support.v7.app.ActionBarActivity; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.EditText; import edu.uml.cs.isense.riverwalk.R; -public class Description extends Activity { +public class Description extends ActionBarActivity { public static String photo_description; diff --git a/Apps/Pictures/src/edu/uml/cs/isense/riverwalk/dialogs/Help.java b/Apps/Pictures/src/edu/uml/cs/isense/riverwalk/dialogs/Help.java index 44e89259..b733651b 100644 --- a/Apps/Pictures/src/edu/uml/cs/isense/riverwalk/dialogs/Help.java +++ b/Apps/Pictures/src/edu/uml/cs/isense/riverwalk/dialogs/Help.java @@ -2,11 +2,12 @@ import android.app.Activity; import android.os.Bundle; +import android.support.v7.app.ActionBarActivity; import android.view.View; import android.widget.Button; import edu.uml.cs.isense.riverwalk.R; -public class Help extends Activity { +public class Help extends ActionBarActivity { private Button okButton; @Override diff --git a/Apps/Pictures/src/edu/uml/cs/isense/riverwalk/dialogs/NoGps.java b/Apps/Pictures/src/edu/uml/cs/isense/riverwalk/dialogs/NoGps.java index 2c2fb2b4..3c738d9b 100644 --- a/Apps/Pictures/src/edu/uml/cs/isense/riverwalk/dialogs/NoGps.java +++ b/Apps/Pictures/src/edu/uml/cs/isense/riverwalk/dialogs/NoGps.java @@ -2,13 +2,14 @@ import android.app.Activity; import android.os.Bundle; +import android.support.v7.app.ActionBarActivity; import android.view.View; import android.view.View.OnClickListener; import android.view.WindowManager.LayoutParams; import android.widget.Button; import edu.uml.cs.isense.riverwalk.R; -public class NoGps extends Activity { +public class NoGps extends ActionBarActivity { @Override protected void onCreate(Bundle savedInstanceState) { diff --git a/Apps/Pictures/src/edu/uml/cs/isense/riverwalk/dialogs/NoQR.java b/Apps/Pictures/src/edu/uml/cs/isense/riverwalk/dialogs/NoQR.java index 36adb717..e803a7ea 100644 --- a/Apps/Pictures/src/edu/uml/cs/isense/riverwalk/dialogs/NoQR.java +++ b/Apps/Pictures/src/edu/uml/cs/isense/riverwalk/dialogs/NoQR.java @@ -2,13 +2,14 @@ import android.app.Activity; import android.os.Bundle; +import android.support.v7.app.ActionBarActivity; import android.view.View; import android.view.View.OnClickListener; import android.view.WindowManager.LayoutParams; import android.widget.Button; import edu.uml.cs.isense.riverwalk.R; -public class NoQR extends Activity { +public class NoQR extends ActionBarActivity { @Override protected void onCreate(Bundle savedInstanceState) { diff --git a/Apps/Pictures/src/edu/uml/cs/isense/riverwalk/dialogs/ReadyUpload.java b/Apps/Pictures/src/edu/uml/cs/isense/riverwalk/dialogs/ReadyUpload.java index d3578108..d1ca2d47 100644 --- a/Apps/Pictures/src/edu/uml/cs/isense/riverwalk/dialogs/ReadyUpload.java +++ b/Apps/Pictures/src/edu/uml/cs/isense/riverwalk/dialogs/ReadyUpload.java @@ -2,13 +2,14 @@ import android.app.Activity; import android.os.Bundle; +import android.support.v7.app.ActionBarActivity; import android.view.View; import android.view.View.OnClickListener; import android.view.WindowManager.LayoutParams; import android.widget.Button; import edu.uml.cs.isense.riverwalk.R; -public class ReadyUpload extends Activity { +public class ReadyUpload extends ActionBarActivity { @Override protected void onCreate(Bundle savedInstanceState) { From bbbe892b188d3e6462fd5fb130d86408dc5cd6e3 Mon Sep 17 00:00:00 2001 From: Bobby Date: Mon, 6 Apr 2015 18:56:45 -0400 Subject: [PATCH 2/9] material design for pictures app --- Apps/Motion/AndroidManifest.xml | 2 +- Apps/Motion/build.gradle | 8 +- .../src/edu/uml/cs/isense/motion/Motion.java | 3 - .../uml/cs/isense/motion/dialogs/About.java | 6 +- Apps/Pictures/AndroidManifest.xml | 5 +- Apps/Pictures/build.gradle | 8 +- Apps/Pictures/res/layout-v11/about.xml | 52 +++++++++++++ .../res/layout-v11/continuous_shooting.xml | 74 ++++++++++++------- Apps/Pictures/res/layout-v11/help.xml | 53 +++++++++++++ .../res/layout/continuous_shooting.xml | 70 ++++++++++++------ Apps/Pictures/res/values/strings.xml | 1 + .../uml/cs/isense/riverwalk/Continuous.java | 13 +--- .../edu/uml/cs/isense/riverwalk/Pictures.java | 13 +--- .../uml/cs/isense/riverwalk/SharePicture.java | 3 - .../cs/isense/riverwalk/dialogs/About.java | 26 ++++++- .../uml/cs/isense/riverwalk/dialogs/Help.java | 29 +++++++- Apps/Writer/AndroidManifest.xml | 2 +- Apps/Writer/build.gradle | 10 +-- Libs/iSENSE Imports/build.gradle | 8 +- build.gradle | 2 +- 20 files changed, 282 insertions(+), 106 deletions(-) create mode 100644 Apps/Pictures/res/layout-v11/about.xml create mode 100644 Apps/Pictures/res/layout-v11/help.xml diff --git a/Apps/Motion/AndroidManifest.xml b/Apps/Motion/AndroidManifest.xml index eac999a4..8a93f455 100644 --- a/Apps/Motion/AndroidManifest.xml +++ b/Apps/Motion/AndroidManifest.xml @@ -7,7 +7,7 @@ + android:targetSdkVersion="22" /> diff --git a/Apps/Motion/build.gradle b/Apps/Motion/build.gradle index 824e6388..8523d48a 100644 --- a/Apps/Motion/build.gradle +++ b/Apps/Motion/build.gradle @@ -1,15 +1,15 @@ -apply plugin: 'android' +apply plugin: 'com.android.application' dependencies { compile fileTree(dir: 'libs', include: '*.jar') compile project(':Libs:iSENSE Imports') - compile "com.android.support:support-v4:21.0.2" - compile "com.android.support:appcompat-v7:21.0.2" + compile "com.android.support:support-v4:22.0.0" + compile "com.android.support:appcompat-v7:22.0.0" } android { compileSdkVersion 21 - buildToolsVersion "21.1.1" + buildToolsVersion "21.1.2" sourceSets { main { diff --git a/Apps/Motion/src/edu/uml/cs/isense/motion/Motion.java b/Apps/Motion/src/edu/uml/cs/isense/motion/Motion.java index eaed82d1..0b67f6a8 100644 --- a/Apps/Motion/src/edu/uml/cs/isense/motion/Motion.java +++ b/Apps/Motion/src/edu/uml/cs/isense/motion/Motion.java @@ -33,7 +33,6 @@ import android.support.v4.view.PagerAdapter; import android.support.v4.view.ViewPager; import android.support.v7.app.ActionBarActivity; -import android.util.Log; import android.view.Menu; import android.view.MenuItem; import android.view.View; @@ -460,7 +459,6 @@ public void onPageScrolled(int position, float positionOffset, int positionOffse @Override public void onPageSelected(int position) { - Log.e("here", "here " + position); if (position == 0) { leftChevronB.setTextColor(Color.GRAY); } else if (position == (fieldAdapter.getCount()-1)) { @@ -604,7 +602,6 @@ public void onActivityResult(int reqCode, int resultCode, Intent data) { } else if (reqCode == PRESETS_REQUESTED) { if (resultCode == RESULT_OK) { - //TODO presets set default field (loc for location) (accel sets field to accel) /*set project*/ String projectNumber = data.getExtras().getString(Presets.PROJECT); ProjectManager.setProject(mContext, projectNumber); diff --git a/Apps/Motion/src/edu/uml/cs/isense/motion/dialogs/About.java b/Apps/Motion/src/edu/uml/cs/isense/motion/dialogs/About.java index 7733177d..244306c8 100644 --- a/Apps/Motion/src/edu/uml/cs/isense/motion/dialogs/About.java +++ b/Apps/Motion/src/edu/uml/cs/isense/motion/dialogs/About.java @@ -1,6 +1,5 @@ package edu.uml.cs.isense.motion.dialogs; -import android.app.Activity; import android.os.Bundle; import android.support.v7.app.ActionBarActivity; import android.view.View; @@ -9,15 +8,12 @@ public class About extends ActionBarActivity { - private Button okButton; - @Override public void onCreate(Bundle savedInstanceBundle) { super.onCreate(savedInstanceBundle); setContentView(R.layout.about); - okButton = (Button) findViewById(R.id.okButton); - + Button okButton = (Button) findViewById(R.id.okButton); okButton.setOnClickListener(new View.OnClickListener() { @Override diff --git a/Apps/Pictures/AndroidManifest.xml b/Apps/Pictures/AndroidManifest.xml index afa0b424..5e11d84a 100644 --- a/Apps/Pictures/AndroidManifest.xml +++ b/Apps/Pictures/AndroidManifest.xml @@ -6,7 +6,7 @@ + android:targetSdkVersion="22" /> @@ -26,7 +26,6 @@ android:name="android.test.InstrumentationTestRunner" android:targetPackage="edu.uml.cs.isense.riverwalk" /> - diff --git a/Apps/Pictures/build.gradle b/Apps/Pictures/build.gradle index 24bc5eb1..f625b5bb 100644 --- a/Apps/Pictures/build.gradle +++ b/Apps/Pictures/build.gradle @@ -1,13 +1,15 @@ -apply plugin: 'android' +apply plugin: 'com.android.application' dependencies { - compile fileTree(include: '*.jar', dir: 'libs') + compile fileTree(dir: 'libs', include: '*.jar') compile project(':Libs:iSENSE Imports') + compile "com.android.support:support-v4:22.0.0" + compile "com.android.support:appcompat-v7:22.0.0" } android { compileSdkVersion 21 - buildToolsVersion '21.1.1' + buildToolsVersion '21.1.2' sourceSets { main { diff --git a/Apps/Pictures/res/layout-v11/about.xml b/Apps/Pictures/res/layout-v11/about.xml new file mode 100644 index 00000000..b2196163 --- /dev/null +++ b/Apps/Pictures/res/layout-v11/about.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + +