23.08.2019»»пятница

Change Whatsapp Theme Android

    85 - Comments
Change Whatsapp Theme Android Average ratng: 3,2/5 2210 reviews

In particular cases I need to remove dialog theme from my activity but it doesn't seem to be working. Here's an example

First activity:

Second activity:

Manifest excerpt:

How To Change WhatsApp Theme On Android Oreo Without Root. The popularity of instant messaging apps is increasing by leaps and bounds, and WhatsApp seems to be one step ahead of all of them. WhatsApp is probably the first app most people install when they purchase a new smartphone. With billions of users and the number continuing to grow day by day.

When I run it's still dialog themed.

API10

Thanks.

Change Whatsapp Theme Android App

user1462299user1462299Change Whatsapp Theme Android
2,2833 gold badges17 silver badges29 bronze badges

3 Answers

Whatsapp Android Apk

As docs say you have to call setTheme before any view output. It seems that super.onCreate() takes part in view processing.

So, to switch between themes dynamically you simply need to call setTheme before super.onCreate like this:

Kapil Rajput
7,5783 gold badges36 silver badges50 bronze badges
user1462299user1462299
2,2833 gold badges17 silver badges29 bronze badges

user1462299's response works great, but if you include fragments, they will use the original activities theme. To apply the theme to all fragments as well you can override the getTheme() method of the Context instead:

You do not need to call setTheme() in the onCreate() Method anymore. You are overriding every request to get the current theme within this context this way.

Rany Albeg Wein
1,8952 gold badges6 silver badges23 bronze badges
Björn KechelBjörn Kechel
4,2741 gold badge38 silver badges43 bronze badges

I know that i am late but i would like to post a solution here:
Check the full source code here.
This is the code i used when changing theme using preferences..

Please note that you have to put the code before setcontentview..

HAPPY CODING!

dondondondondondon

Not the answer you're looking for? Browse other questions tagged android or ask your own question.