diff --git a/res/layout/widget_remotecommandplugin_dialog.xml b/res/layout/widget_remote_command_plugin_dialog.xml similarity index 88% rename from res/layout/widget_remotecommandplugin_dialog.xml rename to res/layout/widget_remote_command_plugin_dialog.xml index 501ab2c1..aaf0cb36 100644 --- a/res/layout/widget_remotecommandplugin_dialog.xml +++ b/res/layout/widget_remote_command_plugin_dialog.xml @@ -6,7 +6,7 @@ android:padding="20dp"> runOnUiThread(() -> { - ListView view = findViewById(R.id.runcommandsdevicelist); - final List deviceItems = service.getDevices().values().stream() .filter(Device::isPaired).filter(Device::isReachable) .map(device -> new CommandEntry(device.getName(), null, device.getDeviceId())) @@ -37,8 +37,8 @@ public class RunCommandWidgetDeviceSelector extends AppCompatActivity { ListAdapter adapter = new ListAdapter(RunCommandWidgetDeviceSelector.this, deviceItems); - view.setAdapter(adapter); - view.setOnItemClickListener((adapterView, viewContent, i, l) -> { + binding.runCommandsDeviceList.setAdapter(adapter); + binding.runCommandsDeviceList.setOnItemClickListener((adapterView, viewContent, i, l) -> { CommandEntry entry = deviceItems.get(i); RunCommandWidget.setCurrentDevice(entry.getKey());