True height of Canvas  in different Screen

Hello ereryone:
Can u tell me the exact height of Canvas for these types of Screens under the condition not setting full screen?
128*128
128*160
176*208
176*220
320*240
thanx for ur help

Hi,
That fully depends on the phone (native) menu / java implementation. Each phone type from each different manufacturer has different dimenions for titlebars, softkeybars and other UI related goodies.
So we cannot just give an answer. You will need to test it by invoking the getWidth and getHeight on the different target devices.
Cheers for now,
Jasper

Similar Messages

  • Delay loading images when switching to different screen...

    Hi,
    I got it all to work but there's a ridiculous delay loading images for the next screen. There's only one window, but many different screens represent different states of the program.
    1st screen)This screen using JPanel to display the screen. In this screen, I overrided
    the paintComponent to draw background image. The button is triggered
    by mouseclick event which then tell the next screen to load.
    2nd screen)This screen uses Graphics2D (bufferedImage in the Engine is already
    created)to draw image onto the screen.
    1st Screen code below:
    public class LoginController extends JFrame implements Controller, ImageObserver{
         private GameEngine myEngine;
         private SpeechEngine ttsEngine;     
            private Image login;
         private JPanel main;
         private JTextField nameField;
         private JPasswordField passwordField;
         private class Background extends JPanel implements MouseListener
             private Image login;
             public Background(){
                super();   
                setOpaque(false);
                login = new ImageIcon("gfx/slogin.PNG").getImage();            
             public void paintComponent(Graphics g){
                  Graphics2D g2 = (Graphics2D) g.create();
                g2.drawImage(login, 0, 0, this);
                g2.dispose();
              public void addComponent(Container container, Component c, int x,
                                                          int y, int width, int height) {
                   c.setBounds(x,y,width,height);
                      container.add(c);             
              /* (non-Javadoc)
               * @see java.awt.event.MouseListener#mouseClicked(java.awt.event.MouseEvent)
              public void mouseClicked(MouseEvent event) {
                   int X = event.getX();
                   int Y = event.getY();
                   if (event.getButton() == MouseEvent.BUTTON1 ) {
                        if ( X >= buttonLoginX && X <= (buttonLoginX+buttonWidth)) {
                             if ( Y >= buttonY && Y <= (buttonY+buttonHeight)) {                    
                                  //will add aucthentication
                                  switchView();
                                  myEngine.startMenu();                              
                   if (event.getButton() == MouseEvent.BUTTON1 ) {
                        if (X >= buttonQuitX && X <= (buttonQuitX+buttonWidth)) {
                             if ( Y >= buttonY && Y <= (buttonY+buttonHeight) ) {
                                  System.exit(0);
        } // end Background
          * contructor
          * @param args
         public LoginController() {
              super();
              myEngine = new GameEngine(this, new Student());
              ttsEngine = new SpeechEngine();
              login = new ImageIcon("gfx/slogin.PNG").getImage();
              nameField = new JTextField();
              nameField.setFont(new Font(null, Font.BOLD, 16));
            passwordField = new JPasswordField();
            passwordField.setFont(new Font(null, Font.BOLD, 16));
            startGame();
         public void switchView(){
              this.setContentPane(myEngine);          
         * preset the screen to current width and height
         public void startGame(){
              Background mainLogin = new Background();
              mainLogin.setLayout(null);
            mainLogin.addComponent(mainLogin,nameField,buttonQuitX+5,250,230,30);   
            mainLogin.addComponent(mainLogin,passwordField,buttonLoginX-140,250,230,30);
            //load JFrame          
              this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            this.setContentPane(mainLogin);
            this.setSize(GameEngine.SCREEN_WIDTH, GameEngine.SCREEN_HEIGHT);       
            this.setVisible(true);    
            this.addMouseListener(mainLogin);
            this.validate(); 
            myEngine.init();
            new Thread(myEngine).start();
            new Thread(ttsEngine).start();
         public void gameStep(Graphics2D canvas){
              /*not requires anymore*/          
          * @param Images
         public boolean imageUpdate(Image img, int infoflags,int x,
                                            int y, int width, int height) {          
              return false;
         public void mouseClicked(MouseEvent event) {
              // TODO Auto-generated method stub          
              System.out.println();
          * Main
          * @param args
        public static void main(String[] args) {
             LoginController newGame = new LoginController();       
    }// end LoginController ----------------------------- 2nd screen code ------------------------------------------
    public class PreLessonController implements Controller, ImageObserver {
         private Session curSession;
         private GameEngine curEngine;
         private Image preLesson;
         private boolean initialized;
         public PreLessonController(GameEngine engine, Session s) {
              curEngine = engine;
              curSession = s;
              initialized = false;
              preLesson = new ImageIcon("gfx/preless.PNG").getImage();
         /* (non-Javadoc)
          * @see game.Controller#gameStep(java.awt.Graphics2D)
         public void gameStep(Graphics2D canvas) {  
                               // the image execute but nevers get to the screen with the code below
                               // until I resize the window screen.
              if ( !initialized )
                   canvas.clearRect(0, 0, GameEngine.SCREEN_WIDTH,GameEngine.SCREEN_HEIGHT);          
              canvas.setTransform(AffineTransform.getTranslateInstance(0, 0));
            // prepare for the prelesson screen
              canvas.clearRect(0, 0, GameEngine.SCREEN_WIDTH, GameEngine.SCREEN_HEIGHT + 20);          
              canvas.drawImage(preLesson, 0, 0, this);
              //drawing rectangular for button
              Font tmp = canvas.getFont();
              canvas.setFont(new Font(null, Font.BOLD, 24));          
              canvas.setPaint(Color.RED);
              canvas.drawRect(455, 410, 170, 40);
              canvas.drawString("START GAME", 460, 440);
              canvas.setFont(tmp);
         /* (non-Javadoc)
          * @see game.Controller#mouseClicked(java.awt.event.MouseEvent)
         public void mouseClicked(MouseEvent event) {
              // TODO Auto-generated method stub
              if (event.getButton() == MouseEvent.BUTTON1 && event.getX() >= 455
                        && event.getX() <= 625 && event.getY() >= 410
                        && event.getY() <= 450) {
                   curEngine.startGame();
    } //end prelessonController  I have been working on it for 2 hrs and can't figure out what is wrong. Like I stated above in the code, if I resize the current running window, the 2nd screen just pop up, else, I would wait for long time.
    Please help. Very appreciated.

    anyone?

  • Creating an app for different screen resolutions/sizes

    Hi
    I'm currently in the process of learning application development for the iPhone and could do with some help on how to cater for retina and non-retina screens. I want to create image assets for each screen type.
    What the best way to go about detecting if the user has an iPhone 4 for example and selecting the appropriate images for that resolution? I understand that you attach '2x' to file names when coding natively but for a pure Actionscript project where the assets might be contained in a swc file what would be best to do?
    Thanks

    Hi Vic,
    The biggest advantage of building apps in Flash CS5.5 or Flex is the ability to target multiple devices and the 2 major platforms, iOS and Android oh and also Blackberry (anyone?).
    Best way to approach a build is to assume you do not know the screen size your app will be used on, since Android is so all over the place.
    I have been using stage.stageHeight and stage.stageWidth religiously for all my scaling although I have heard that method has its problems, it has worked well for me, I have put out 2 apps personally and 3-4 for work using this method both in Landscape and Portrait orientations and this method has worked well.
    The easiest way to build a multi screen app is to design it for an average ratio, 3:4 being the lowest = iPad so lets say you pick some decent size that wont be too big for smaller screens like the iPhone 3gs 480x320 and wont be too low for high res screens like the new Google Nexus or the Motorola Xoom 1280x800. I usually target the iPhone 4 screen 960x640 right now it seems to fall in the middle between older phones and tablets.
    The real quick and dirty way of doing it is to build all your assets inside a movie clip and then scale that movie clip proportionally to the stage, first checking to make sure none of it would be cut off due to different screen ratios, this is not the best way of doing it but it works well and its the easiest method.
    A better way is to scale and place your content in relation to the stage, again the stage.stageWidth and Height properties are your friends so if you have an element that always goes in the middle you would place it my_mc.x = stage.stageHeight / 2 and same with the y, you can also scale it to the stage my_mc.width = stage.stageWidth/4 this way the movie clip is always 1/4th of the stage width regardless of the screen, its a lot planning up front but this method allows you to cover the entire screen instead of just cramming your movie clip in there however it fits.
    Let me know if any of that helped I can go into further detail but I feel like I am rambling on.

  • Parallax scrolling for different screens

    Hi there...
    Does anybody know how to deal with different screen sizes and parallax scrolling?
    It know the 100% width option so that is not the issue.....the issue is the height!!
    Laptop versus desktop etc..
    So what is the best height to use so it will fit all screen sizes?
    Thanks, Cor

    Hai Daniel,
    I faced the same problem with the overflow controller.
    Then depending on the number of records that I am showing in the table I have adjusted the size of the overflow controller in pixels.
    my code looks some thing like this.
    lv_oflc_height = 53 + ( lv_actual_visible_rows * 21 ).
    if the filter is on 20 more pixels added to the height.
    <xhtmlb:overflowContainer id     = "OFLC_RCN_HDR"
                                height = "<%= lv_oflc_height %>px"
                                mode   = "SCROLL" >
    and this worked for some standard resolutions with out big difference.
    Best Regards,
    Venkat.

  • 11gr1 - Handling different screen resolutions for an enterprise app.

    Hi,
    We are developing an enterprise application that will be deployed at different clients with different hardware.
    We are confused about how to handle different screen resolutions and wonder how others are handling this.
    We have some fixed size areas in our screens and liquid areas for content that may expand. The problem is say that you have a table with 6 columns. This table will be rendered nicely at 1280X800 but not at 1650X1050 or 800X600.
    At higher resolutions we will either end up having some blank space or expand one of the columns of the table , but can't expand every column proportionally and this will look ugly.
    For lower resolutions same problem in a different way will come into picture, we will not able to resize the columns and end up with scroll bars etc ...
    What is the best practice with handling different screen resolutions for components like table,panel splitter etc ?
    Thanks

    Hi Muhammed,
    I don't think that any better solution exists, you already use liquid layouts and define widths & heights with percentages etc. In my opinion using blank column at the end of table columns makes table's looking better. Additionally creating custom skin for table and defining column heights & widths with % or em may help you to stretch columns?

  • Resizable page for different screen sizes but with static image content. Shall I use media query?

    I’m making a page that has of mostly image content. It’s a large circle in the middle so I want it to be centered vertically and horizontally. I also want it to stay centered and resized proportionally for different screen sizes. I’ve read about media query but it seems to me that the elements just become fluid. Can I make the elements stay in place using the media query?
    I’m working in Dreamweaver CS5.5

    Here's the code I'm working with now, I've taken away the things that I don't really understand.
    It's working but I guess it won't hold when I start with the media queries.
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html>
    <head><style type="text/css">
    body {}
    div {
       font: 12px Arial;
    span.bold { font-weight: bold; }
    #the-circle {
      height: 960px;
    width:960px;
    margin-left:650px;
    margin: 0px 10px 0px 10px;
    margin-left:650px;
    .link-row {
    position:absolute;
    width: 960px;
    height: 74px;
    top: 130px;
    left:660px;
    .link-row-2 {
       position: absolute;
       width: 960px;
       height: 74px;
       top: 300px;
       left:660px;
    .link-row-left {
    float: left;
    .link-row-right {
    float: right;
    .link-row-right {
    float: right;
    .link-row-right {
    float: right;
    </style></head>
    <body>
    <br /><br />
    <div id="the-circle">
    <img src="ACE Test/Logo-DW.png" width="960" height="960" />
    </div>
    <div class="link-row">
    <div class="link-row-left"><img src="ACE Fotografier EP och Video/Logo/Wix ACE Logo.png" width="111" height="74" /></div>
    </div>
    <div class="link-row-2">
    <div class="link-row-right"><img src="ACE Fotografier EP och Video/Logo/Wix ACE Logo.png" width="111" height="74" /></div>
    </div>
    </body></html>

  • Automatic scale of Flash movie to fit different screen/browser sizes

    Hi guys,
    I am a mid level Flash user. I have a online portfolio site which I have had running for around 4 years.
    The site at the moment is in its 4th incarnation as I keep growing tired of the layout and design and keep striving to improve it visually. The previous designs have always been at the standard 800x600px or slightly bigger. So when viewed on the majority of different screen sizes and browsers the site was always fully visible at 100%.
    For the latest redesign I've opted for a much larger site size of 1024x768px. This is obviously alot clearer for the user and looks great when viewed on a 19" monitor and above. I for example have a 27" iMac so the site in my opinion looks great.
    The problem I have is when the site is viewed on a smaller screen 17" and below, laptops etc. Due to the size of my Flash site if I view it on a laptop screen the side and bottom scroll bars obviously appear on the browser. I want to know if there is anyway that I can publish the Flash site so that whenever the site is viewed on whatever sized screen or browser it is always seen at 100% without scrollbars.
    I have played about with the publish settings but can't seem to find a way to do this. I have also downloaded SWFFit (Flash Fit) but i'm not sure whether this will do the trick?
    My site can be viewed at:
    www.nineteeneightyone.co.uk
    Any help or advice would be greatly appreciated.
    Thanks in advance.

    I was a little confused when you mentioned wanting to "scale" the site and then you mentioned that "the site was always fully visible at 100%".
    Now I understand that when you say 100%, you simply meant that all of the site was visible at the same time... no scrolling needed.
    "whenever the site is viewed on whatever sized screen or browser it is always seen at 100% without scrollbars".
    By this I assume you mean that the site is fully visible? not that you want to view the site at !00%... correct?
    Typically when discussing Flash scaling, 100% mean 100% of the browser window, and has nothing to do with how much of the site is visible inside that window.
    When looking at Flash scaling, there are a number of things to consider, width, height, aspect ratio, and the use/no use of scrollbars.
    Using a size of 1024 X 768 is a good example of a size that will require scrollbars or downscaling in order to display in a Web browser on a  1024 X 768 monitor. A 1024 X 768 will only display about 1000px or less in width and of course with the Web browser address bars etc, a height of 600 or so would be more realistic. So by default, the size requires both horizontal and vert scroll bars when viewed on a 1024 X 768 monitor.
    So what would be required to display the entire site without scrollbars? Well in this case, since only 600 px in height are available, the height has to be downscaled about 78% of the original height... so to maintain the same aspect ratio (the ratio of width to height), then the width was also be downscaled to about 78% or original or about 800 px wide... OK that's fine, but because the monitor is about 1000px wide, there will now be about 100 px unused space on the right and the left.
    By default, Flash likes to maintain that aspect ratio, so that round things stay round and square things stay square. It just means that as you increase or decrease width or height, the corresponding dimension will also change.. decrease height.. and width decreases also.
    Here is an old post that illustrates Flash scaling and how aspect ratio can be maintained or distorted:
    Here are examples of different scaling parameters available in the Publish settings. You can also add these parameters directly in the html (<param name="scale" value="noscale"). All the examples replace the actual Flash dimensions with 100% for both width and height (width="100%" height="100%"). These examples use the old <object> and <embed> to illustrate the different ways to scale Flash. Once you understand how it works I’d recommend that you use swfobject to place the Flash in your final project.
    View the source code for each page to see the full code.
    http://www.cidigitalmedia.com/tutorials/scale/exact_fit.html
    "exactFit" scales the file to fit exactly within the confines of the screen, irregardless if the movie becomes consequently distorted. The original aspect ratio is not maintained. So round things are not round and squares are not square.
    http://www.cidigitalmedia.com/tutorials/scale/noScale.html
    "noScale" is the default setting, and causes the movie to be displayed at the originally designed dimensions.
    http://www.cidigitalmedia.com/tutorials/scale/no_border.html
    "noBorder" causes the movie to be scaled to what ever dimensions are needed to have no border surrounding the movie within the player, which consequently could result in some of the movie being cut off from view. In other words, the movie will maintain the original aspect ratio and will fill the screen completely. But if the movie has to be streched wider to fill both sides of the screen, it will also stretch taller, but then some of the top and the bottom of the movie may be cut off from view.
    http://www.cidigitalmedia.com/tutorials/scale/show_all.html
    "showAll" scales the movie to the size of the screen (which could cause pixelation if the file contains raster information), the difference between showAll and exactFit is that showAll mantains initial movie size proportions. Because it maintains the original aspect ratio, there can be space to the sides or the top and bottom. But everything always shows and they are not distorted. But notice the photo in the center, it becomes pixilated at larger screen resolutions.
    The trickiest part of trying to go full screen is that it’s difficult to make the Flash wider without making it taller also, that is, to maintain the correct proportions or aspect ratio of everything on the stage. These methods are just simple scaling accomplished with html. There are also methods to dynamically scale the stage and it’s elements using Actionscript… but that’s a much more complex undertaking.
    Best wishes,
    Eye for Video
    www.cidigitalmedia.com
    Best wishes,
    Adninjastrator

  • Poistion Canvas on the screen

    Hi,
    I have a Form which opens with a small size Main canvas which has a button, this button when pressed displays another smaller canvas on the screen, I am trying to change the display position of the smaller Canvas. I have tried changing the X , Y position on the Canvas property but this does not seem to help. Can someone please advise me how I should be doing this , so I can display the smaller canvas appropriately.
    Thanks
    FM

    IQ wrote:
    Hi,
    I have a Form which opens with a small size Main canvas which has a button, this button when pressed displays another smaller canvas on the screen, I am trying to change the display position of the smaller Canvas. I have tried changing the X , Y position on the Canvas property but this does not seem to help. Can someone please advise me how I should be doing this , so I can display the smaller canvas appropriately.
    Thanks
    FMMake another window for 2nd canvas and set windows height and weight.
    hopes this helps

  • Optimizing captivate file for different screen resolution

    Hi,
    I've a problem in optmizing the captivate file for different screens like laptop,netbook and pc. In PC's and laptops, this is not a major issue as the size of the screen is large. But when we play the captivate generated swf file in a netbook, the whole website gets resized to fit in to the resolution of the screen except the captivate file.Captivate file gets truncated in such a way that, the user can read only half of the slide.
    Thanks in advance
    Parvathy

    One thing you can try is adjusting the swf dimensions manually.  I haven't found a way to do it in Cp.  We had a similar problem with some eLearning we built that all our testers used just fine.  But once someone undocked their laptop and was off their desktop monitor, had the same problem you describe, where the bottom of the movie was cut off.
    Once you publish the files, open the .htm file with notepad or your text/html editor of choice.
    Look for a line that looks something like this:
    var so = new SWFObject(strURLFile + strURLParams, "Captivate", "1100", "798", "10", "#CCCCCC");
    or
    var so = new SWFObject("filename.swf", "Captivate", "1600", "1200", "10", "#CCCCCC");
    Change those numbers in quotes to 100%, like this:
    var so = new SWFObject("filename.swf", "Captivate", "100%", "100%", "10", "#CCCCCC");
    save the .htm
    My experience has been it will adjust the swf so it fits either the height or width of the display, whichever is shorter.  That is, it will either fill the top to bottom OR side to side, but keep the swf in proportion.
    hope that helps.

  • Site Formatting for different screen sizes

    Hi there,
    I am designing a website for a customer and having some problems with the site fitting on different screens.  I set it to what I was led to believe is the universal resolution/screen size, and it looks great on large, wide-screen computers, but doesn't fit right and requires lots of scrolling on smaller screens.  I also have a pop-out light box feature when visitors click TEAM and it doesn't fit on smaller screesn either.  How can I make the site auto adjust to different screens?  This is a big must for the customer and I'm still pretty new to MUSE so i don't entirely know what I'm doing.  Any help would be greatly appreciated. 
    The site is: http://apopecary01.businesscatalyst.com
    Thanks!
    Nick

    Truly variable width "liquid" layouts are not supported. However, visual designs that fill the full browser width are possible using browser fill image tiling and 100% width page items. Also page item pinning and browser fill scrolling can be leveraged to create designs where content moves relative to each other when the browser window height or width changes.
    We may be exploring responsive layout options for Muse in the future, but right now it is fixed width only.
    - Abhishek Maurya

  • Downloaded new iOS for iPhone 5. Now the handset is running hot, keeps freezing on different screens, won't charge on official charger ( only charges on crap poundland one) and battery is loosing 1% every two minutes!

    Downloaded new iOS for iPhone 5. Now the handset is running hot, keeps freezing on different screens, won't charge on official charger ( only charges on crap poundland one) and battery is loosing 1% every two minutes! I've closed all apps and reset the complete phone but no luck. Any one know what else I can try apart from a new phone?

    I have done a factory reset at 45% battery. After the reset it's still hot and at 35% now

  • Development and Quality server using different screen color setting

    Hi,
    I want to differentiate the Development and Quality server using different screen colors,
    How can I set different color logon screen for the different kinds of servers.
    Thank You.
    Best Regards,
    M.Thirumoorthi
    [email protected]

    Hi Thiru moothi,
    Please check these links :
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/ep/modifyingtheLogon+Page&
    Custom Password Change Page
    Custom Portal Logon Page
    Reward points if handy!
    Cheers,
    Sandeep
    Edited by: Sandeep Tudumu on Mar 26, 2008 7:41 PM

  • How can i launch same app on different screen in musca

    hi,all
    i use musca on my laptop, demenu as app launcher, and i connect a 22 inch monitor to my laptop, using separate x window by nvidia, so there is screen 0 and screen 1
    when i launch chromium first , it will appear on the screen where i excute the launch command, but when i want to start a new chromium, it will stick to the screen that
    the first chromium appear.
    my question is how can i start two chromium on two different screen?
    thanks

    it seems to be chromium's problem.
    when i excute chromium on another screen's urxvt, it say:
    "Created new window in existing browser session."
    Last edited by ibarca (2010-08-09 08:32:06)

  • I am trying to reorganise my apps on my iphone via the new itunes software, you don't seem to be able to move one app at a time to a different screen, just move the screens around, what am I doing wrong

    I am trying to reorganise my apps on my iphone via the new itunes software, you don't seem to be able to move one app at a time to a different screen, just move the screens around, what am I doing wrong

    Re: That garbage is unreadable.
    If you really want help, stop messing with the fonts and post so that others can read and offer suggestions.
    Or better yet... try a search, I'm certain you'll find a solution to whatever issue you're experiencing.
    I have found that many times it is the things that make you most angry that push you to action. This was the case here. Thank you for causing me to get so angry that I found the answer myself.

  • We are a creative design studio, we need to use apple mac pro server , so we can make more than a different user to use at the same time doing different activities, on different screens, is it possible?what is the max. no. of users that can work efficient

    we are a creative design studio, we need to use apple mac pro server , so we can make more than a different user to use at the same time doing different activities, on different screens, is it possible?what is the max. no. of users that can work efficient.
    Appreciate your support and if possible , how to do this?

    If you want to work with Mac OS X, you need one computer per simultaneous user.
    What you are describing, " Multiple simultaneous logins to a single computer" is not avialable on a regular Mac of any description, unless you decide to use Unix tools instead of Mac OS X.
    Server will happily store files for many, many users and provide them to multiple (up to hundreds) of computers at "near hard Drive" speeds over Gigabit Ethernet. It can make the File Sharing part easy.

Maybe you are looking for