mudkipme / MoeMemosAndroid

An app to help you capture thoughts and ideas
http://memos.moe
GNU General Public License v3.0
620 stars 67 forks source link

Feat: support drag and drop #166

Closed fightyz closed 7 months ago

fightyz commented 7 months ago

Some customized Android systems, such as Huawei's Harmony OS, provide a system-level pasteboard, which can cache content copied multiple times and save each copy in the form of blocks. Applications can capture the contents of the pasteboard by implementing Modifier.dragAndDropTarget.

In my implementation, different blocks in this system-wide pasteboard are separated by a blank line and pasted into MoeMemos.

Of course, this system-level pasteboard also supports images, which I will implement in subsequent PRs.

To support Modifier.dragAndDropTarget, I update compose and material 3 versions.

https://github.com/mudkipme/MoeMemosAndroid/assets/1697504/58c5bac3-0ac8-4f73-ab24-5f4653d8bddd

Ref:

mudkipme commented 7 months ago

This is awesome!