Open Cleover opened 9 months ago
All depends on what the upstream menu library allows
was asking this as well, did you find out how to implement this?
i would really like to switch menu components for android…
was asking this as well, did you find out how to implement this?
Somewhat, I just created some plugins to edit the style via the android xml files when the project is built.
The two plugins I use are here, there is one for editing the style.xml file to change the text Color and also to point to the background style overwrite. Then there is a plug-in to add a drawable xml with the popup menus overwrited style.
It's not super easy to understand, but generally if you copy the plugins you should only need to edit the drawable one and change the values as needed.
(You'll also need to add the plugins to your app.json to make them run when it's built)
was asking this as well, did you find out how to implement this?
Somewhat, I just created some plugins to edit the style via the android xml files when the project is built.
The two plugins I use are here, there is one for editing the style.xml file to change the text Color and also to point to the background style overwrite. Then there is a plug-in to add a drawable xml with the popup menus overwrited style.
It's not super easy to understand, but generally if you copy the plugins you should only need to edit the drawable one and change the values as needed.
(You'll also need to add the plugins to your app.json to make them run when it's built)
thanks for this, will try it out, does it work based on device theme?
thanks for this, will try it out, does it work based on device theme?
The plugins I made only edits the light mode script, however it's possible to have separate light/dark colors by using another xml file.
I'm not 100% sure of the best way to do it but I'd check out this docs page: https://docs.expo.dev/config-plugins/plugins-and-mods/#create-a-plugin
I know you can make a styles.xml file inside of a dark mode directory in a similar place to where the other files are, and that file can have its own style for when in dark mode. However there are also mods.android.colors and mods.android.colorsNight which makes me think you may be able to have the app pull the Colors from there instead without needing to have a separate overriding menu theme applied depending on the device theme, but I'm not sure on how they work enough to say for sure which way is best.
I'm working on implementing Zeego for the first time and this Android color mode issue is my main blocker. @Cleover it's been a few weeks, how is your plugin approach working? My app follows the user's system color scheme, so I need the Android menu to follow this behavior too. Not sure I want to go down the rabbit hole with multiple plugin customizations.
Unsure how extensive this is, but it would be nice to be able to change the background / text colour.
I’m unsure if this is considered native but is it possible to round the edges of android menus? https://stackoverflow.com/questions/53964594/how-do-i-make-the-rounded-corners-of-the-menu-in-the-toolbar
Is it possible to force a theme on iOS (for dark/light) rather than defaulting to the system?
Should dividers be visible on android? As far as I can tell they do exist on android but the DropdownMenu’s item groups don’t seem to have the separator.
'Cheers