|
|
@@ -40,6 +40,13 @@ public class MainActivity extends AppCompatActivity { |
|
|
|
videodetectionAndAccelerometerButton = (Button) findViewById(R.id.videodetectionAndAccelerometerButton); |
|
|
|
connectionButton = (Button) findViewById(R.id.connectionButton); |
|
|
|
|
|
|
|
RecyclerView recyclerView = findViewById(R.id.deviceListRecyclerView); |
|
|
|
recyclerView.setLayoutManager(new LinearLayoutManager(this)); |
|
|
|
recyclerView.setHasFixedSize(true); |
|
|
|
|
|
|
|
final DeviceListAdapter deviceListAdapter = new DeviceListAdapter(); |
|
|
|
recyclerView.setAdapter(deviceListAdapter); |
|
|
|
|
|
|
|
mMainActivityViewModel = new ViewModelProvider(this).get(MainActivityViewModel.class); |
|
|
|
mMainActivityViewModel.init(); |
|
|
|
mMainActivityViewModel.getConnectedDeviceList().observe(this, new Observer<List<Device>>() { |