react-native-context-menu-view icon indicating copy to clipboard operation
react-native-context-menu-view copied to clipboard

Android enhancements - Cascade

Open fobos531 opened this issue 3 years ago • 10 comments

Hey @mpiannucci

Would like to preface this with saying that this is an amazing library, works really neat for my use cases!

Since the iOS side basically hooks up into the iOS' native components, I find that the native components are developed really nicely, with e.g. submenus and stuff like that. However, since the Android implementation is using PopUpMenu, and PopUpMenu is pretty plain in comparison to iOS implementation, the Android side is pretty barebones and causes a feature disparity of sorts between platforms. Recently I found this native Android library which has great features and which are pretty similar to iOS implementation in that regard, e.g. with respect to nested menus. I think making use of that library is something this library could benefit from. What are your thoughts on this? Are you open to integrating something like this?

fobos531 avatar May 05 '22 18:05 fobos531

I am definitely open to it, bonus points if it can be optional for people since it requires a third party lib.

mpiannucci avatar May 05 '22 19:05 mpiannucci

@fobos531 Im add Cascade to this library and testing it now.

  • Add background color change
  • Add android system icons
  • Add text color change

I'm also going to add a submenu

https://gitlab.com/getgain-public/libs/react-native-context-menu

vladlenskiy avatar Jul 05 '22 07:07 vladlenskiy

@fobos531 Im add Cascade to this library and testing it now.

  • Add background color change
  • Add android system icons
  • Add text color change

I'm also going to add a submenu

gitlab.com/getgain-public/libs/react-native-context-menu

@VladlenKaveev

That's awesome! Do you plan to contribute this to this repository?

fobos531 avatar Jul 05 '22 09:07 fobos531

@fobos531 Yeah, i do some tests and add submenus. And its be ready to PR)

vladlenskiy avatar Jul 05 '22 09:07 vladlenskiy

@VladlenKaveev thanks you bro, did it work as expected? I waiting this page from it's created

fukemy avatar Jul 26 '22 08:07 fukemy

@fukemy @fobos531 @mpiannucci I create Pull Request, but im not have time to add submenus support now. I add a little bit later! #61

vladlenskiy avatar Jul 26 '22 13:07 vladlenskiy

@mpiannucci plz update this, we waiting it's too long times

fukemy avatar Aug 29 '22 09:08 fukemy

hi @VladlenKaveev , can u help my error when run debug android:


