smartmobilefactory / EpubReaderAndroid

MIT License
24 stars 7 forks source link

How to Update style.css dynamically #12

Closed udoy-touhid closed 6 years ago

udoy-touhid commented 6 years ago

I want to change the backgrounds and font color of the reader according to my need, please help me. I added a new style_night.css in asset, but not working. I tried something like this, but it didn't work. I am new to both data binding and rx java, maybe this is also slowing me down :(


binding.epubView.getSettings().setCustomChapterCss(
new String[]{file:///android_asset/epubreaderandroid/style_night.css}
);
timfreiheit commented 6 years ago

Hi, this is indeed a bug in the reader. The reader did not reload the page when the css or script settings changed. I fixed it in https://github.com/smartmobilefactory/EpubReaderAndroid/pull/13 but it may need some time to be approved due to christmas. I will release a version 0.2 if the fix is ready.

please try to avoid putting files into the epubreaderandroid folder. This should be considered private to the library. The pull request also adds an example how a night mode could be implemented.