How to make an Android UI with images from a designer delivered as layers
        Posted  
        
            by 
                Not Me
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Not Me
        
        
        
        Published on 2012-10-24T22:51:25Z
        Indexed on 
            2012/10/24
            23:00 UTC
        
        
        Read the original article
        Hit count: 565
        
I hired a designer to help me redesign the UI for my Android app. For each Activity he gave me an image for the background, which includes any static content like fancy frames for text content; plus images for the buttons, which must fit in to the background image in exact places, to fit into the frames in the background image.
However, since Android devices have different screen sizes and aspect ratios, it's easy to fit the background image by itself with android:scaleType="centerInside", but how can I get all the other images to fit in with background exactly, to the pixel? If they didn't have to fit in with the background, I would just set the exact width and height for each ImageButton, but depending on how the background scales (based on the screen size and ratio) they might end up not aligned correctly.
Thank you very much in advance.
© Stack Overflow or respective owner