Foxit PDF SDK for Android

How can I set the night mode color?

From version 5.1, Foxit PDF SDK for Android supports setting the night mode color as desired. To set the night mode color, you should call the PDFViewCtrl.setMappingModeBackgroundColor(int) and PDFViewCtrl.setMappingModeForegroundColor(int) APIs to set the color as you wish, then set the color mode by using PDFViewCtrl.setColorMode(int).

Note: If the color mode is already set to Renderer.e_ColorModeMapping, you still need to set it again after calling PDFViewCtrl.setMappingModeBackgroundColor(int) and PDFViewCtrl.setMappingModeForegroundColor(int). Otherwise, the settings may not work.

Following is a sample to set the night mode color:

private UIExtensionsManager uiExtensionsManager = null;
PDFViewCtrl pdfViewCtrl = uiExtensionsManager.getPDFViewCtrl();

Updated on August 29, 2018

Was this article helpful?
Thanks for your feedback. If you have a comment on how to improve the article, you can write it here: