I want to implement night mode for my application, but don't want to use any compat-libraries. I place resources in values-night folder and use next code:
UiModeManager systemService = (UiModeManager) this.getSystemService(UI_MODE_SERVICE);
systemService.setNightMode(UiModeManager.MODE_NIGHT_YES);
According to documentation it works on API >22 and it does. Is there a workaround to force using resources from -night folder on APIs 15-22?
It is supported by the AppCompat library. I have no idea why you don't want to use it. I am quoting from Chris Bane's Blog