Explorar o código

-Add default check in when open home in toggle button

ilhamitubagoes %!s(int64=4) %!d(string=hai) anos
pai
achega
546bedaeb0

+ 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