Hello

It is required to register a separate style for the resolution of 600x1024 and Android 2.2 and higher (for the test I use the galaxy tab gt-p1010).

I wanted to do it by inserting the minimum width parameter for the folder (for example, to name the folder drawable-sw600dp ), but this method works only starting from Android 3.2.

I did everything under the article: Supporting Multiple Screens

What advise in this situation?

    1 answer 1

    And so let's start :)

    After much torment, I solved this problem, but first a small analysis and how everything was done.

    To begin with, it was necessary to determine the main dimensions of the screens (see the table at the end of the article mentioned above), which is approximately what happened:

    1. 240x320
    2. 320x480, 640x960
    3. 480x800, 480x854, 240x400, 240x432
    4. 1024x600 (here it is unfortunate :))
    5. 1280x800, 1280x720

    And so for the first group we use the small and notlong attributes (remember that notlong is when the ratio of the smaller side to the larger one lies in the range from 0.66 to 1, otherwise it is long). The second group is our standard normal, but I haven’t prescribed it anywhere, i.e. These are all styles, like pictures and layouts, which are taken from folders with no attributes. The third group uses the long tag. The fourth is large and sw600dp. Well, the fifth group is xlarge and sw720dp. Let's summarize a little:

    1. small-notlong (i.e. folders called darawable-small-notlong, layout-small-notlong, values-small-notlong);
    2. normal or folders without attributes;
    3. long;
    4. large and sw600dp;
    5. xlarge and sw720dp;

    I think the first 3 points are more or less clear (if not ask questions, I will definitely answer). More interesting 4 and 5 points. Before version 3.2, sw600dp and other attributes of the same kind were not there, it was only large and xlarge.

    It is also empirically proven that the mapping for example 600x1024 under sdk 7 and 13 (this is 3.2 :) can differ. I did this as follows, I created the folders with the attributes large and xlarge I needed, thereby setting the style for version 7 or 8 (i.e. android 2.1 and 2.2 and above) and additionally folders with attributes sw600dp and sw720dp that start working Since sdk 13 (android 3.2). Those. The large and xlarge attributes work in a similar way, like sw600dp and sw720dp, only for sdk 7-8 and higher. (well, so far no one has complained, everything seems to be working :)).

    The whole thing checked under several devices with different operating systems and permissions everything was displayed as intended. That's all, thank you for your attention. :)