@@ -191,7 +191,7 @@ private Fragment getHomeFragment() throws IOException {
191191 return HomeFragment .newInstance (ScienceLabCommon .scienceLab .isConnected (), ScienceLabCommon .scienceLab .isDeviceFound ());
192192 case 5 :
193193 return AboutUsFragment .newInstance ();
194- case 7 :
194+ case 8 :
195195 return FAQFragment .newInstance ();
196196 default :
197197 return InstrumentsFragment .newInstance ();
@@ -229,7 +229,7 @@ private void selectNavMenu() {
229229 case 5 :
230230 navigationView .getMenu ().getItem (navItemIndex ).setChecked (true );
231231 break ;
232- case 7 :
232+ case 8 :
233233 navigationView .getMenu ().getItem (navItemIndex ).setChecked (true );
234234 break ;
235235 default :
@@ -263,14 +263,14 @@ public boolean onNavigationItemSelected(@NonNull MenuItem item) {
263263 navItemIndex = 5 ;
264264 CURRENT_TAG = TAG_ABOUTUS ;
265265 break ;
266- case R .id .nav_rate :
266+ case R .id .nav_rate :
267267 customTabService .launchUrl ("https://play.google.com/store/apps/details?id=io.pslab" );
268268 if (drawer != null ) {
269269 drawer .closeDrawers ();
270270 }
271271 break ;
272272 case R .id .nav_help_feedback :
273- navItemIndex = 7 ;
273+ navItemIndex = 8 ;
274274 CURRENT_TAG = TAG_FAQ ;
275275 break ;
276276 case R .id .nav_buy_pslab :
@@ -360,7 +360,7 @@ public void onBackPressed() {
360360 return ;
361361 } else {
362362 CustomSnackBar .showSnackBar (findViewById (android .R .id .content ),
363- getString (R .string .Toast_double_tap ),null ,null , Snackbar .LENGTH_SHORT );
363+ getString (R .string .Toast_double_tap ), null , null , Snackbar .LENGTH_SHORT );
364364 }
365365 mBackPressed = System .currentTimeMillis ();
366366 }
@@ -378,7 +378,7 @@ public boolean onOptionsItemSelected(MenuItem item) {
378378 switch (item .getItemId ()) {
379379 case R .id .menu_pslab_connected :
380380 CustomSnackBar .showSnackBar (findViewById (android .R .id .content ),
381- getString (R .string .device_connected_successfully ),null ,null , Snackbar .LENGTH_SHORT );
381+ getString (R .string .device_connected_successfully ), null , null , Snackbar .LENGTH_SHORT );
382382 break ;
383383 case R .id .menu_pslab_disconnected :
384384 attemptToConnectPSLab ();
@@ -403,15 +403,15 @@ private void attemptToConnectPSLab() {
403403 if (communicationHandler .isConnected ()) {
404404 initialisationDialog .dismiss ();
405405 CustomSnackBar .showSnackBar (findViewById (android .R .id .content ),
406- getString (R .string .device_connected_successfully ),null ,null , Snackbar .LENGTH_SHORT );
406+ getString (R .string .device_connected_successfully ), null , null , Snackbar .LENGTH_SHORT );
407407 } else {
408408 communicationHandler = new CommunicationHandler (usbManager );
409409 if (communicationHandler .isDeviceFound ()) {
410410 attemptToGetUSBPermission ();
411411 } else {
412412 initialisationDialog .dismiss ();
413413 CustomSnackBar .showSnackBar (findViewById (android .R .id .content ),
414- getString (R .string .device_not_found ),null ,null , Snackbar .LENGTH_SHORT );
414+ getString (R .string .device_not_found ), null , null , Snackbar .LENGTH_SHORT );
415415 navItemIndex = 2 ;
416416 CURRENT_TAG = TAG_DEVICE ;
417417 loadHomeFragment ();
@@ -494,21 +494,21 @@ public void onReceive(Context context, Intent intent) {
494494 initialisationDialog .dismiss ();
495495 invalidateOptionsMenu ();
496496 CustomSnackBar .showSnackBar (findViewById (android .R .id .content ),
497- getString (R .string .device_connected_successfully ),null ,null , Snackbar .LENGTH_SHORT );
497+ getString (R .string .device_connected_successfully ), null , null , Snackbar .LENGTH_SHORT );
498498 if (navItemIndex == 0 ) {
499499 getSupportFragmentManager ().beginTransaction ().replace (R .id .frame , InstrumentsFragment .newInstance ()).commit ();
500500 } else if (navItemIndex == 1 ) {
501501 getSupportFragmentManager ().beginTransaction ().replace (R .id .frame , HomeFragment .newInstance (true , true )).commitAllowingStateLoss ();
502502 } else {
503503 CustomSnackBar .showSnackBar (findViewById (android .R .id .content ),
504- getString (R .string .device_connected_successfully ),null ,null , Snackbar .LENGTH_SHORT );
504+ getString (R .string .device_connected_successfully ), null , null , Snackbar .LENGTH_SHORT );
505505 }
506506 }
507507 } else {
508508 initialisationDialog .dismiss ();
509509 Log .d (TAG , "permission denied for device " + device );
510510 CustomSnackBar .showSnackBar (findViewById (android .R .id .content ),
511- getString (R .string .device_not_found ),null ,null , Snackbar .LENGTH_SHORT );
511+ getString (R .string .device_not_found ), null , null , Snackbar .LENGTH_SHORT );
512512 }
513513 }
514514 }
@@ -531,7 +531,7 @@ protected void onNewIntent(Intent intent) {
531531 getSupportFragmentManager ().beginTransaction ().replace (R .id .frame , HomeFragment .newInstance (true , true )).commitAllowingStateLoss ();
532532 }
533533 CustomSnackBar .showSnackBar (findViewById (android .R .id .content ),
534- getString (R .string .device_connected_successfully ),null ,null , Snackbar .LENGTH_SHORT );
534+ getString (R .string .device_connected_successfully ), null , null , Snackbar .LENGTH_SHORT );
535535 }
536536 }
537537 }
0 commit comments