Make the size of the police according to different screen resolutions

Hi all

I'm developing an application that needs to run on the two devices OS 6 and 7. There are a number of devices that fall into that category, I need to standardize the sizes of police across all screen resolutions.

A few messages in the support forum, I understand that I need to use UNITS_pt as the police unit in order to standardize the size of police across all resolutions.

But my client gave me sizes of fonts to use in pixels. Should have sizes from photoshop. What I need now, is to convert the font size of the pixels into points. I created a method that you can find below, for this conversion, but I don't know if it will work or not. I need an expert advisor.

public static Font getFontPlain(int fontSizeInPixels) {
        try {
            fontFamily = FontFamily.forName("Helvetica");
        } catch (ClassNotFoundException e) {
            Logger.blackBerryErrorLog("Error creating font", e);
        }
        int size = Ui.convertSize(fontSizeInPixels, Ui.UNITS_px, Ui.UNITS_pt);
        Font font = fontFamily.getFont(Font.PLAIN, size, Ui.UNITS_pt);
        return font;
    }

Any help on this will be appreciated.

Thank you much in advance.

"Should have sizes from photoshop".

Unfortunately, it's a potential problem.  I've been in this situation before, and the size of the pixel depends on the size of the image that the designer uses to work up the screenshots.

I had a designer who has very well used 72 dpi in the development of its screenshots and therefore the size of the pixel corresponding points, a point is 1/72nd of an inch.  This could be the case here.  What device has been the designer develops for and what size have been specified for the various policies?

Tags: BlackBerry Developers

Similar Questions

  • How to adjust the GUI on different screen resolution?

    Hi all

    I have an application that must be deployed on different stations with different screen resolutions. I want my application to be responsive, that it should be settled well in accordance with the resolution just like sensitive site. Is it possible to do?

    You have at least two simple ways to accomplish what you want: setting the resolution and dispatchers.

    The first automatically adjusts Panel when it is displayed on a screen with a different resolution than it was desigend on

    Dispatchersneed a little more effort: basically, they can be used to change the appearance of the window when they are moved interactively by the operator or by programming with OperateSplitter. You can decide what controls are suitable when a divider ir operated and if they are moved or resized.

    In the case of your example of the user interface, a horizontal separator could be used to resize the text box and move down buttons when the Panel is maximized.

    The choice between these alternatives is on hand: I personally do not feel good with the brutal scale operated when you use the resolution setting so I normall use dispatchers to adapt application windows to the size of the screen.

    You can see examples of the couplings in docking.prj and examples of splitter.prj located in the samples\userit folder. For an example of the first methos, the value attribute setting resolution 100, change the resolution of the screen and see what happens when you launch the program.

  • Different screen resolutions - what is the best method?

    Hello

    I know that this question was asked a thousand times before, but what is the best way and the most reliable to deal with different screen resolutions?

    I read a lot of posts about it and tested on everything: unique, methods, combinations, let labview scale my objects, their scale by myself, etc. Another alternative that I found was to design the front panel to the lower screen resolution, let labview scale objects (graphics, controls tab and decorations) as window increases or decreases and lock "groups of indicators, controls and text" to prevent them from scaling and overlap. However, if I lock these "groups" that they don't move in the right place in the resizing of the window. Then, I put these 'groups' within groups and tried to compensate for the position via the property node, but it was not possible because the 'groups' within the cluster have been locked!

    After all these tests, I realized that the best way to manage different screen resolutions must have a main VI that detects the current screen resolution and load the good VI for this resolution. The problem is that I have a VI for each screen resolution (created one by one) and if I want to move the code I have to do the same task for all the screws

    Since I already have all the screws (for different screen resolutions), I could get the sizes and positions of all the objects through property nodes and create a kind of 'cluster' which, after the detection of the current screen resolution, would be to adjust all the objects. But I have several decorations in the front panel and I can not get information via the node property of them.

    THW way you can prevent the control to move when you're scaling, is to group the controls with 'something' which is placed outside the façade. In the example I give you now, you can see that I have grouped the stop button and the 'red faces' with a 'point' on the left side of the front panel.

  • How to solve this error "the game met a fatal DirectX issue while trying to start. Try a different screen resolution or bit depth. If this does not work, try new video drivers. »

    Hi all

    I get the following error every time I try and start Asherons call on a new Dell Latitude E5510 laptop.

    The game has encountered a fatal DirectX problem trying to start.
    Try a different screen resolution or bit depth. If this does not work, try new video drivers.

    This error occurs just after clicking the world to enter.

    • I have a fresh install of Win7 64 bit (entirely the window update)
    • The latest Intel HD - v8.15.10.2622 01/10/2012 graphic card driver.
    • A sweet DX 9 and DXDiag and 11 installation reports no errors.

    I lowered res video and depth of color, but without result.

    Digitized internet and found others with the issue but no resolution, I could see.

    Anyone have any ideas/suggestions?

    I love a solution restored for the following driver and the problem resolved.

    V8.15.10.2599 21/10/2011

  • I can't drag the arrow to change my screen resolution. He moves only from high to low-nothing in between.

    I can't drag the arrow to change the resolution on my new laptop. He moves only from the highest to lowest - nothing in between.

    Hi Eileen,.

    Thanks for posting the question in the Microsoft Community!

    You can use only the highest and most low screen resolutions available and nothing in between.

    What is brand and model monitor?

    The resolution, you can use is based on the resolution that your monitor supports. CRT monitors generally display a resolution of 800 × 600 or 1024 × 768 pixels and can work well with different resolutions. LCD monitors, also called flat screens and screens of portable computers often support higher resolutions and better suited to a specific resolution.

    The website can provide more information:

    Change your screen resolution

    http://Windows.Microsoft.com/en-in/Windows7/change-your-screen-resolution

    If you need additional help, let us know and we would be happy to help you.

     

  • cannot get the upper 16-bit 640 screen resolution

    have windows visa ultimate-cant get greater than 16 bits 640 need seting screen resolution 1024 by 768 tried AFAIK - help

    You must install drivers provided by the manufacturer of your PC, if a big brand name for example Dell / HP or laptop, if a generic PC from the creators of individual materials, for example, card mother, graphics card, etc.

    What is the make/model of your PC?

  • Set the size of the police according to PPI or similar (BB10 vs PlayBook device)

    Hey everybody,

    I wanted a PlayBook App to BB10, the port ran my code in the Simulator and all seemed well (+ it even worked except a few places where I've hardcoded, adjusting the position of the images). I was happy, as it was perfectly in the Simulator, until I realized that the BB10 devices will be only about a third of the size of the PlayBook, respectively one-third that of what we see in the Simulator.

    So if I create a label with size 16, it may seem well on the PlayBook and the Simulator, but on the real device, it will be like 16/3, which allows small. How do you communicate or géreriez you it? I don't want to rely on stageWidth, stageHeight reading saying: "oh, that is 1024 x 600, must be a PlayBook, so I use the normal font" (because we do not know which devices will come in the future)

    Or y at - it a way to get the PPI or something similar by programming? Anything that could be used

    You can get the RFP to:

    Capabilities.screenDPI;

    Of

    import flash.system.Capabilities;

    I use the PlayBook screen as the basis of BB10 phones for reports.  So I have a centralized function to return:

    public function get tabletRatio() : Number
    {
        return this.dpi / 170.0; // 170 being that of the playbook
    }
    

    Which is about 2 x for BB10 devices.  Seems to work quite well for fonts and nothing else.

    When BB10 is available for the phone and the PlayBook, I mighrate on CSS style sheets to help with all this.

  • Make the disabled according to the layer type setting.

    Is it possible to make a person in charge of the disabled setting on the type of layer, to which it is applied?  For example, if I apply the plug-in to a TextLayer can I disable some params, but allow them if I apply the same plug-in to a layer of the Image?

    In the software development kit, I have read, this PF_PUI_DISABLED "disables (grays on) the setting, usually in response to PF_Cmd_USER_CHANGED_PARAM ' but how I would disable the parameter immediately by checking the type of layer.  I was thinking of using javacript to detect the type of layer, but it is perhaps too general.  Is it possible to:

    1 programatically triggering the PF_Cmd_USER_CHANGED_PARAM

    2 detect the layer type with the software development kit instead of using the call a javascript since the plugin code?

    Thank you for your time and help!

    Best,
    Arie

    first of all, I want to dedicate this song to all of you who came back:

    http://www.YouTube.com/watch?v=ZBR2G-iI3-I

    or, better yet, my favorite blanket:

    http://www.YouTube.com/watch?v=10C68Gzd5GM

    in any case:

    AEGP_LayerH layerH;

    ERR (suites. PFInterfaceSuite1()-> AEGP_GetEffectLayer (in_data-> effect_ref & layerH)); get the reference to the layer

    AEGP_ObjectType layerType = NULL;

    ERR (suites. LayerSuite5()-> AEGP_GetLayerObjectType (layerH & layerType));

    That's all.

    the layer type is one of:

    Enum {}

    AEGP_ObjectType_NONE = - 1,

    AEGP_ObjectType_AV, / * includes all types of layer of pre - AE 5.0 (audio or video, including adjustment layers) * /.

    AEGP_ObjectType_LIGHT,

    AEGP_ObjectType_CAMERA,

    AEGP_ObjectType_TEXT,

    AEGP_ObjectType_VECTOR,

    AEGP_ObjectType_NUM_TYPES

    };

    typedef A_long AEGP_ObjectType;

    TADA!

    :-)

  • How can I make the folders always open full screen in Vista. I have tried everything it suggested. NOTHING WORKS!

    I tried everything I found on internet to make files open full screen and stay like that. Is there a permanent solution for this? I've been at Microsoft, vistax64.com, etc. including Alt space X - problem solved or BAD! Help, please. Thank you.

    Three options.

    1: take the corners of the window and drag it to the format full screen. Do not use to expand. Close all other windows first via the taskbar and the latter. Windows will remember the size of the last closed window the next time that you open the program.

    2: any shortcut you use to launch the window, right-click, and select Properties. Under the 'Run' drop-down list, choose "expanded".

    3: IE New Window Maximizer (for IE only)
    http://www.MajorGeeks.com/IE_New_Window_Maximizer_d1746.html

  • How to make the second row in different color

    Hi gurus

    How can I make every second row in a different color.

    Thank you
    RGB

    Hello
    You can use the Type property of the bands of table.

    Thank you
    -Anil

  • How to make the difference between data (different sensors and actuators) is tans/recvd using series com

    Hello

    I get 2 different types of data from the controller. How to differentiate b/w them.

    After receiving my code in deccissions. There are 6 different control elements in my project attached to the controller. Thanks for give me idea how I send data to the controller for this controller to differentiate that exit to be active or low

    First, look at the couple of serial examples that come with LabVIEW. You use the VISA functions to read and write. Your technique to separate the values will work as well in LabVIEW. You would be to convert the string returned by VISA reading to a digital (i.e. with the Scan of the chain). Then do the comparison, then the result of wire to one of the two indicators. Put the terminal of each indicator inside a case statement would be a way to do it.

  • Box of manages not lining up with the object due to different monitor resolution, suggestions?

    object-boxHandles.PNG

    CC2014, when I was working on my 1920 x 1080 screen, I had to rocking out high-PPI display scale so that it works correctly. Now, in CC2015, which switch does nothing. The handles of the box are a mile from the object and will not line up, no matter what I try. It does not work correctly when the Illustrator is open on my 4 k monitor. However, the 4 k is my laptop screen, which is only 13 ", the 1920 is a 27"... so you can see why I prefer the larger screen, when I'm at home, haha.

    My guess is that the scaling high ppi currently does not work in CC2015.

    A similar experience? Suggestions?
    Any help is greatly appreciated. Thank you.

    CW,

    You can try to disable the GPU performance by clicking on the icon of the rocket in the bar of the App, or on the top of the menu bar, deselect the box Performance GPU; You may also uncheck performance GPU in your preferences.

    There are a few problems with the GPU and Adobe are working on them. they should be resolved with the 19.0.1 patch, that is I hope that this week.

    You can also move or adapt the work affected (a little) and then Ctrl / Cmd + Z to undo, to get it in place.

    This is a roundabout way of use before another problem is resolved. Returning to the CC 2014 will be also get rid of it, if that's the case.

  • VISION and research - how to make the font darker and easier to read "Help".

    Recently had a good success to make the police clearer and darker in the Finder through this article

    http://www.macworld.com/article/2026699/stop-squinting-make-text-bigger-in-os-x. HTML with result

    as a result of these directions for Finder also increases the clarity of printing at the Mall and elsewhere.

    BUT what of the online manual that appears when using the search for "Help"?

    IS it there A WAY OF MAKING THIS DARKER/more CLAIR rather that the shades of gray that I am experiencing.

    Using a MacBook Air (mid-2013) Yosemite 10.10.5 - who says that my reading is not as good

    resolution than the models that followed.


    Reading others also eager to make the darker lighter text also, the eyes are bad after

    to see the lighter police force and it makes it less interesting to learn what this online

    Manual has to offer.  Please help if you can give me any advice on improving this situation.

    Try to open help and then use the command - + to enlarge the page.

  • Resizing fonts false pages in all my programs, makes the words overlap in web pages

    I have a HP Media Center under Windows XP and the fonts are small for me. This pc came from my daughter, who crashed it and had a friend fix. Then she gave it to me. When I started the first time fonts, windows, everything was very low. I've got things a little bigger now, but their resizing fake pages in all my programs, makes the words overlap in web pages. Can anyone help?

    Hello
    What version of Internet Explorer? (Can matter)

    Go to control panel > display > Display Properties > settings, try a different screen resolution. "Less" for example 800 x 600 will be bigger on screen "More" for example 1024 x 768.

    In Internet Explorer, view > text size, avoid the 'bigger' try more large, medium or small.

    Hope this helps,
    Don

  • How to make the difference between the mouse down events in the control of the chain (click on contour vs click Center)?

    Hello

    I have a control over the chain on my UI and I would like to make the difference between mouse different events, that is to say, to be able to differentiate a click on the outline or the label of the controller vs right-clicking on the Center (between the control in "edit" mode)

    The reason is that sometimes if the user does click not in the Center but in the scope of control, Labview fires the mouse event down but the typed keys are not registered...

    Is it possible to distinguish the two?

    Thanks a lot for your help

    Set the string "update as you type" and use instead a "changed value" event Now, the event fires whenever a new character is entered.

Maybe you are looking for