1. The default is the black background,
2. Change the theme theme to Theme.AppCompat.Light, the list file subject is as follows:
<ApplicationAndroid:name= "Com.itheima.googleplay.global.GooglePlayApplication"Android:allowbackup= "true"Android:icon= "@drawable/ic_launcher"Android:label= "@string/app_name"Android:theme= "@style/theme.appcompat.light" > <ActivityAndroid:name= "Com.itheima.googleplay.ui.activity.MainActivity"Android:label= "@string/app_name" > <Intent-filter> <ActionAndroid:name= "Android.intent.action.MAIN" /> <categoryAndroid:name= "Android.intent.category.LAUNCHER" /> </Intent-filter> </Activity> <ActivityAndroid:name= "Com.itheima.googleplay.ui.activity.HomeDetailActivity" > </Activity> </Application>
You can also change the theme of an activity individually, the manifest file:
<ApplicationAndroid:name= "Com.itheima.googleplay.global.GooglePlayApplication"Android:allowbackup= "true"Android:icon= "@drawable/ic_launcher"Android:label= "@string/app_name" > <ActivityAndroid:name= "Com.itheima.googleplay.ui.activity.MainActivity"Android:label= "@string/app_name"Android:theme= "@style/theme.appcompat.light" > <Intent-filter> <ActionAndroid:name= "Android.intent.action.MAIN" /> <categoryAndroid:name= "Android.intent.category.LAUNCHER" /> </Intent-filter> </Activity> <ActivityAndroid:name= "Com.itheima.googleplay.ui.activity.HomeDetailActivity" > </Activity> </Application>
Effects such as:
Actionbar Changing the background color (theme)