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 8748569
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:32:52+00:00 2026-06-13T12:32:52+00:00

At the moment I am building an app for a smartphone on Android which

  • 0

At the moment I am building an app for a smartphone on Android which will be used to control a telescope. One of the requirements is the ability to switch to “Night View” mode by pressing one button.

During “Night View” mode the application is dimly lid and ALL the UI elements are in one color (red).

During all lifecycle changes the color and illumination level should be the same. So no white flashes when changing to another part of the application, using a spinner, entering text with the build in keyboard or performing some other task.

Although I am new to Android programming, I am aware how to change a color of an UI element in a XML file or programmatically by pushing a button. I am unable to do this for all elements in the app and for the build in keyboard.

  • 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-06-13T12:32:52+00:00Added an answer on June 13, 2026 at 12:32 pm

    You will want to create two different themes for your app day/night with contains your styling information for button textColor, background color and all that shenanigans. Then in your xml you will want to reference styles rather than specific colors for color/text etc.

    On pressing the button switch the themes, which will have different (but similarly named) styles associated that you xml layouts will now reference.

    on pressing the button you will want to do something like this.

      setTheme(R.style.Theme_Day);
    

    For more look here.
    http://developer.android.com/guide/topics/ui/themes.html

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

Sidebar

Related Questions

I'm building an app which will aggregate events its users add to it. I'd
I'm building a simple web app at the moment that I'll one day open
I am building a web app which will use the DropBox API to save
I'm building a web app that's going to support multiple languages. For the moment,
I'm building an app in CodeIgniter. I have an invoice form which uses jQuery
I am in the process of building a Rails app that will hook into
I'm building and Android app that needs to go through steps like a wizard.
I've building a very basic iphone app where the user will be able to
I am building an app in Zend Framework at the moment and testing it
I'm building an OpenGL app with many small textures. I estimate that I will

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.