react-native-context-menu-view
react-native-context-menu-view copied to clipboard
Android enhancements - Cascade
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?
I am definitely open to it, bonus points if it can be optional for people since it requires a third party lib.
@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
@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
@VladlenKaveev
That's awesome! Do you plan to contribute this to this repository?
@fobos531 Yeah, i do some tests and add submenus. And its be ready to PR)
@VladlenKaveev thanks you bro, did it work as expected? I waiting this page from it's created
@fukemy @fobos531 @mpiannucci I create Pull Request, but im not have time to add submenus support now. I add a little bit later! #61
@mpiannucci plz update this, we waiting it's too long times
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 i think you need update your kotlin version in build.gradle
thanks bro, i downgrade kotlin version to 1.3.50 and it's worked
@VladlenKaveev Are system icons already displayed under Android?
Android now supports icons and nested menus. Closing this.