Title bar to fit the size of the screen

Hello

I have a picture to be added to the title bar. I want that it adapts to the size of the screen. Please give me suggestions to make. I tried extending the class of the field. But I can't sense to work it.

//code to create scaled image
EncodedImage encodedImage = EncodedImage.getEncodedImageResource("XXX.png");
BitmapField bitMapField = new BitmapField(
scaleToFactor(encodedImage,
encodedImage.getWidth(),
encodedImage.getHeight(),
Display.getWidth(), Display.getHeight()).getBitmap());
add(bitMapField);

//method to scale the image
public static EncodedImage scaleToFactor(EncodedImage encoded, int curWidth, int curHeight, int newWidth,
         int newHeight)
{
      int numerator_width = Fixed32.toFP(curWidth);
      int denominator_width = Fixed32.toFP(newWidth);
      int scale_width = Fixed32.div(numerator_width, denominator_width);

      int numerator_height = Fixed32.toFP(curHeight);
      int denominator_height = Fixed32.toFP(newHeight);
      int scale_height = Fixed32.div(numerator_height, denominator_height);

      return encoded.scaleImage32(scale_width, scale_height);
}

Copy the following code will help you get the bitmap image as required by you.

Tags: BlackBerry Developers

Similar Questions

  • How can I get my example Yahoo web pages to fit the screen of my computer?

    How can I get my example Yahoo web pages to fit the screen of my computer?  When I open yahoo page is longer then the screen of my computer. This is happening on all pages, when I opened.

    Advisor.

    Andy

    original title: computer screen

    Hello!

    Try this:
    1. shoot to the top of your Internet explore
    2. go to the toolbar at the top of the page go to hell VIEW > ZOOM > and adjust the size of the page that will fit your window.
    Hope this helps,
    Thank you
    Makoi
  • How to adjust the display to fit the screen when the computer is connected to the TV

    I HAVE PLUGED MY COMPUTER TO MY PLASMA TV, BUT HOW TO MAKE THE IMAGE TO FIT THE SCREEN ON THE RIGHT?

    I have a windows xp and a VIZIO television

    but the size of the screen is not the size of the tv, it's just the size it was on my screen... I know that there must be a way to adapt

    Hi PatriciaDelgado,

    Usually, this would happen if the resolution of the screen on the computer is not set correctly.

    I suggest that you change the resolution of the screen on the computer and check if it helps.

    Change the resolution of your monitor

    http://www.Microsoft.com/windowsxp/using/Setup/personalize/resolution.mspx

    How to configure and use multiple monitors in Windows XP

    http://support.Microsoft.com/kb/307873

    Expand your workspace with multiple monitors

    http://www.Microsoft.com/windowsxp/using/Setup/hwandprograms/monitors.mspx

  • Fitting the screen pages

    How can I get the page to fit the screen.  After the Welcome screen appears and the system is connected is dead center on the screen as a small area and it's on a Hewlett Packard laptop that it the screen with icons on it.  If will not get everything bigger.  Also, on my other desktop, which is a sony vaio.  When I access internet, my page is automotically medium of fat and I have to minimize the box and then make adjustments.  I've never had to do this before.  I don't know what I did to cause this. The page is so great that I can't see the scroll bars on the screen width.

    Please help and thanks anyone done!

    Nice day!

    Don't know if this will solve your problem, but:

    Right-click on the desktop > properties > settings > whatever-you-think-it-should-be of screen resolution

    Usually, it is the highest

  • I downloaded a game on the internet, and now my screen does not match my screen. I have two large black areas on each side of my screen. How to resize my screen to fit the screen of my computer? (and yes I tried the button expand) :))

    I have two large black areas on each side of my screen. How to resize my screen to fit the screen of my computer? (and yes I tried the button expand) :))

    Hello val2000, welcome.

    These games is managed inside of Internet Explorer? If this isn't the case, then I suggest contacting the manufacturer of your computer for the latest pgrahics drivers. If installation of those who does not resolve the problem, then try to change your resolution to one of the following values (depending on the size of your screen):

    1024 x 768
    1280 x 800 (wide, common form for laptops)
    1280 x 1024
    1680 x 1050 (widescreen)

    To change your resolution:

    1. click on START
    2. click on "Control Panel."
    3. double click on "display".
    4. click on the tab "settings".
    5. change the resolution on your cursor tab and then click on 'Apply' at the bottom right

    Let us know what happens

    Thank you! Ryan Thieman
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • My hotmail page no longer fits the screen - it's too big. It wasn't always like that. How can I reformat to fit the screen?

    All of a sudden, the fonts and formatting on the hotmail page (in records such as Inbox, sent, deleted, etc.) is so great that it does not fit the screen.  I have to move the page from left to right and back again to see the entire page.  Font size says 10, but it's huge.   How can I fix?

    Try clicking on view, then text size, then select a smaller size.

    I hope this helps.

  • Web pages can be made to fit the screen

    Web pages can be made to fit the screen

    You can zoom in and out:

  • Black bars moving on the screen, flickering screen

    Hello everyone, I have buyed this summer than a laptop and I noticed several times some Black bars moving on the screen, I tried a few methods how to remove the battery, restarting the computer, etc... After the reboot, everything seems to be ok, what guys do you recommend me to do? I live in another country (Romania) and the laptop was buyed Austria - MediaMarkt, I can't get the laptop to the place where I buyed of... The laptop is a HP Pavilion 1352Eg G6, I expect answers, thanks in addvance, best regards.

    I would like to start by assuring the BIOS and video card drivers are updated here.

    Since it is temporarily resolved by restarting, it might be a software problem and driver updates help in general.
    Have you noticed if it seems to happen after using a certain program?

    You can try to connect the laptop to an external monitor. If the same behavior is on the external monitor, then it's a video card problem. If it only happens to the screen of the laptop, then it might be software or a hardware in the Control Panel, motherboard problem or somewhere in between.

  • WINDOWS SCREEN COMES UP WITH THE BARS MOVING ON THE SCREEN BUT WILL GO NO FURTHER LOADING.

    THE WINDOWS SCREEN COMES WITH THE BARS MOVING ON THE SCREEN BUT WILL NOT GO FURTHER.

    Hello

    its possible your video drivers of meetings required.

    Info

    http://www.ehow.com/how_4921037_update-display-drivers-Windows-XP.html

  • Acute and serious bars Flash on the screen intermittently without touching the controls on hp Pavilion dv8 1290

    Everyone experienced this nagging problem of having the bass and treble bars Flash on the screen of the PC, w/o tounching users the sliders control on top of the keyboard on a hp Pavilion entertainment pc dv8 1290?

    Tried the update some drivers not avial!

    Hello

    Have you applied the firmware update for the capacitive strip at the following link?

    http://h10025.www1.HP.com/ewfrf/wc/softwareDownloadIndex?softwareitem=ob-96360-1&cc=us&DLC=en&LC=en&OS=4063&product=4207724&sw_lang=

    Kind regards

    DP - K

  • Tabs are not in the title bar even when the window is maximized Windows

    If I'm right, given that shponkah 4 b 9 FFX must be in the title bar when the ffx window is maximized on Windows operating system. [https://bugzilla.mozilla.org/show_bug.cgi?id=572160]
    I'm on XP Pro
    It works fine on the minefield for me.
    But in FFX 4 b 9 and 4b 10... tabs are always under the Firefox logo...

    Did you set up using the (bar of tabs above) option "Tabs at the top". Right-click on a toolbar to display the list of toolbars and make sure "Tabs at the top" is selected.

  • Title bar went on the top of the screen. How do I get it back?

    The title bar of Media Center under Vista SP2 HP disappeared on the top of the screen. How can I restore, or drag the window using a keyboard shortcut?

    I have reproduced what you call - up WMC was the top of the screen when I opened it.  I closed WMC, changed the REG_DWORD value namedtop in the HKCU\Software\Microsoft\Windows\CurrentVersion\Media Center\Settings\MCE key. PerUserSettings from a negative value (0xffffff60, for example) to 0.  When I launched again WMC, the top was visible.  So, try to change the value to 0 or a positive value after the closure of WMC.  Also make sure the height in the same key value is logical in the context of the resolution of the screen that you use.

  • Title bar hidden behind the Apple Mac menu bar

    Hello

    I use 12.1 organizing elements and, for some reason, the title bar is hidden behind my Apple Mac menu bar.  Does anyone know how to click behind the menu bar, so I can access the elements title bar?

    Screen Shot 2014-05-25 at 18.28.28.png

    Thank you

    Richard

    The first thing to try is to go to system preferences > displays and your screen resolution you're going down. You may need to try a few different settings, but ultimately he can put it back and then you can return to the correct setting for your screen.

  • problem with the title bar - I lost the icon line

    For some reason any in my address bar I lost the line under that with file, view, editing, tools, etc. the next line was sending, the new message, transfer, delete... gone. How can I get him back? All icons are gone I am sure it happened inadvertently... sometimes I am online while watching TV and suddenly my background icon bar ends on the side, I was shown how "drag" it replace... but I have never accidentally lost the icons on my windows mail toolbar. Please help me. Thank you!

    Go to view | Layout and activate the toolbar.  That's what it's called: the toolbar.

    Steve

  • Absent from the bar spots and the screen is not good

    Original title: move screen up

    How can I move the windows screen?   Can't see my bottom toolbar?  There is about 1/2 space black above the windows open or even the windows page.   I have also two windows superimposed in facebook.   I can't click on the rear window to get rid of it.   When you play games farmville, pioneer trail, etc.  I have to click on things about 1/4 inch to the right of the object.   At the top of the screen is about 1/2 inch on top and to the left.   How do I get this all to move to adapt to the screen?

    Any help would be appreciated.

    I got the problem fixed with the double screen to upgrade my Intel HD Graphics Family.

    I use windows 7 on a HP Pavilian laptop g6.
    The only problem I have now is that I connect the laptop to my gateway FPD2275W TFT LCD Moitor as its bigger and easier to see.   Now on this gateway monitor I have space black above the scree so unless I do my toolbar on the largest background I can hardly see it.  I used for the button on the side of the monitor auto fit my picture and it runs for about 2 seconds and then it lowers the screen again.  I have the resolution set on this 1680 X 1050 monitor, which is the recommended setting.   If I liked I receive frequency out of range.
    All this began after I clicked on the key in google and went on google chrome and it updated something.
    Those that this isn't a big problem is possible to raise the screen on the monitor so that it is using the entire screen and not to leave about 1/4 to 1/2 black space at the top?
    Thank you for your help.

