Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7438793
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:36:33+00:00 2026-05-29T10:36:33+00:00

Due to screen density of iPhone, image assets are developed larger. So, when specifying

  • 0

Due to screen density of iPhone, image assets are developed larger. So, when specifying the icons and images to Flex components takes this form.

<s:ViewNavigator id="tab1" label="Tab1 width="100%" height="100%" firstView="views.Tab1">
        <s:icon>
            <s:MultiDPIBitmapSource source160dpi="@Embed('assets/tabIcon.png')"/>
        </s:icon>
</s:ViewNavigator>

Flex of course renders this correctly and adjusts the size to what it should be.

However, when I load images myself, they appear blown up as they would appear double in size.

This is how I use it when overriding the tab bar.

public class TabbedViewNavigatorTabBarSkin extends ButtonBarSkin
{

    [Embed (source="/assets/tabBar.png" )]
    private var TabBarPng:Class;

    override protected function createChildren():void
    {
        var bgb:Bitmap = new TabBarPng() ;

        addChild(bgb);
    }
}

This is when the image appears blown up. What am I doing wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T10:36:33+00:00Added an answer on May 29, 2026 at 10:36 am

    Well I think what you’re trying to get it to do can be achieved with the following code, this is basically going to negate the work done internally to scale the asset based on the screen size, while allowing it to scale other components based on the DPI, I’m not sure exactly how this will play out in practice.

            import mx.core.mx_internal;
    

    …

            var bgb : Bitmap = new TabBarPng();
            bgb.scaleX = 1 / systemManager.mx_internal::densityScale;
            bgb.scaleY = 1 / systemManager.mx_internal::densityScale;
    

    or another possibility I think is:

            var mul : MultiDPIBitmapSource = new MultiDPIBitmapSource();
            mul.source160dpi = new TabBarPng();
    
            var bgb : BitmapImage = new BitmapImage();
            bgb.source = mul;
    
            var gr : Graphic = new Graphic();
            gr.width = 100 / systemManager.mx_internal::densityScale; //not sure if you'd want densityScale being applied here or what?  Same below just a matter of testing on more devices
            gr.height = 100 / systemManager.mx_internal::densityScale;
            gr.addElement(bgb)
            addChild(gr);
    

    [From MultiDPIBitmapSource API doc]

    This class provides a list of bitmaps for various runtime densities. It is supplied as the source to BitmapImage or Image and as the icon of a Button. The components will use the Application.runtimeDPI to choose which image to display.

    I think this documentation:

    http://help.adobe.com/en_US/flex/mobileapps/WS19f279b149e7481c682e5a9412cf5976c17-8000.html

    is probably still the clearest explanation you’ll find though it’s not entirely clear how this will affect the application at run-time on different devices. The best option is to just test on as many devices as you can (or need to support).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am banging my head on the wall here due to this problem: When
I have a issue of displaying information in iPhone screen. Case is as follows.
I have a feeling this is due to some sort of rendering optimization or
I have found that when the browse_button gets moved on the screen (possibly due
I'm new to Java and Blackberry and i'm stuck with a registration screen, due
Due to a problem posting, my last question (duplicate of this) was closed. Background
I tried putting a background image onto my view screen, unsuccessfully I might add.
I am having a fairly huge problem. I am hoping this is due to
I have this layout, and it's scaled weirdly (probably due to inadviseable layout nesting)
In order to avoid a sort of flickering effect on the screen due to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.