Good day!

How can I define a single design for the entire application? I mean for all layouts ов во всех View. Как такое можно сделать? Ведь в функциональном приложении может присутствовать несколько View и даже десятки Layout ов во всех View. Как такое можно сделать? Ведь в функциональном приложении может присутствовать несколько View и даже десятки Layout ов во всех View. Как такое можно сделать? Ведь в функциональном приложении может присутствовать несколько View и даже десятки Layout s ... do not do the same thing dozens of times!

Thank!

  • Redefine the render? But in general, you are neat with this - so briefly and go to the point that "not to write the letter a 'a' dozens of times in the code!" :-) - Chad
  • Well, just wondering, all of a sudden it is possible to realize this truth - some routine work will disappear. - AseN
  • label "dizign" delivered :)))) - thunder

1 answer 1

In order for the design of the application screens to look consistent, you need to describe the application theme in a separate resource (for example, in themes.xml), and the styles of basic elements and layouts in styles.xml. The theme is applied to the entire application in the manifest, layouts are already in the layout files. You will not need to describe the layout style each time, it will be enough to indicate

 style=" @style /MyLayoutStyle" 

It also greatly simplifies the writing of styles, the possibility of their inheritance, both from the system and from their own, described earlier

  • Thank. This is a good approach) - AseN