|
@@ -31,10 +31,10 @@ import android.view.MenuItem;
|
31
|
31
|
import android.widget.ArrayAdapter;
|
32
|
32
|
import android.widget.LinearLayout;
|
33
|
33
|
import android.widget.Spinner;
|
34
|
|
-import android.widget.TextView;
|
35
|
34
|
|
36
|
35
|
import com.flurry.android.FlurryAgent;
|
37
|
36
|
import com.twofortyfouram.SharedResources;
|
|
37
|
+
|
38
|
38
|
import java.util.Arrays;
|
39
|
39
|
import java.util.List;
|
40
|
40
|
|
|
@@ -48,6 +48,19 @@ public class EditActivity extends Activity {
|
48
|
48
|
private static final int MENU_SAVE = 1;
|
49
|
49
|
private static final int MENU_DONT_SAVE = 2;
|
50
|
50
|
|
|
51
|
+ final List<String> objects = Arrays.asList(new String[]{
|
|
52
|
+ "CLASSIFIED/IDLE/SITTING", "CLASSIFIED/IDLE/STANDING",
|
|
53
|
+ "CLASSIFIED/WALKING", "CLASSIFIED/WALKING/STAIRS/UP",
|
|
54
|
+ "CLASSIFIED/WALKING/STAIRS/DOWN", "CLASSIFIED/DANCING",
|
|
55
|
+ "CLASSIFIED/VEHICLE/CAR", "CLASSIFIED/VEHICLE/BUS",
|
|
56
|
+ });
|
|
57
|
+
|
|
58
|
+ final List<String> friendly = Arrays.asList(new String[]{
|
|
59
|
+ "Idle (sitting)", "Idle (standing)",
|
|
60
|
+ "Walking", "Walking (up stairs)", "Walking (down stairs)",
|
|
61
|
+ "Dancing", "Vehicle (car)", "Vehicle (bus)",
|
|
62
|
+ });
|
|
63
|
+
|
51
|
64
|
private boolean isCancelled;
|
52
|
65
|
|
53
|
66
|
@Override
|
|
@@ -68,17 +81,9 @@ public class EditActivity extends Activity {
|
68
|
81
|
.setBackgroundDrawable(SharedResources.getDrawableResource(getPackageManager(),
|
69
|
82
|
SharedResources.DRAWABLE_LOCALE_BORDER));
|
70
|
83
|
|
71
|
|
- final List<String> objects = Arrays.asList(new String[]{
|
72
|
|
- "CLASSIFIED/IDLE/SITTING", "CLASSIFIED/IDLE/STANDING",
|
73
|
|
- "CLASSIFIED/WALKING", "CLASSIFIED/WALKING/STAIRS",
|
74
|
|
- "CLASSIFIED/WALKING/STAIRS/UP", "CLASSIFIED/WALKING/STAIRS/DOWN",
|
75
|
|
- "CLASSIFIED/DANCING", "CLASSIFIED/VEHICLE",
|
76
|
|
- "CLASSIFIED/VEHICLE/CAR", "CLASSIFIED/VEHICLE/BUS",
|
77
|
|
- });
|
78
|
|
-
|
79
|
84
|
final Spinner spinner = (Spinner) findViewById(R.id.spinner);
|
80
|
85
|
spinner.setAdapter(new ArrayAdapter<String>(this,
|
81
|
|
- android.R.layout.simple_spinner_item, objects));
|
|
86
|
+ android.R.layout.simple_spinner_item, friendly));
|
82
|
87
|
|
83
|
88
|
if (savedInstanceState == null) {
|
84
|
89
|
final Bundle forwardedBundle = getIntent()
|
|
@@ -105,7 +110,7 @@ public class EditActivity extends Activity {
|
105
|
110
|
final Bundle storeAndForwardExtras = new Bundle();
|
106
|
111
|
|
107
|
112
|
storeAndForwardExtras.putString("activity",
|
108
|
|
- ((Spinner) findViewById(R.id.spinner)).getSelectedItem().toString());
|
|
113
|
+ objects.get(((Spinner) findViewById(R.id.spinner)).getSelectedItemPosition()));
|
109
|
114
|
returnIntent.putExtra(com.twofortyfouram.Intent.EXTRA_STRING_BLURB,
|
110
|
115
|
((Spinner) findViewById(R.id.spinner)).getSelectedItem().toString());
|
111
|
116
|
|