2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-22 01:51:47 +00:00
kdeconnect-android/res/layout/mouse_receiver_cursor.xml
Sohny Bohny 28efb48257 Implement basic mouse receiver
## Summary

A basic mouse receiver implementation. You can now control your Android Device remotely which might be useful when it's connected to a bigger screen (via HDMI).

Unfortunately Android does not provide moving mouse by software (other than adb and without root). Therefore this implementation uses Android [AccessibilityService](https://developer.android.com/reference/android/accessibilityservice/AccessibilityService) to create an ImageView Overlay as mouse pointer and simulate touch gestures.
This is quite hacky but I think the best way to do so.

## Demo
Here is a small demo

![Screen_Capture_select-area_20200803155517](/uploads/635de03b6c7cc6765c4535cb8d80e77e/Screen_Capture_select-area_20200803155517.gif)
2021-04-04 06:34:52 +00:00

11 lines
437 B
XML

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/mouse_cursor"
android:src="@drawable/mouse_pointer" />
</RelativeLayout>