@@ -53,18 +53,11 @@ public class AccelerometerActivity extends AppCompatActivity {
53
53
54
54
public boolean recordData = false ;
55
55
public boolean locationPref ;
56
- private boolean checkGpsOnResume = false ;
57
- private boolean isRecordingStarted = false ;
58
- private boolean isDataRecorded = false ;
59
56
public GPSLogger gpsLogger ;
60
57
public CSVLogger accLogger ;
61
-
62
- private Menu menu ;
63
58
AccelerometerAdapter adapter ;
64
-
65
59
BottomSheetBehavior bottomSheetBehavior ;
66
60
GestureDetector gestureDetector ;
67
-
68
61
@ BindView (R .id .accel_toolbar )
69
62
Toolbar mToolbar ;
70
63
@ BindView (R .id .accel_coordinator_layout )
@@ -85,6 +78,10 @@ public class AccelerometerActivity extends AppCompatActivity {
85
78
ImageView bottomSheetSchematic ;
86
79
@ BindView (R .id .custom_dialog_desc )
87
80
TextView bottomSheetDesc ;
81
+ private boolean checkGpsOnResume = false ;
82
+ private boolean isRecordingStarted = false ;
83
+ private boolean isDataRecorded = false ;
84
+ private Menu menu ;
88
85
89
86
@ Override
90
87
protected void onCreate (Bundle savedInstanceState ) {
@@ -97,7 +94,7 @@ protected void onCreate(Bundle savedInstanceState) {
97
94
tvShadow .setOnClickListener (new View .OnClickListener () {
98
95
@ Override
99
96
public void onClick (View v ) {
100
- if (bottomSheetBehavior .getState ()== BottomSheetBehavior .STATE_EXPANDED )
97
+ if (bottomSheetBehavior .getState () == BottomSheetBehavior .STATE_EXPANDED )
101
98
bottomSheetBehavior .setState (BottomSheetBehavior .STATE_HIDDEN );
102
99
tvShadow .setVisibility (View .GONE );
103
100
}
@@ -131,7 +128,7 @@ public boolean onOptionsItemSelected(MenuItem item) {
131
128
return true ;
132
129
}
133
130
if (recordData ) {
134
- item .setIcon (R .drawable .record_icon );
131
+ item .setIcon (R .drawable .ic_record_white );
135
132
adapter .setRecordingStatus (false );
136
133
recordData = false ;
137
134
CustomSnackBar .showSnackBar (coordinatorLayout , getString (R .string .data_recording_paused ), null , null );
@@ -163,7 +160,7 @@ public boolean onOptionsItemSelected(MenuItem item) {
163
160
case R .id .record_csv_data :
164
161
if (isDataRecorded ) {
165
162
MenuItem item1 = menu .findItem (R .id .record_pause_data );
166
- item1 .setIcon (R .drawable .record_icon );
163
+ item1 .setIcon (R .drawable .ic_record_white );
167
164
168
165
// Export Data
169
166
ArrayList <Entry > dataX = adapter .getEntries (0 );
@@ -214,7 +211,7 @@ public void onClick(DialogInterface dialogInterface, int i) {
214
211
case R .id .delete_csv_data :
215
212
if (isDataRecorded ) {
216
213
MenuItem item1 = menu .findItem (R .id .record_pause_data );
217
- item1 .setIcon (R .drawable .record_icon );
214
+ item1 .setIcon (R .drawable .ic_record_white );
218
215
adapter .setRecordingStatus (false );
219
216
recordData = false ;
220
217
isRecordingStarted = false ;
@@ -247,7 +244,7 @@ public void onClick(DialogInterface dialogInterface, int i) {
247
244
@ Override
248
245
protected void onDestroy () {
249
246
super .onDestroy ();
250
- if (isRecordingStarted ) {
247
+ if (isRecordingStarted ) {
251
248
accLogger .deleteFile ();
252
249
isRecordingStarted = false ;
253
250
}
0 commit comments