Click on bitmapfield (image)

Hello

How can I make the event click on the image.

HImanshu SALVATION,

Copy the following code, it's 100% according to your need.

Feel free to press cudo, if this code will help you.

package pk;

import net.rim.device.api.system.Bitmap;
import net.rim.device.api.ui.UiApplication;
import net.rim.device.api.ui.component.BitmapField;
import net.rim.device.api.ui.container.MainScreen;

public class pk extends UiApplication{
public pk() {
    // TODO Auto-generated constructor stub
    pushScreen(new pawan());
}
public static void main(String args[])
{
new pk().enterEventDispatcher();
}
}

class pawan extends MainScreen
{
public pawan() {
    // TODO Auto-generated constructor stub
    add(new clickImg(Bitmap.getBitmapResource("button2.png"),150,60,true));
}
}

class clickImg extends BitmapField
{
boolean check=false;
Bitmap bitmap;
int width=0;
int height=0;
    clickImg(Bitmap bmp, int width, int height, boolean bl)
    {
        super(bmp, FOCUSABLE);
        check=bl;
        bitmap=bmp;
        this.width=width;
        this.height=height;
    }

    protected boolean navigationClick(int status, int time)
    {
        fieldChangeNotify(1);
        if(check==true)
        {
            this.setBitmap(Bitmap.getBitmapResource("button3.png"));
            check=false;
        }
        else
        {
            this.setBitmap(bitmap);
            check=true;
        }
        return true;
    }
    }

Tags: BlackBerry Developers

