defining a background for this activity that can be easily changed for different themes). There may be cases where we want to define attributes not exposed in the original theme (i.e. If you run your application now, you should see the following output. Note that the spinner is bound to the string array and will display the theme names that we will be defining later on. Open res/layout/activity_theme.xml file and go to the xml tab. Next, let's create an activity layout where the themes will be selected and applied. Feel free to replace YOUR-CUSTOM-THEME-NAME with a theme name of your choice below. Let's also add to res/values/strings.xml the list of all the themes we will be allowed to choose from the spinner. Add the following to res/values/strings.xml: Theme Switcher Select Theme: Credentials username password Sync automatically Location On Off Clear Data Next, let's add the strings for our input views. Later on we'll be applying all our styles and themes to this layout file.
0 Comments
Leave a Reply. |