I need my app to support all the screes variants and looks equals on every of them. What is the most simple way to provide this? I prefer to avoid writing great amount of layouts and styles as here. Just single layout for each screen. Is it possible?
Share
While possible, this is usually not the right answer. What works well on a phone-sized screen may be ineffective on a tablet (wasting space). And what works well on a phone or a tablet typically will not work well on a TV.
Your objective should be to maximize usability on the different screen sizes. It is possible that maximizing usability will wind up “looks equals on every of them”, but that is not very likely.
That is impossible to answer in the abstract. That is akin to asking “what is the most simple way to paint”, when we do not know if you are trying to paint a fingernail, a portrait, a house, or an airliner.
I encourage you to read the documentation, then come back to StackOverflow with fresh, specific questions.
Just because there are lots of directories does not necessarily mean that there are lots of layouts. It could be that the majority of that app’s layouts only needed 1-2 variants, but there were a couple that needed more. That being said, most apps do not need nearly so many options.
For example, Google’s iosched app (Google I|O conference schedule, map, etc.) has five layout resource sets:
layout/layout-land/layout-large-land-v11/layout-large-v11/layout-v11/As usual, one of every layout is in the
layout/directory.layout-land/andlayout-large-land-v11/only have one layout file apiece.layout-large-v11/has many, presumably to take advantage of the native action bar (-v11) and larger screen space.