|
|
|
|
|
|
|
|
videodetectionAndAccelerometerButton = (Button) findViewById(R.id.videodetectionAndAccelerometerButton); |
|
|
videodetectionAndAccelerometerButton = (Button) findViewById(R.id.videodetectionAndAccelerometerButton); |
|
|
connectionButton = (Button) findViewById(R.id.connectionButton); |
|
|
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 = new ViewModelProvider(this).get(MainActivityViewModel.class); |
|
|
mMainActivityViewModel.init(); |
|
|
mMainActivityViewModel.init(); |
|
|
mMainActivityViewModel.getConnectedDeviceList().observe(this, new Observer<List<Device>>() { |
|
|
mMainActivityViewModel.getConnectedDeviceList().observe(this, new Observer<List<Device>>() { |