![]() ![]() Previously, you could use Word with a dark ribbon and toolbars, but your document color stayed bright white. I’m happy to announce that the Dark Mode feature in Word is more extensive. app/src/main/java/com/example/themetoggler/MainActivity.Hi, I’m Ali Forelli, a Program Manager on the Word team working on Accessibility features. The state of the Switch will be used to determine which theme is used: Add an OnCheckedChangeListener to the Switch in your Activity.Next, we’ll hook up our switch to toggle the application’s theme: Add a new Switch widget to the layout with the following attributes:.Delete the Hello World label from the default layout that was created.Once generated, we’ll add a switch widget for the user to toggle the app’s theme: We’ll use the Android Design Support library to support older devices running Android 4.Ĭhoose Blank Activity to create a basic Activity with a Floating Action button.Īccept the defaults for the remaining screens to create your new application. We’ll start by creating a new application:Ĭreate a new project called ThemeToggler targetting API Level 15 (Ice Cream Sandwich). Note: For this project, I’m using the latest Android Studio 2.0 beta release (preview2). $ git clone :cblunt/blog-android-theme-toggler.git The full source code for this tutorial is available at.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |