Skip navigation
DanDinu
Currently Being Moderated

How to set a background image to fill the entire screen on any device in a spark mobile application

Nov 24, 2012 4:17 AM

Tags: #flex-mobile #spark #skin #flex4.6

Hi,

 

I started developing a mobile application with Flex.

I'm trying to set a background image to fill the whole screen. I've been stucked at this point for days now. I tried everything and no solution seems to work for me.

I'm using a TabbedViewNavigatorApplication and i need to set some background images on views.

I need my image to fill the entire screen on any device. i don't need to mantain image aspect ratio,  just need it to be fullscreen. This seemed to work when setting a custom skin on the TabbedViewNavigatorApplication, however this blocked all my views for some reason and all components contained in view became invisible.

 

Can you please tell me how can i achieve this?

 

Kind regards,

Dan

 
Replies
  • Currently Being Moderated
    Nov 25, 2012 5:14 PM   in reply to DanDinu

    Basically you need a larger image which can accommodate any device. The trick is to show only what each device can display, so therefore some clipping will occur based on device. Have something centered and towards margins have a  gradient or just plane colors that way the stuff in the middle will be visible on every device while nobody will care if you are clipping from the color fill.

     

    C

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 29, 2012 4:05 PM   in reply to DanDinu

    Hello, this is what I used sucessfully. <s:Image  scaleMode="zoom" source="@Embed('assets/happyswami.jpg')"/>

    hope it helps.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points