L
L
L_F_Kek2015-12-16 09:56:34
Android
L_F_Kek, 2015-12-16 09:56:34

Is it possible to install the AppTheme of an application without the XML code?

Hello! The problem is as follows:
json comes from the server with theme color settings for the application, different settings from different companies, the following 4 colors:
1) Primary color for filling the background
2) Primary color that highlights text on the background, application icons on the background, etc.
3) The color darker than the first one is used for selection
4) The color that is used to tint the borders of text and icons, if the 1st color is the same as the 2nd.
(An analogy with colors from iOS, because we write native applications and there is only one server)
And I don’t understand if it’s possible to manually set your theme for the entire application from these colors, or the settings must be stored in the form of an XML code, i.e. you need to write a parser that generates an xml string (generally highly undesirable =)). Well, extra. question - if I want to change the theme of the entire application, what is the best way to do it programmatically? One of the ways, as I understand it, is to inherit all your activities from your extended class from Activity, in which you can register a theme change. Maybe there are other ways? But the main question is about generating the style itself

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question