Android Question Drawing Based On Current Theme

Discussion in 'Android Questions' started by Foz, Jun 2, 2015.

  1. Foz

    Foz Member Licensed User

    I have two devices, one phone which uses a default of a dark/black background as the default back colour and another e-ink tablet which uses white as the default background.

    When I come to doing custom drawing, I need to use the inverted colour, which won't be a problem if this question can be answered:

    How can I determine the colour of the device theme? It seems that all the .Color properties are now write-only...
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    It is not simple to find the device theme colors. Usually the simplest solution is to use the default colors.

    However for custom drawings it might be simpler to explicitly set the colors (you can even use a custom theme) of all or most views.
     
  3. Foz

    Foz Member Licensed User

    Thanks for your response - I'll just create a day and night theme which the user can choose instead.
     
    Erel likes this.
Loading...