Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5977893
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T21:26:10+00:00 2026-05-22T21:26:10+00:00

I have a change theme option in setting screen of my application and providing

  • 0

I have a change theme option in setting screen of my application and providing some custom themes to choose from .

first of all i believe you can’t set theme to entire app from your java code at once (please guide if there is any way to do so ) , thats why i am calling setTheme(my_theme) before super.onCreate() in every activity of app .
Now when user change activity, this will reflect only at the time of relaunching any activity (becouse setTheme() is in OnCreate() ).

So issue is how to let SetTheme() works in OnResume() or anywhere else in code , because i want to reflect these changes on previous screens in Activity Stack also .

note that setTheme() works before setContentVIew() only ……

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T21:26:10+00:00Added an answer on May 22, 2026 at 9:26 pm

    Yeah, as the docs say, you need to set the theme before any views are instantiated, so it looks like you will need to restart your entire activity.

    There’s probably a better way, but one way to ensure your activities completely restart in onResume():

    finish();
    startActivity(getIntent());
    

    This will recycle the existing intent. However, I would first look around to see if there is a simpler way to ensure activities restart- might be a simple manifest property. Let us know what you find.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to have an option from my Application to toggle the display
I have a wordpress blog www.freelancing4arab.com, I want to change the theme font, I
I have a file located at [application]/config/routing.yml, when I change something in there, the
I have some data in the html format. I am using Html.fromHtml(String) when setting
I have a theme in which there are numerous options, like:- Setting Theme Type
I have a list of mobile phone $numbers and i have to change them,
I'm a C# developer and I have to change my display resolution regularly. There
I have these codes for my two tabs. I would like to change the
I have links like these that I want to change: mypage.com?page=missions&id=5 mypage.com?page=hello I tried
Is there a way to have keyup , keypress , blur , and change

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.