Maybe you are looking for

  • Winner 8,1/firefox there are tabs above and below windows. In Win 10/firefox, there is now windows below for switching windows - how can you do that now?

    n Win 8.1/firefox it were the tabs above and below windows.Win 10/firefox, there is now NO windows below for switching windows.How to you switch windows (tab groups) now?Windows Firefox 39.03 10 On the first program that I started after the launch 10

  • Print mit Netzwerk und HP3070A

    Hallo, Depending on der Drucker HP Deskjet 3070 A im Heimnetzwerk before schon gearbeitet wird er vom System, had been mit Netgear router und einem Notebook unter Windows 7 nicht mehr erkannt. Eine lightning the Druckers hat nichts really Installatio

  • Which version of the runtime DAQmx is compatible with DAQmx 8.8?

    I'm going to build an installer using Visual C++ and I wanted to include the DAQmx run-time, rather than the complete installation.  I built the application using DAQmx 8.8 but, I do not see a time of execution of this version.  I see that time for 8

  • problem with firmware update

    Hello! I got my new clip (8 GB) today and I'm totally happy about it. Everything seems to work fine, the only problem is to update a new firmware. I already searched the forums, but has not seen a similar problem. However, I apologize if this is a si

  • Venue Pro - screen DIMM 8

    I had the V8P for about 3 days. So far I like it. I don't like that the screen fades in and out with its brightness. This has happened with ie and fb. I have not tried the other 'apps' yet to see if the problem is more system related as opposed to so