e: /Users/thehe/.gradle/caches/transforms-3/155d90119e1ea8ce9426eb8c5edb0bed/transformed/jetified-kotlin-stdlib-common-1.7.0.jar!/META-INF/kotlin-stdlib-common.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.7.1, expected version is 1.5.1.
e: /Users/thehe/.gradle/caches/transforms-3/1b41006eaf97cd4ef46181975839521c/transformed/jetified-kotlin-stdlib-1.7.0.jar!/META-INF/kotlin-stdlib.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.7.1, expected version is 1.5.1.
e: /Users/thehe/.gradle/caches/transforms-3/748dc90b8badbb0240fef9d70296b9b0/transformed/jetified-kotlin-stdlib-jdk7-1.7.0.jar!/META-INF/kotlin-stdlib-jdk7.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.7.1, expected version is 1.5.1.
e: /Users/thehe/Desktop/VedaxLink/node_modules/react-native-context-menu-view/android/src/main/java/com/mpiannucci/reactnativecontextmenu/ContextMenuView.kt: (52, 15): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.7.1, expected version is 1.5.1.
The class is loaded from /Users/thehe/.gradle/caches/transforms-3/1b41006eaf97cd4ef46181975839521c/transformed/jetified-kotlin-stdlib-1.7.0.jar!/kotlin/Unit.class
e: /Users/thehe/Desktop/VedaxLink/node_modules/react-native-context-menu-view/android/src/main/java/com/mpiannucci/reactnativecontextmenu/ContextMenuView.kt: (53, 15): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.7.1, expected version is 1.5.1.
The class is loaded from /Users/thehe/.gradle/caches/transforms-3/1b41006eaf97cd4ef46181975839521c/transformed/jetified-kotlin-stdlib-1.7.0.jar!/kotlin/Unit.class
e: /Users/thehe/Desktop/VedaxLink/node_modules/react-native-context-menu-view/android/src/main/java/com/mpiannucci/reactnativecontextmenu/ContextMenuView.kt: (57, 21): Unresolved reference: until
e: /Users/thehe/Desktop/VedaxLink/node_modules/react-native-context-menu-view/android/src/main/java/com/mpiannucci/reactnativecontextmenu/ContextMenuView.kt: (82, 9): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.7.1, expected version is 1.5.1.
The class is loaded from /Users/thehe/.gradle/caches/transforms-3/1b41006eaf97cd4ef46181975839521c/transformed/jetified-kotlin-stdlib-1.7.0.jar!/kotlin/Unit.class
e: /Users/thehe/Desktop/VedaxLink/node_modules/react-native-context-menu-view/android/src/main/java/com/mpiannucci/reactnativecontextmenu/ContextMenuView.kt: (86, 9): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.7.1, expected version is 1.5.1.
The class is loaded from /Users/thehe/.gradle/caches/transforms-3/1b41006eaf97cd4ef46181975839521c/transformed/jetified-kotlin-stdlib-1.7.0.jar!/kotlin/Unit.class
e: /Users/thehe/Desktop/VedaxLink/node_modules/react-native-context-menu-view/android/src/main/java/com/mpiannucci/reactnativecontextmenu/ContextMenuView.kt: (90, 9): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.7.1, expected version is 1.5.1.
The class is loaded from /Users/thehe/.gradle/caches/transforms-3/1b41006eaf97cd4ef46181975839521c/transformed/jetified-kotlin-stdlib-1.7.0.jar!/kotlin/Unit.class
e: /Users/thehe/Desktop/VedaxLink/node_modules/react-native-context-menu-view/android/src/main/java/com/mpiannucci/reactnativecontextmenu/ContextMenuView.kt: (99, 34): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.7.1, expected version is 1.5.1.
The class is loaded from /Users/thehe/.gradle/caches/transforms-3/1b41006eaf97cd4ef46181975839521c/transformed/jetified-kotlin-stdlib-1.7.0.jar!/kotlin/Unit.class
e: /Users/thehe/Desktop/VedaxLink/node_modules/react-native-context-menu-view/android/src/main/java/com/mpiannucci/reactnativecontextmenu/ContextMenuView.kt: (107, 15): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.7.1, expected version is 1.5.1.
The class is loaded from /Users/thehe/.gradle/caches/transforms-3/1b41006eaf97cd4ef46181975839521c/transformed/jetified-kotlin-stdlib-1.7.0.jar!/kotlin/Unit.class
e: /Users/thehe/Desktop/VedaxLink/node_modules/react-native-context-menu-view/android/src/main/java/com/mpiannucci/reactnativecontextmenu/ContextMenuView.kt: (108, 15): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.7.1, expected version is 1.5.1.
The class is loaded from /Users/thehe/.gradle/caches/transforms-3/1b41006eaf97cd4ef46181975839521c/transformed/jetified-kotlin-stdlib-1.7.0.jar!/kotlin/Unit.class
e: /Users/thehe/Desktop/VedaxLink/node_modules/react-native-context-menu-view/android/src/main/java/com/mpiannucci/reactnativecontextmenu/ContextMenuView.kt: (109, 22): Not enough information to infer type variable T
e: /Users/thehe/Desktop/VedaxLink/node_modules/react-native-context-menu-view/android/src/main/java/com/mpiannucci/reactnativecontextmenu/ContextMenuView.kt: (109, 57): Unresolved reference: java
e: /Users/thehe/Desktop/VedaxLink/node_modules/react-native-context-menu-view/android/src/main/java/com/mpiannucci/reactnativecontextmenu/ContextMenuView.kt: (114, 9): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.7.1, expected version is 1.5.1.
The class is loaded from /Users/thehe/.gradle/caches/transforms-3/1b41006eaf97cd4ef46181975839521c/transformed/jetified-kotlin-stdlib-1.7.0.jar!/kotlin/Unit.class
e: /Users/thehe/Desktop/VedaxLink/node_modules/react-native-context-menu-view/android/src/main/java/com/mpiannucci/reactnativecontextmenu/ContextMenuView.kt: (115, 26): Unresolved reference: apply
e: /Users/thehe/Desktop/VedaxLink/node_modules/react-native-context-menu-view/android/src/main/java/com/mpiannucci/reactnativecontextmenu/ContextMenuView.kt: (116, 24): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.7.1, expected version is 1.5.1.
The class is loaded from /Users/thehe/.gradle/caches/transforms-3/1b41006eaf97cd4ef46181975839521c/transformed/jetified-kotlin-stdlib-1.7.0.jar!/kotlin/Unit.class
e: /Users/thehe/Desktop/VedaxLink/node_modules/react-native-context-menu-view/android/src/main/java/com/mpiannucci/reactnativecontextmenu/ContextMenuView.kt: (116, 47): Type mismatch: inferred type is ContextMenuView but Menu! was expected
e: /Users/thehe/Desktop/VedaxLink/node_modules/react-native-context-menu-view/android/src/main/java/com/mpiannucci/reactnativecontextmenu/ContextMenuView.kt: (118, 21): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.7.1, expected version is 1.5.1.
The class is loaded from /Users/thehe/.gradle/caches/transforms-3/1b41006eaf97cd4ef46181975839521c/transformed/jetified-kotlin-stdlib-1.7.0.jar!/kotlin/Unit.class
e: /Users/thehe/Desktop/VedaxLink/node_modules/react-native-context-menu-view/android/src/main/java/com/mpiannucci/reactnativecontextmenu/ContextMenuView.kt: (119, 9): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.7.1, expected version is 1.5.1.
The class is loaded from /Users/thehe/.gradle/caches/transforms-3/1b41006eaf97cd4ef46181975839521c/transformed/jetified-kotlin-stdlib-1.7.0.jar!/kotlin/Unit.class
e: /Users/thehe/Desktop/VedaxLink/node_modules/react-native-context-menu-view/android/src/main/java/com/mpiannucci/reactnativecontextmenu/ContextMenuView.kt: (123, 33): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.7.1, expected version is 1.5.1.
The class is loaded from /Users/thehe/.gradle/caches/transforms-3/1b41006eaf97cd4ef46181975839521c/transformed/jetified-kotlin-stdlib-1.7.0.jar!/kotlin/Unit.class
e: /Users/thehe/Desktop/VedaxLink/node_modules/react-native-context-menu-view/android/src/main/java/com/mpiannucci/reactnativecontextmenu/ContextMenuView.kt: (130, 33): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.7.1, expected version is 1.5.1.
The class is loaded from /Users/thehe/.gradle/caches/transforms-3/1b41006eaf97cd4ef46181975839521c/transformed/jetified-kotlin-stdlib-1.7.0.jar!/kotlin/Unit.class
e: /Users/thehe/Desktop/VedaxLink/node_modules/react-native-context-menu-view/android/src/main/java/com/mpiannucci/reactnativecontextmenu/RoundedRectDrawable.kt: (7, 5): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.7.1, expected version is 1.5.1.
The class is loaded from /Users/thehe/.gradle/caches/transforms-3/1b41006eaf97cd4ef46181975839521c/transformed/jetified-kotlin-stdlib-1.7.0.jar!/kotlin/Unit.class

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-context-menu-view:compileDebugKotlin'.
> Compilation error. See log for more details

fukemy avatar Aug 30 '22 05:08 fukemy

@fukemy i think you need update your kotlin version in build.gradle

vladlenskiy avatar Aug 30 '22 17:08 vladlenskiy

thanks bro, i downgrade kotlin version to 1.3.50 and it's worked

fukemy avatar Aug 30 '22 22:08 fukemy

@VladlenKaveev Are system icons already displayed under Android?

matjua17 avatar Mar 03 '23 09:03 matjua17

Android now supports icons and nested menus. Closing this.

mpiannucci avatar Dec 07 '23 16:12 mpiannucci