Similar Questions

  • How to navigate to another screen when I click on BitmapField what listener I have to use?

    Hello

    My requirement is I need to add icons to image in horizontally and when I click on the icon of the image it must navigate to specific screen, so I use BitmapField to display image icons and I added to HorizontalFieldManager but how to navigate to another screen when I click on BitmapField (the image icon) who listens to I have to use?

    Please suggest useful links.  Advanced thanks.

    Concerning

    Sunil.G

    Personally, I prefer to do the treatment that you need directly on the ground rather than using a listener.

    The following code is an example:

    BitmapField bmf = new BitmapField(Bitmap.getPredefinedBitmap(Bitmap.HOURGLASS), Field.FOCUSABLE) {
        protected boolean navigationClick(int status, int time) {
            Screen myScreen = new ();
            UiApplication.getUiApplication().pushScreen(myScreen);
            return true;
        }
    };
    
  • By clicking on the images seems to force trying to open them in the window instead of what they are coded to do.

    At least, I think that this is the case.

    I'm having a problem where if I click on an image which, say, opens on the site Web and widens, it will rather force it to open only in a new tab. He in turn usually always kills the history of the page where you were just in too, so if you click on 'back' (in my case, in general, the same back button does not work, its greyed out so I have to re - search history manually.) it will send you back to the page where you first started.

    And also one more question if it's normal, for a reason for Windows 7 'open with' the function absolutely refuse to read Firefox. If I'm going to go to try to open something with FF, click on the .exe and select, it will not even appear in the box of your choice.
    It however allows me to drag and drop them in the browser, and I was able to do it with a Pale Moon plant.

    I tried without the add-on, and the problem persists. I think it might be a problem of profiles as Pale Moon had no problem until I installed mine. If there is something that anyone might know which will be not involved to redo my complete profile... once again, I'm all ears.

    Sorry, I did further tests when I had the time. It turns out that Download Statusbar (S3) is the issue.

  • When I right click on an image, I can't see the option "search Google for this image. How can I get that back?

    I don't know what that I have maybe changed, but right-click on any image, gave me the option in the Google search menu for the image. This option is gone.

    This is not a built-in feature. Have you used any of these extensions:

    You might first check the addons page to ensure that it is not disabled. Either:

    • CTRL + SHIFT + a
    • "3-bar" menu button (or tools) > Add-ons

    In the left column, click Extensions. On the right side, off the cluster of extensions at the bottom.

    If it is enabled, it could be a problem with some of the code in the extension is not compatible with Firefox 40, or one other extension it bumping from the context menu.

  • Preview crashes during startup by clicking on an image

    If the preview is already open, it works fine. If it is not open and I double click on an image of that overview hangs when it attempts to open. The image is configurΘ for dΘmarrer with preview. Here is a part of the accident report:

    Process: Preview [1741]

    Path: VOLUME/Volumes/_CCC SafetyNet/*/Preview.app/Contents/MacOS/Preview

    ID: com.apple.Preview

    Version: 8.1 (877)

    Generation information: Preview-877000000000000 ~ 8

    Code type: X 86-64 (Native)

    Parent process:? [1]

    Responsible: Preview [1741]

    User ID: 502

    Date/time: 2016-07-28 23:30:42.615-0400

    OS version: Mac OS X 10.11.6 (15 G 31)

    Report Version: 11

    Anonymous UUID: D7B9B2AF-FF35-14CC-5D70-918AFE0C4A2E

    Time since started awake: 28000 seconds

    Integrity of system protection: enabled

    Crashed thread: 0 dispatch queue: com.apple.main - wire

    Exception type: EXC_CRASH (SIGABRT)

    Exception codes: 0 x 0000000000000000, 0 x 0000000000000000

    Note the exception: EXC_CORPSE_NOTIFY

    Request for clarification:

    Reason for termination due to an untrapped exception 'NSInternalInconsistencyException' app,: "unable to load CommonToolbar.proplist.

    ending with an exception uncaught of print type

    Abort() called

    Any suggestions?

    Hi, nealt2!

    Thank you for using communities Support from Apple. After reading your post, I understand that if you try to open an image with preview, the application will close unexpectedly except if it is already open. I use Preview to view the pictures quite frequently, so I know it is convenient to simply double click on an image and open it automatically - I'd be happy to help you with some troubleshooting you can try!

    My first recommendation is to stop the preview application, then re - open all holding the SHIFT key. After you have done this, you can exit the application again and try to open a file with a double click.

    If the app still unexpectedly quits, try restarting your Mac using the menu  Apple in the upper left corner of the screen and selecting Restart in the drop-down menu, if you have not already. Once the Mac boats back, try to open a picture.

    The next thing I would say if you still have problems for the application to open by clicking on an image file would be to restart the Mac in safe mode and try to open a picture there. The article below will give you more information about the safe mode and how to enter if you're not familiar:

    Try safe mode if your Mac does not end commissioning

    Even if the title of the article is not specific to your situation, safe mode is always a good step to take. He runs a system check when you start and also disables some software that may cause a conflict. Take note of the results you will find trying to open an image in safe mode, and then restart the computer and try again.

    If your preview application still quits unexpectedly, after having tested in safe mode, the next step that I recommend is setting up a new user account and trying to open a picture it. The following article will allow you you know why test in a different user account can be useful and help you create a new account if you need assistance.

    How to test a question in another account on your Mac.

    See you soon!

  • Is there a way to by clicking a zoom image to the area you clicked?

    Until recently (unless my memory is completely shot), clicking on an image to see full size would be to center the image around the point on which I clicked. Recently, clicking on a missed to zoom up to the top left corner of the image. It can be a real pain to access the part of the image that I really want to see when I look at a particularly large image. Is it possible to restore the previous behavior?

    This always works for me.
    I just test and horizontal and move automatically vertical scroll bars display the box I clicked when I open a large image (2400 x 2400) from my hard drive.

    Start Firefox in Safe Mode to check if one of the extensions (Firefox/tools > Modules > Extensions) or if hardware acceleration is the cause of the problem.

    • Put yourself in the DEFAULT theme: Firefox/tools > Modules > appearance
    • Do NOT click on the reset button on the startup window Mode safe
  • When I click on an image or map that is Kijiji real estate pages, open Firefox all crunched on the right side of the page. How can I fix this?

    When I click on an image or map that is Kijiji real estate pages, open Firefox all crunched on the right side of the page. How can I fix this?
    For example, I discovered an apartment ad that has various attached photos. It said click on the images to see an enlarged version. FF opens the page however the majority of the page is white and the image seems to be pushed on the right side of the page and watch as if it were bundled up against the right side shows is not the whole picture.
    What can I do to fix this?

    Thanks Cor - el,
    Just set the police minimum votes to zero, did the trick. However, I also appreciate other suggestions that I'm following now. Non-strabisme already installed. A little more difficult to find this file user.js. It any suggestions?
    Thanks again for your great help.
    See you soon,.
    Robert

  • When I right click on an image on Ebay.be, I can't safely on my PC.

    When I right click on an image on Ebay.be, I can't safely on my PC. This does not work when I connect on Ebay.de but not on ebay.be.

    In both cases, the actual image is covered by a container div Firefox will prevent the display of the image context menu.

    You can see if you open the Inspector and locate the container DIV above it (div id = "vv4-0_idiv" class = "ic - m" in the pop-up and div class = 'ic-w300 ic-cntr' in the second screenshot).

    Note that you can always save such an image via Tools > Page Info > Media or in the pop-up window via the right-click context menu "Page info all" and go to the Media tab.

  • How can I customize the drop-down menu that appears when I right-click on an image to save him?

    When I right-click on an image that I order to save on the web on my computer, the menu drop-down is displayed. And there, the topic "save image under" will this stupid "image send by e-mail! When I right click too, sometimess I miss and choose the "send image...". "and then another stupid email"send letter"appears. Hell, I hate! Please help me to remove (or hide permanently) this option "send image...". "in this menu the menu drop down.
    Because if I ever want to send any image by e-mail, I'll do it myself and I don't need FireFox to help me with this!
    Thanks much adavance! (My version of FireFox - 18.0.1)

    You can use this extension to change the menu.

    You can find this code in the file userChrome.css below default @namespace.

    Customization files (interface) userChrome.css and userContent.css (Web sites) are located in the chrome folder in the user profile folder.

    @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */
    
    #context-sendimage,
    #context-sendvideo,
    #context-sendaudio { display:none!important; }
  • Right-click on the image with link problem after upgrade to 11.0

    After the upgrade, whenever I do a right-click on an image with a link, it opens the link rather than opening a menu drop-down. Any idea on what is causing this behavior?

    OK, think about it. Extension: Tab Utilities was the origin of the problem. Uninstall completely solved the problem, disable it does not solve it.

  • I opened MY Facebook id and I get my photos of friends from my mistake I don't know who im key press + photos going to hide how I is new im trying to come back, but I never see still photos im click on the image, but im can not show me

    I opened MY Facebook id and I get my photos of friends from my mistake I don't know who im key press + photos going to hide how I is new im trying to come back, but I never see still photos im click on the image, but im can not show me

    This has happened

    Don't know how many times

    is 2 days befor

    It is possible that you clicked the 'Block Images' item in the context menu by attempting to save an image.
    Check the image exceptions: Tools > Options > content: Load Images: Exceptions - see the web content, pop-ups, fonts and language settings

    A way to see what images are blocked is to click on the favicon (Site ID icon) on the left side of the address bar.
    Click on the "More information" button opens the Security tab of the "Page Info" window (also accessible via "tools > Page Info").
    Go to the tab Media of this "Page Info" window.
    Select the first image and scroll though the list with the arrow pointing downwards.
    If an image in the list is grayed out and there is a check mark in the box "block Images of..." and remove this mark to unlock the images from this area.

    See also the problems that cause to not show images and http://kb.mozillazine.org/Images_or_animations_do_not_load

  • Why when I click on an image to open or preview I can't open it on the Gallery windows photo or photo library?

    Why when I click on an image to open or preview I can't open it on the Gallery windows photo or photo library?

    [Original title: performance and security in Internet Explorer]

    Hello

    ·         You try to open and display a preview of a picture from its source folder?

    ·         What happens when you try to display the image?

    ·         You receive no error or the picture opens on a blank page?

    ·         What is the format of the saved image?

    ·         In the face of the question while the opening of images saved with the same format of a specific set of photos?

    The preview of images in the Windows in Windows Vista Photo Gallery

    http://support.Microsoft.com/kb/2415237
     
    You can also check out the link below.
     
    Windows Photo Gallery: frequently asked questions

    http://Windows.Microsoft.com/en-us/Windows-Vista/Windows-Photo-Gallery-frequently-asked-questions

    I also suggest you to try to open images using the default image viewer in windows and check if you are able to view the images.

    Hope this information helps.

  • I can't set a picture as my wallpaper. I right click on an image, select "Set as wallpaper" and nothing happens.

    I just got a new mini Inspiron.  I can't set a picture as wallpaper... I am right-clicking on an image, select "Set as wallpaper", and nothing happens.  What I am doing wrong?

    Hello Barnum255,

    Thank you for visiting the Microsoft answers community.

    I have found that Dell mini do not have an option for anything other that Windows 7 Starter install manufacturer. This option is not available in Windows 7 Starter.

    Click here for more information about customizing Windows 7.

    Hope this helps Chris.H
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Right click on the image & menu is missing/option options does not work

    God knows how many years ago, I've upgraded to Windows 8.1, didn't like it, refreshed/restored Windows 8 and when I right click on an image missing some options are worn and the preview option does not work (Im guessing it is the top lack of option)

    Hello

    You have all the applications installed on the computer to open the specified file type?

    I recommend you to set the default values for the program and check if the problem persists.

    Check out these links for assistance:

    Choose the apps Windows uses by default

    http://Windows.Microsoft.com/en-in/Windows-8/choose-Programs-Windows-uses-default

    Program access and computer by default

    http://Windows.Microsoft.com/en-in/Windows-8/set-program-access-computer-defaults

    You can also check if the problem persists in clean boot mode.

    Also, try to run a SFC scan-

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

    Refer to:

    How to perform a clean boot in Windows

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

    Note: Refer to the section «How to reset the computer to start normally after a boot minimum troubleshooting»

    to reset the computer to start as usual after a repair.

    I hope this helps. If you have any other queries/issues related to Windows, write us and we will be happy to help you further.

  • How to call the < af:query > Search feature by clicking on an image?

    Hi all

    I created a test named and I dragged on my page .jspx as "ADF with Table query Panel. I put the display as 'Simple' Mode in the Properties Inspector, who will hide all the default components of < af:query >. Now I use < af:commandImageLink >. My question is how can I call the < af:query > Search feature when the user clicks on an image? Any suggestion would be appreciated.

    Thank U...

    If you want to invoke af:query search by program button, follow these steps:

    1 Select af:query--> Advanced--> connections and bind it to the back bean

      
    

    2. in the .jspx add af:link like this:

    
              
    
    

    3 - runQuerySearchAction should be like this:

      public String runQuerySearchAction()
      {
        QueryDescriptor queryDescriptor = getRichQuery().getValue();
        QueryEvent queryEvent = new QueryEvent(getRichQuery(), queryDescriptor);
        queryEvent.setPhaseId(PhaseId.INVOKE_APPLICATION);
        getRichQuery().queueEvent(queryEvent);
        return null;
      }
    

Maybe you are looking for

  • Portege 3500 didn't detect the HARD drive in the BIOS

    Hi forum, I go out the HARD drive, when I stick to the rear; the BIOS didn't detect the HARD drive.How can I configure the HARD drive in the BIOS? The discs i/o isn't editable t option. I need urgent help... Thank you

  • Satellite A300D - 205 how to change from 32-bit to 64-bit

    Hello! I have the Satellite A300D-205, with a Windows 7 32-bit on it. I've upgraded to Windows 7 from Windows Vista 32-bit by an upgrade DVD from Toshiba I need Windows 7 64 bit. I was searching the net on this subject and the only thing I knew, I sh

  • only HP Envy touchsmart sleekbook m7 no sound

    I've only had my HP Envy for less a month and sound and audio for headphones randomly stopped working. It was working fine while I was playing some videos on youtube and then I closed the laptop when I was. I went later to start a research paper when

  • How to use the project from first pro in SG?

    I can't put my project in grade CC speedHow can I do?Please help me.

  • Restore the serial number of Adobe standard CS6.

    Hello!Our product - CS6 Adobe Standard. Gains in 2012.Problem: When you open a session using the message get a trial version (!)Using Adobe ed and password. But the programs require a serial number. The serial number is lost.The goal of treatment - t