Parcourir la source

-Add default check in when open home in toggle button

ilhamitubagoes il y a 4 ans
Parent
commit
546bedaeb0
1 fichiers modifiés avec 5 ajouts et 0 suppressions
  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 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 233
         binding.swStatusScan.setLabelOn(statusScanList.get(0).getName());
229 234
         binding.swStatusScan.setLabelOff(statusScanList.get(1).getName());
230 235