BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 09-22-2010, 11:12 AM   #1
SergioTapia
New Member
 
SergioTapia's Avatar
 
Join Date: Aug 2010
Model: 7100T
PIN: N/A
Carrier: asdfasdf
Posts: 12
Default How can I handle a user screen tap on a BitmapField?

Please Login to Remove!

I want to show another screen when a user taps the screen on a picture I put up.

Here is my simple class:

Code:
public class SelectYesNoArea extends Manager {

    BitmapField yes;
    BitmapField no;
    DateField date;
    Calendar cal;

    public SelectYesNoArea(long style){
        super(style);           

        Bitmap bgPic = Bitmap.getBitmapResource("divBackgrounds.png");
        Background bg = BackgroundFactory.createBitmapBackground(bgPic);
        setBackground(bg);

        cal = Calendar.getInstance();               
        date = new DateField("",cal.getTime().getTime(), DateFormat.DATE_SHORT);
        add(date);

        Bitmap bitYes = Bitmap.getBitmapResource("yes.png");
        yes = new BitmapField(bitYes);
        add(yes);

        Bitmap bitNo = Bitmap.getBitmapResource("no.png");
        no = new BitmapField(bitNo);
        add(no);
    }   
}
How can I achieve this? I want them to be taken to another screen when he taps the picture. I need help specifically with the click handling part, the screen navigation is secondary at this point. Thanks for the help!
Offline  
Old 09-22-2010, 01:02 PM   #2
Smiley8
Talking BlackBerry Encyclopedia
 
Smiley8's Avatar
 
Join Date: May 2008
Location: Calgary, AB
Model: Torch
Carrier: Fido
Posts: 226
Default

all you do is add a listener to the bitmapfield like this

Code:
            yes.setChangeListener( new FieldChangeListener( ) {
                public void fieldChanged( Field field, int context ) {
    // do something
                }
            } );
__________________
Visit our website www.toysoft.ca for Cool BlackBerry Apps.

Follow us @ http://twitter.com/toysoft
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


For LISTINGREXROTH 4WE6D62/OFEW110N9K4 Solenoid Valve picture

For LISTINGREXROTH 4WE6D62/OFEW110N9K4 Solenoid Valve

$221.31



DORMEYER 2005-M-1 Solenoid,Laminated,1/8 - 1 in,Continuous picture

DORMEYER 2005-M-1 Solenoid,Laminated,1/8 - 1 in,Continuous

$37.87



Solenoid Valve 4WE10D32/CW110N9DA For LISTINGREXROTH picture

Solenoid Valve 4WE10D32/CW110N9DA For LISTINGREXROTH

$199.27



Solenoid Valve Coil For VICKERS 300AA00085A picture

Solenoid Valve Coil For VICKERS 300AA00085A

$140.90



YM-119653-77950 1503ES-12S5SUC5S Fuel Shutoff Solenoid Fits Yanmar 2TNV70 3TNE88 picture

YM-119653-77950 1503ES-12S5SUC5S Fuel Shutoff Solenoid Fits Yanmar 2TNV70 3TNE88

$19.99



Cole Hersee (24059-BP) 12V Insulated SPST Continuous Duty Solenoid picture

Cole Hersee (24059-BP) 12V Insulated SPST Continuous Duty Solenoid

$30.28







Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.