X

Day & Night Switching Added To Android Support Library

The collection of libraries that make up the Android Support Library are constantly updated to offer new features and compatibility for backward versions of APIs. The Support Library has now been updated to version 23.2 and among other features, it introduces a new mode to be used at night. This mode can make some elements a little more comfortable to read and in some cases, it might even reduce battery usage. Developers can use this theme so that their apps can switch between day mode and night mode automatically depending on which time of the day the apps are being used or the last known location of the users.

The new theme is added to AppCompat and it is called DayNight, it supports Light and Dark themes, whereas prior to API 14, only the Light theme was supported. Backwards compatibility is available for Android versions dating back to Ice Cream Sandwich, so the apps running on this or a more recent version of the Android operating system can benefit from this new feature. This feature can be seen in some navigation apps, which use certain colors in the daytime and other colors at night to improve the visibility of most of the elements on screen. Google advises that when using this feature, developers test their apps thoroughly, as some color schemes can affect the visibility of certain elements. An image is included showing how the Dark theme would look on the Bluetooth menu of Android, so it’s possible that this feature could be implemented across the whole operating system. After all, the Android M Preview included a Dark theme that looked very similar to what’s shown in the picture, but the feature was removed on the final build.

Android 6.1 could arrive soon and some of the improvements that are expected on this build include split-screen functionality on tablets as well as the usual performance enhancements, so perhaps this new functionality could be implemented as well. A night mode could even bring additional benefits to users as it is known that blue light emitted from any kind of screen could alter sleeping habits, although an app that filters this kind of light could be used to combat this.