Change the background colour of your app
- Create a new project, selecting the full screen app option.
- Locate the <AppName>/app/src/main/res/layout/activity_fullscreen.xml file.
- Select the "Text" tab at the bottom of the file window (if not already selected)
- Inside FrameLayout change the background colour:
android:background="#FFF500B8"
Changing the theme colours of your app
- Change the status bar and slide over top menu bar colours using the Theme Editor (Tools > Android > Theme Editor).
- Either change the default theme colours or select a new theme
- Note that where a warning symbol appears this most likely means that there is a possible lack of contrast between elements and that you should revise your colour choices
- If you have selected (and/or amended) a new theme, return to the activity_fullscreen.xml file and select the theme from the top bar of the layout preview screen.
Notes
The theme for a project is defined in the <AppName>/app/src/main/AndroidManifest.xml file and this is linked to the <AppName>/app/src/main/res/values/styles.xml file. Ctrl click on the defined styles (in OS X) and select Go To > Declaration (or hold down cmd + B and click on the style name) to link through to the <AppName>/app/src/main/res/values/colors.xml file where the hex values are given.
Thanks!
ReplyDelete