Android Question Images in multiple devices

Discussion in 'Android Questions' started by Luiz Fernando Orlandini, Feb 3, 2015.

  1. Luiz Fernando Orlandini

    Luiz Fernando Orlandini Active Member Licensed User

    Hi All.

    In the last days I start to create the layout variants to my APP.

    - 370x470, scale 1
    - 480x800, scale 1.5
    - 720x960, scale 2
    - 1080x1920, scale 3

    My APPs has a lot of different images in the layout. So when I tested the last variant, some images looks distorted.

    How can I deal with that? May I have to create a new image with a higher resolution and substitute image that not looks good?

    Or...

    I have to put all imagens in folder: res/drawable-hdpi, res/drawable-mdpi, res/drawable-xdpi, res/drawable?

    Thanks for any help.
     
  2. KMatle

    KMatle Expert Licensed User

    Could be a memory problem. If the view (f.e. panel or imageview) is 1920x1080 then it uses a lot of memory. Several images with thtat size lead to an automatic downsample and the images look distorted. Check the logs.

    If the original imagesize is f.e. 640x480 and you stretch it to 1920x1080 it may be look distorted, too-

    How manay images do you load of what size (pixels) and how?
     
  3. Luiz Fernando Orlandini

    Luiz Fernando Orlandini Active Member Licensed User

    I understand these behaviour, but I think is not the case.

    This happens in B4A Designer, when I'm projection my layout.

    In this screen I have about 10 images.

    1 background, and 3 buttons, with 3 images each.

    I'm loading the picture, in project time, associating the file in image view, or button.
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    It is a mistake to create such variants. It will only make your program more difficult to maintain.
     
  5. Luiz Fernando Orlandini

    Luiz Fernando Orlandini Active Member Licensed User

    What is the suggestion Erel, use AutoScale?
     
  6. Troberg

    Troberg Well-Known Member Licensed User

    Use designer scripts to scale intelligently.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice