size different fields on different devices

I wrote an application that has a few simple fields. The layout is something like below:

--------HFM----------
-VFM - VFM
-HFM HFM

The low hfm contain the field so that you have two rows of fields next to each other. Now on a BB storm2 they look perfectly in portrait mode (360 wide if I'm wrong). On the BB Bold (9700) looks like * beep *. The text in the fields on the left does not match a single line all of a sudden while the screen is wider? In the code, I even put the width of fields to 140 in size. Can someone explain to me how it is possible that on a BB9700 140 is less wide it is a storm. Or am I oversee something here?

The reason is that the 9700 screen is 480 pixels wide, while the storm screen is only 360 pixels wide in portrait mode. Thew Bold 9700 has a much higher pixel density, which causes the object will appear smaller than they do on other devices.

For this reason, a field of 140 pixels wide will fill about half of the screen of the storm, but it will fill only about 1/3 of the 9700's screen.

The solution would be a relative (like 45%) instead of an absolute value (like 140) the value of the field with

Try something like this:

int fieldWidth = (int) (Display.getWidth() * 0.45);

This will outline the variable 'fieldWidth"equal to 45% of the width of the screen of the device. Then you can it use to set the size of your field.

I hope that helps!

Tags: BlackBerry Developers

Similar Questions

  • Website size is different in the different devices

    My Web site will appear in different sizes in different devices and adjusts, how to fix this?

    What you're looking for, it's what we call sensitive design.

    Unfortunately, Muse doesn't support sensitive design at the moment. However, if you have experience with web programming, Dreamweaver CS6 reactive load design with Media Queries and fluid grid Layouts, which publishes the CSS styling for each screen size.

    Take a look at this article!

    http://www.adobepress.com/articles/article.asp?p=1870087

    Hope this helps,

    Julia

  • Simulating the different devices in the JDE

    Hello..

    Currently with my JDE 4.6 it only allows me to simulate a storm and the 8900. I want to simulate my app on a few different devices (to see how it looks and feels more small/more large screens). I was just wondering how to install of new simulators for my JDE and where can I get them out?

    I'm new on this and any help would be greatly appreciated

    Thank you

    Devices come usually with of the JDE. You can download new devices by downloading the new JDE versions. You can then run the emulator from the command line and choose to install the application in the menu. Point of the dialog in the JAD/COD that you created and it will be installed in the emulator. Of course, you can simply use the new JDE to build and run your project but if you try to maintain compatibility with a version of the OS, but testing on the new devices, which tends to work ok.

    Thank you

    Rick

  • How to ensure the compatibility of Application on different devices like the curve and the storm. ?

    Hello

    Currently I am working on an application and

    What we expect is that "Application will work in the curve and storm Blackberry secruit phone devices.".

    How I ensure this. or what are the requirements.

    I'll have to do different things for different devices. ?

    If some has a link to information that can explain the difference on various devices, please give me. Please, I beg you.

    Please help me in this regard.

    Thank you.

    Development of applications of BB is compatible before, then you might reference the version of operating system that you want to support, same generation will be used on other devices.

  • Please can someone tell if google chrome development tool that emulates different devices provide a view Specifies how the site will be viewed on different devices

    Please can someone tell if google chrome development tool that emulates different devices provide a view Specifies how the site will be viewed on different devices

    All the emulators fail at something, so it is always best to test the real devices when you can.

    That said, Chrome and Firefox are quite close. One of the things bigger than don't miss the emulators in the browser is the function of auto zoom of smaller devices. Be sure to include the viewport with an initial scale of 1.0 and you should be fine...

    Generally emulators you what a phone with auto zoom see when this tag is missing. Some phone browsers also automatically link and add styles to things like phone numbers or dates, if there is no style associated with them are coming from css to your site. Dev tools will miss that also and sometimes it's a little surprising to see a bunch of links on your page when you never coded in a first time.

    Again, it is always better to use actual devices, you intend to support, to see what will actually make your site.

  • Can FrameMaker to create several Master Pages with sizes different pages in a single file of FM?

    Can FrameMaker to create several Master Pages with sizes different pages in a single file of FM?

    N °

    You must break your content between files and use the book feature to apply numbering to make look it seamless. Sometimes, if you can, re - organize the content so that all oversize pages come at the end of a chapter/file makes it easier to manage a such split files in the book.

  • How to install photoshop in two different devices

    I bought the package of Adobe Photoshop CC (2015) with Adobe Lightroom (2015). I could place it in a mac pro computer but when I place it on my iMac, he says it will end after 30 days. I know that I can use the program for three different devices. Please advice...

    After installation, you can sign in as needed.

    Download the application of CC Office in good Download Adobe Creative Cloud apps | Adobe Creative Cloud free trial

  • How to send different content for different devices

    Hello

    I would like to set up my Dreamweaver CC site to send a Unity3D game (requires the browser plugin) for desktop but send a video trailer of the game for tablets and phones.  The problem is that the Unity 3D web player does not work on tablets and phones I have Adobe Muse who would do this simple enough that you can send a different content for different devices easily, but Muse does not support the unity 3D plugin.

    I explored websites Bootstrap and sensitive, but I don't think that's the answer.  I have found a lot of tips and tutorials on how to send the same content but formatted differently to different devices, but I couldn't find anything on the use of Bootstrap to send any content to different devices.  Is it possible to use for this media queries?

    I read a little, but about setting up subdomains.  Is this the way forward?  Any advice will be greatly appreciated.  Thank you.

    Zaid

    Hi Nancy, thanks for your idea, but I just found a solution so easy, that it makes me feel stupid that I can't find as soon as possible.  My site host, Business Catalyst, allows you to create your site with content for phone and tablet in different folders.  Then, you can route these files to the phone features or tablet.  It's a simple drop down menu choices.  You don't have to do subdomains or anything like that.  Wow, what a relief!

    Zaid

  • With the help of two different devices for VDR to save the same virtual machines

    Hello

    I have VDR backup right now most of my virtual machines. I'm experimenting with some recovery scenarios disaster using VDR. I want to set up a new device, backup virtual machines themselves, but with a destination off. My question is, it would cause problems to have two different devices, backup the same virtual machines?

    I'm asking this is because I was looking at the notes of recent VMworld session on VDR and he says, regarding a troubleshooting scenario in which you must create a new device in addition to your current device, both devices back up the same virtual machines do not.

    If it is dangerous to do so because of the likelihood that two devices can save the same virtual machines at the same time, I could schedule the backup windows at different times to avoid this problem.

    Anyone have any ideas?

    I create a second local camera vDR and vDR distance and test it against a test VM. The vDR devices will have their own CBT files for each virtual computer, so they should be able to work together, but I would like to go through tests to see how they work well on the WAN. Make sure that you can transfer enough data to host daily data change.

  • Muse, y at - it code for different devices in web page?

    When designing to the muse, can you build desktop, Tablet and phone all together with a single Web site? Check where those who have phones going on the site of phone and people with tablets go on the site of the tablet. Desktop users go to the desktop. If this is possible is there any code I must put in my web pages for visitors to go also have different devices? If so please tell me where I can find it. Thank you!

    Yes, you can build desktop, Tablet and phone layouts for a Web site and a Muse of the project and host the Adobe website of accommodation through Business Catalyst or to a third party Web host provider. The logic of the site detects the browser and the device being used by the visitor and redirects automatically to load the appropriate tablet, by phone, or office layout. There are tutorials in-depth on the construction of a mobile site in Muse - http://www.adobekb.com/creating_mobile_layouts_pt01.html

    Thank you

    Vinayak

  • Size of field in the Web form

    How can I change the sizes of field based on BusinessCatalyst?

    I'm doing a simple email form but the changes under

    "more actions" "custom web form" does not seem to stick.

    any suggestion would be great.

    Ciao

    Geoffrey

    Hi Geoffrey,.

    The size of the fields on the web page will probably be determined by css applied to form elements, using Firebug in Firefox to help identify.

    Steve

  • Support different device sizes.

    Hi all

    I need a support to Q10 and Z10.

    the UX and UI are provided by a third party, and they want the user interface to be a little different for Q10 and Z10.

    I went thorugh the documentation in this respect and found this:

    https://developer.BlackBerry.com/native/documentation/Cascades/best_practices/resolution/using_stati...

    This, I understand that, we can use QML different for different screen sizes.

    but I develop ui in CPC mu... so is it possible to do in CPP too?

    Help, please!

    There is no folder for C++, so what would you put in?

    So yes, or use a thin layer in a qml file, as suggested.

  • Display of sizes of different icons on different devices

    I'm trying to dynamically set a different icon based on the device. I've set up another point of entry in the xml of the application descriptor file. It passes an argument of "icon" in my application main().

    The entry point is triggered as expected (installation of the application and to the power of the cycle), but he has problems when calling updateIcon() on some phones (for example BB 8900 T-Mobile version 4.6.1.231 (Platform 4.2.0.108)). Looks like it fails on phones with OS 4.7 and works very well on phones on or above this level.

    The error I get is IllegalArgumentException: "Module with handle [XXXX] and [X] index has no application entry point. Try to set the index to both 0 and 1 on updateIcon() has the same problem.

    It is only happening when I install the application OTA (works on the 8900 charging cable).

    I have my code below from from the section of this topic:

    public static void main(String[] args) { if ( args != null && args.length > 0 && args[0].equals("icon") ){      MyApp instance = new MyApp(true); } else {      MyApp instance = my MyApp(false); } instance.enterEventDispatcher();}
    
    public MyApp(boolean autostart){   if(autostart){        Bitmap loadedIcon;        int width = HomeScreen.getPreferredIconWidth();       int height = HomeScreen.getPreferredIconHeight();
    
          //conditional logic to initialize "loadedIcon" based on device icon width
    
          final Bitmap icon = loadedIcon;       invokeLater(new Runnable(){                 public void run(){                    ApplicationManager myAppManager = ApplicationManager.getApplicationManager();                     boolean keepGoing = true;                     while (keepGoing){                        //Check if the BlackBerry has completed its startup process.                          if (myAppManager.inStartup()){                            //The BlackBerry is still starting up, sleep for 1 second.                            try {                                 Thread.sleep(1000);                           } catch (Exception ex) {                                //Couldn't sleep, handle exception.                             }                         } else {                              //The BlackBerry has finished its startup process.                            //Set the rollover icons.                             try {                                 HomeScreen.updateIcon(icon, 0);                               HomeScreen.setRolloverIcon(icon, 0);                              } catch(Exception e){                                   System.out.println("setting icon caught: " + e.getMessage());                                 e.printStackTrace();                            }                             keepGoing = false;                        }                     }                     //Exit the application.                   System.exit(0);               }             }); } else {      //load the app normally, with UI. }}
    

    I use Eclipse plug-in 1.1.2 to build my app, but article is older, obsolete 1.0 plugin, maybe the instructions no longer apply and must be updated?

    Understood the problem, basically it is a condition of race as described here which is also in addition to restarting the device. It happens when the application is installed OTA and the entry point to attempts to define the icon when the application is not fully registered with the device. In a Word, it is the valid response (in invokeLater):

    int failedTries = 0; //failed attempt counter (maximum of 5 attempts for this example)public void run(){                     ApplicationManager myAppManager = ApplicationManager.getApplicationManager();                     boolean keepGoing = true;                     while (keepGoing){                        //Check if the BlackBerry has completed its startup process.                          if (myAppManager.inStartup()){                            //The BlackBerry is still starting up, sleep for 1 second.                            try {                                 Thread.sleep(1000);                           } catch (Exception ex) {                                //Couldn't sleep, handle exception.                             }                         } else {                              //The BlackBerry has finished its startup process.                            //Set the rollover icons.                             try {                                 HomeScreen.updateIcon(icon, 0);                               HomeScreen.setRolloverIcon(icon, 0);                                          keepGoing = false;                                          //Icon should of been set at this point                             } catch(Exception e){                                 System.out.println("setting icon caught: " + e.getMessage());                                 e.printStackTrace();                                          failedTries++;                                    try {                                     Thread.sleep(2500);                               } catch (Exception ex) {                                    //Couldn't sleep, handle exception.                                 }                                          //Since the attempt failed, we sleep for two and a half secs and try again.                              }                             if(failedTries > 4){                               //Worst case. Should revert to a default icon if it fails to be set after five tries.                                 keepGoing = false;                            }                         }                     }                     //Exit the application.                   System.exit(0);               }
    

    Catch the exception, and then sleep for about two seconds and leave the loop to set the icon again, because it will succeed on the second or third try (at that time that the app must be registered with the device, including its entry point). In addition, to ensure a maximum test because you do not want to create a possibility of an infinite loop if for some reason, it fails to set the icon each time.

  • Only one Publication, different devices and computers

    Hi all

    I'm the designer of a free Magazine for a volunteer not for Profit Charity.  In the past, I designed the publication as an "interactive" PDF A4 for distrubution among our members (PDF attached to an email)

    I recently started learning the DPS and regarding practical aspects, how to design a working paper for

    Protects 2/3 - as an application

    Andriod Tablet - DPS

    Desktop - (Windows or Mac)

    Is this practice or what I need to do a different composition for each device?  I dare not ask mobile immediately.

    Banks advice

    MIK

    You have to design content using InDesign. iPad 2/3 can have the same paper work when using folio pdf format, so you don't need to re-design for both devices. Android needs to separate the design of documents due to the diferrence of screen size and some features like pdf folios formats are not supported in Android devices. Refer to this article to learn more: http://help.adobe.com/en_US/digitalpubsuite/using/WS67cb9e293e2f1f60f5f54012e30daf910-8000 .html

    Currently, you cannot publish them directly on the desktop, however, you can share your items using the Web Viewer, which can be found on desktop computers.

    http://www.Adobe.com/devnet/digitalpublishingsuite/articles/integrated-social-sharing-with-digital-edition - suite.html

  • Why the same photo's file size different in Photos and in the Finder?

    I have a photo size 4608 x 3456. When I open the file information in the Apple's Photos app, it says that the file is 7.8 MB. When I open the same photo in the Finder and look at the news file, it is said that it is 3.1 MB on the disk. Why does this happen? All other metadata is the same in the pictures, Finder, Lightroom or Photoshop, but I can't understand why the file size seems to have changed since I dragged photo pictures to the Finder.

    Thank you.

    How you view the photo in the finder (you shouldn't be messing around inside the photo library)?

    If you export or drag / drop you create a new file with a different compression - using export allows you to control what

    LN

Maybe you are looking for

  • help with a lazy slow macbook pro

    Hi, I was wondering if someone with a good understanding of the EtreCheck might be able to help me with my old powerbook, rusty. Here is the report copied and pasted from the EtreCheck diagnosis that I just ran (lots of red type): Thank you! EtreChec

  • Windows cannot find 'csrcs.exe '.

    When I start the computer, it comes out a message Windows cannot find 'csrcs.exe '. Make sure you typed the name correctly and then try again. To search for a file, click the Start button, and then click search.

  • I downloaded a movie, but when I play it its only his film to show how

    I am running windows xp family

  • NIC does not: "this device cannot start. (Code 10) »

    My internet connection does not work (although I can always get a wireless connection) to my computer. The "82567V-2 network connection intel Gigabit ' says"this device cannot start. (Code 10) ». I've updated all the drivers. If the material is broke

  • Cisco IOS 12.3.5a vs IOS 12.3.3c

    I have an ongoing execution of 2621 IP address, firewall, IDS, and NAT I opened the appropriate ports to allow a PCAnywhere client via the host inside the firewall. It works fine on IOS 12.3.3c and below. The connection starts, but does not end when