cannot change the theme of the activity

+4 Ashok Raja · November 27, 2015
Hello there.. 
I'm just starting up with the android app development course.. 
And I'm facing a problem with one thing.. 
When ever i try to change the theme of my activity screen.. It doesn't display the contents what it supposed to do.. Rather it prints an error message stating - android..coordinatorLayout 
I don't know how to fix this error.. Can anyone help me out.. 
Thank you :-)

Post a Reply


Oldest  Newest  Rating
0 Joseph Douglass · December 7, 2015
Im here looking for answers as well, but had a theme problem too.  my solutions was to update a bunch of shit through the update manager.  give me a sec and ill look at what i did...

hit SDK manager and click everything.  I could be wrong but installing support for lower apis fixed it.
0 ruben forner · December 5, 2015
did you created the theme manually? if yes did you modified your manifest to load the new (custom ) theme you made?

you can use theme editor in( Tools/Android/Theme editor ) 

if you upload the theme and maybe manifest into pastbin or depends on you i will be able to help you out..since i faced that issue ( when i was starting learning android dev trough google developers)

n.b : as @Gary Whitney said :: what activity did you extended?  // try to extend your activity to >> AppCompatActivity
0 Gary Whitney · December 3, 2015
Maybe this will help.

This is what I believe is going on.

1. Each new version of Android provides a new API level and new features.
2. If you are following someones code and they are using something like extends ActionBarActivity or just extends Activity, that was fine for the SDK API the were using at the time they wrote it.
3. When you start a new blank activity (or in version24 an empty activity), AND the min API you want to support is less than the current API, Android will create the activity extending AppCompatActivity. Id does this so it can support older API levels.
4. The theme is tied to the Activity type the Activity extends.
5. Now here where things go wrong. If Android Studio extended one type and you change it to another type (say to match an example) that new type doesn't match the theme stored in the manifest.

My solution is to not change the Activity type and let the AppComptActivity library do it's job.

If anyone has a better explanation I would like to hear it.
0 Akshay Pimpalkar · December 3, 2015
i also have same problem :( Please someone help us... @bucky please look into this matter/images/forum/upload/2015-12-03/4b0e68c8a4a203185b1dbbb527953e79.png/images/forum/upload/2015-12-03/4e964053d9673737d5383945464e2a80.png/images/forum/upload/2015-12-03/aa7930013dbec6b34205367361342a6e.png
0 vamsi krishna · December 3, 2015
dude i have the same problem now....
  • 1

Java / Android Development


Very popular language used to create desktop applications, website applets, and Android apps.

Bucky Roberts Administrator