Browse Source

-Add default check in when open home in toggle button

ilhamitubagoes 4 years ago
parent
commit
546bedaeb0
1 changed files with 5 additions and 0 deletions
  1. 5 0
      app/src/main/java/com/fusi24/rfid/ui/home/HomeActivity.java

+ 5 - 0
app/src/main/java/com/fusi24/rfid/ui/home/HomeActivity.java

@@ -225,6 +225,11 @@ public class HomeActivity extends BaseActivity implements HomeView, StatusScanAd
225
             binding.rvStatusScan.setVisibility(View.VISIBLE);
225
             binding.rvStatusScan.setVisibility(View.VISIBLE);
226
         }
226
         }
227
 
227
 
228
+        // Inisiasi pertama saat muncul halaman default true
229
+        binding.swStatusScan.setOn(true);
230
+        idCheckType = statusScanList.get(0).getId(); // <-- Check In Code (649)
231
+        checkTypeName = statusScanList.get(0).getName(); // <-- Check In Name
232
+
228
         binding.swStatusScan.setLabelOn(statusScanList.get(0).getName());
233
         binding.swStatusScan.setLabelOn(statusScanList.get(0).getName());
229
         binding.swStatusScan.setLabelOff(statusScanList.get(1).getName());
234
         binding.swStatusScan.setLabelOff(statusScanList.get(1).getName());
230
 
235