AppCompat 23.2 Release: Day/Night Theme

Google’s AppCompat library has quickly become an important way for developers to integrate new platform features in their apps and having them degrade gracefully to older version. A lot of apps started to use it once Material Design was published. Although the material theme was not built-in to older versions, the AppCompat theme was able to replicate the look and feel for older devices. Plus, having an official library from Google means that developers can rely on it for backwards compatibility.

A new version was just released, version 23.2. The new features are highlighted in the video below, which has some of Google’s whimsy.

What’s New

Here are some of the key additions:

Vectors

Vectors are a great way for images to scale to any device without losing quality. There’s been a push to use vectors instead of rasterizied images in order to reduce the app’s size and improve scalability. Developers can now use the support-vector-drawable to use vectors in apps down to Gingerbread. It’s also easy to add vectors directly into an ImageView in your XML layout.

Day/Night Mode

Screenshot 2016-02-25 23.19.05
While many apps have been getting whiter and brighter, it can often be a jarring experience at night. There’s now a way for developers to set a day and a night theme for their app. By checking the user’s time and location, the ideal theme is chosen. This means developers have to maintain two sets of themes, but it should also make it better for users.

Android TV in general has a dark theme, so this may not impact too many TV developers. However, there a number of improvements to the Leanback library.

Leanback Improvements

image02
On a TV, using a phone settings menu wouldn’t make a lot of sense. It’d be stretched out and not take advantage of the screen. For TVs there is the GuidedStepFragment which lets users step through several menus to select an option. This is getting improved with the addition of a second column. Whereas currently the only visible options are in the single column menu, the update would let apps add options to the secondary menu while keeping the first menu visible.

tv_combined_image
There’s also a number of new ways to interact with these guided steps. Your guided steps can now make a description editable, include a dropdown menu, and a date selector. It’s all you need to build your own TV payment system.

Developers, update your dependencies

Developers can upgrade their gradle files to use version 23.2 and quickly make the necessary changes for high quality apps on every device.

Nick Felker

Nick Felker

Nick Felker is a student Electrical & Computer Engineering student at Rowan University (C/O 2017) and the student IEEE webmaster. When he's not studying, he is a software developer for the web and Android (Felker Tech). He has several open source projects on GitHub (http://github.com/fleker)Devices: Moto G-2013 Moto G-2015, Moto 360, Google ADT-1, Nexus 7-2013 (x2), Lenovo Laptop, Custom Desktop.Although he was an intern at Google, the content of this blog is entirely independent and his own thoughts.

More Posts - Website

Follow Me:
TwitterLinkedInGoogle PlusReddit