@@ -53,18 +53,11 @@ public class AccelerometerActivity extends AppCompatActivity {
5353
5454 public boolean recordData = false ;
5555 public boolean locationPref ;
56- private boolean checkGpsOnResume = false ;
57- private boolean isRecordingStarted = false ;
58- private boolean isDataRecorded = false ;
5956 public GPSLogger gpsLogger ;
6057 public CSVLogger accLogger ;
61-
62- private Menu menu ;
6358 AccelerometerAdapter adapter ;
64-
6559 BottomSheetBehavior bottomSheetBehavior ;
6660 GestureDetector gestureDetector ;
67-
6861 @ BindView (R .id .accel_toolbar )
6962 Toolbar mToolbar ;
7063 @ BindView (R .id .accel_coordinator_layout )
@@ -85,6 +78,10 @@ public class AccelerometerActivity extends AppCompatActivity {
8578 ImageView bottomSheetSchematic ;
8679 @ BindView (R .id .custom_dialog_desc )
8780 TextView bottomSheetDesc ;
81+ private boolean checkGpsOnResume = false ;
82+ private boolean isRecordingStarted = false ;
83+ private boolean isDataRecorded = false ;
84+ private Menu menu ;
8885
8986 @ Override
9087 protected void onCreate (Bundle savedInstanceState ) {
@@ -97,7 +94,7 @@ protected void onCreate(Bundle savedInstanceState) {
9794 tvShadow .setOnClickListener (new View .OnClickListener () {
9895 @ Override
9996 public void onClick (View v ) {
100- if (bottomSheetBehavior .getState ()== BottomSheetBehavior .STATE_EXPANDED )
97+ if (bottomSheetBehavior .getState () == BottomSheetBehavior .STATE_EXPANDED )
10198 bottomSheetBehavior .setState (BottomSheetBehavior .STATE_HIDDEN );
10299 tvShadow .setVisibility (View .GONE );
103100 }
@@ -131,7 +128,7 @@ public boolean onOptionsItemSelected(MenuItem item) {
131128 return true ;
132129 }
133130 if (recordData ) {
134- item .setIcon (R .drawable .record_icon );
131+ item .setIcon (R .drawable .ic_record_white );
135132 adapter .setRecordingStatus (false );
136133 recordData = false ;
137134 CustomSnackBar .showSnackBar (coordinatorLayout , getString (R .string .data_recording_paused ), null , null );
@@ -163,7 +160,7 @@ public boolean onOptionsItemSelected(MenuItem item) {
163160 case R .id .record_csv_data :
164161 if (isDataRecorded ) {
165162 MenuItem item1 = menu .findItem (R .id .record_pause_data );
166- item1 .setIcon (R .drawable .record_icon );
163+ item1 .setIcon (R .drawable .ic_record_white );
167164
168165 // Export Data
169166 ArrayList <Entry > dataX = adapter .getEntries (0 );
@@ -214,7 +211,7 @@ public void onClick(DialogInterface dialogInterface, int i) {
214211 case R .id .delete_csv_data :
215212 if (isDataRecorded ) {
216213 MenuItem item1 = menu .findItem (R .id .record_pause_data );
217- item1 .setIcon (R .drawable .record_icon );
214+ item1 .setIcon (R .drawable .ic_record_white );
218215 adapter .setRecordingStatus (false );
219216 recordData = false ;
220217 isRecordingStarted = false ;
@@ -247,7 +244,7 @@ public void onClick(DialogInterface dialogInterface, int i) {
247244 @ Override
248245 protected void onDestroy () {
249246 super .onDestroy ();
250- if (isRecordingStarted ) {
247+ if (isRecordingStarted ) {
251248 accLogger .deleteFile ();
252249 isRecordingStarted = false ;
253250 }
0 commit comments