A simple widget to execute commands from android desktop
Add the widget and execute commands from it.
By default, the selected device is the first device in the device list.
The selected device can be changed via the widget title.
If there is no commands, the widget show an empty list
If there is no connected device, show the message located in @string/unreachable_description
Working pretty good so far.
The command list does not seem to get updated when switching the selected device.
Some design nitpicks as inline comments.
Please respect the coding style of the rest of the project, i.e. no spaces inside braces. We are using the standard settings of Android Studio, so you can use the builtin formatter.
The transparent background is weird IMHO, it makes the command text hardly readable
I would like a little bit of padding below and above
Some padding to the left to make it symmetrical
Coding style, no spaces inside <>.
I don't think it's necessary to include the phones name here. In my case it results in "OnePlus@nico@neon", two time @ is too much
You can use lambda here
Another minor issue I found: When the device turns unreachable the command list is still shown instead of the unreachable message. You might be able to use DeviceListChangedCallback from Backgroundservice to work on this
Looks cool, thanks!
I just have a small improvement suggestion: the device selected by default is the first in the list, even if it's not paired. If there are paired devices, you could select by default the first *paired* device. You can't select a device that is not paired after clicking the device name anyway, so it should not be selected by default.
Another nitpicky thing: maybe the title bar could be smaller? It takes up some real state that could be used for the actual command list.
Apart from these, it looks very good. Let me know if/when you make this changes and want to get this merged, since I see you don't have commit rights.
I'm having trouble applying your patch. Can you please upload it again using arc? It makes our and your life easier. See https://community.kde.org/Infrastructure/Phabricator#Using_Arcanist_to_post_patches for instructions