I'm trying to create a night mode for my app which triggers on Button click which is a View from Android. on click I wanted the webview to change it's background color and the font color using a custom style via CSS but I don't have the idea on how to do it. I do know how to create a Javascript but I don't know on how I can implement it on my app since what I need is for the background to change without reloading the page. I tried to read some questions which has seems to be similar to my problem but none of it really sinks in to me and It's not that well detailed for me to understand.
Furthermore, my data is created on beforehand using
content.loadDataWithBaseURL(null, MY_HTML_CODE, "text/html", "utf-8", null);
so I can inject some script in case.
I'm not sure on how I can relate it on this answer from another question either which just confuses me even more.
Hope someone can help.