Results 1 to 3 of 3

Thread: Handling multiple dimension images (Sencha2)

  1. #1
    Sencha User
    Join Date
    May 2013
    Vote Rating

    Default Handling multiple dimension images (Sencha2)

    I am experienced developer in android platform but newbie to Sencha touch. I have following questions:
    1) How sencha2 handles multiple dimension images, just like in android we have different folders to put different resolution images like HDPI, MDPI, XHDPI, LDPI. (In our application we are planing to keep all the images in device itself)
    2) If I have to use image I have to set Height as mandatory parameter, is there any way in sencha just as we have Fill_parent, wrap_content in Android
    Please suggest.....

  2. #2
    Sencha User
    Join Date
    Nov 2010
    Vote Rating


    many of us are not native platform developers so we are not sure what things like 'fill_parent' do...
    actually, you don't have to specify the Ext.Img dims, if the parent container layout is 'fit' the image will occupy the available space in its parent container.

    maybe you can specify the behavior you need so that the knowledgeable people here can help you better (even though I am sure there are some native devs here to)

    as far as image resolution go, do you intend to load different images depending on platform? if so there are several platform detection utils in sencha you can use programmatically or maybe even you can take a look at the new platform based css loading in sencha 2.2 and try to see if you can use it.

  3. #3
    Sencha User
    Join Date
    Aug 2011
    Vote Rating

    Default or CSS

    Check out it automatically resizes images according to device size....although its an online tool and might not be suitable for your needs.

    Alternatively for local images I've had some good success using CSS and a few different properties, such as 'contain' 'cover' etc. Take a look here:

    Ive setup a CSS rule e.g.:

    .imagefit {
    background-size: contain; //also try cover

    and then set this class for the images.


Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts