BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 06-15-2009, 07:44 AM   #1
abhsax1978@hotmail.com
Thumbs Must Hurt
 
abhsax1978@hotmail.com's Avatar
 
Join Date: Jun 2008
Location: NOIDA
Model: 8100
OS: 4.2.1.91
PIN: 2052AEF9
Carrier: Soft. Engg.
Posts: 111
Unhappy I am showing three BitmapFields focusable in the statusBar

Please Login to Remove!

Dear Sir/Ma'am
I am showing three BitmapFields focusable in the statusBar (passing the object of fieldManager which has these BitmapFields). On the response from an HttpConnection Thread, one of these clickable items disappear, though the item is present , if I comment the setPositionChild(field, x, y); on the other two fields, it starts showing, but the two buttons do not show on their intended position.

I am using VerticalFieldManager, is that causing the trouble?

Regards
__________________
having new s for developers!!!
Offline  
Old 06-16-2009, 04:22 AM   #2
Ananthasivan V K
Thumbs Must Hurt
 
Join Date: Jan 2007
Location: Ernakulam, Kerala, India
Model: 8320
Carrier: Airtel
Posts: 65
Default BitmapFields

Hi Abhsax

I think you should look int the layout you have done. There may be some problems over there, or may be @ the paint side. If it's possible for you to paste the code snippet It 'll give more info for others to get what is wrong.
__________________
Regards
Anand.
Offline  
Old 06-24-2009, 07:00 AM   #3
abhsax1978@hotmail.com
Thumbs Must Hurt
 
abhsax1978@hotmail.com's Avatar
 
Join Date: Jun 2008
Location: NOIDA
Model: 8100
OS: 4.2.1.91
PIN: 2052AEF9
Carrier: Soft. Engg.
Posts: 111
Unhappy Hi Sir

PHP Code:
protected void sublayout(int arg0int arg1) {
        
super.sublayout(arg0arg1);
        final 
int width getPreferredWidth();
        final 
int height getPreferredHeight();
        
setExtent(widthheight);

        
int optX width - (bmpField.getWidth() + 10);
        
int optY = (height 2) - (bmpField.getHeight() / 2);
        try {
            
setPositionChild(bmpFieldoptXoptY);
        } catch (
Exception e) {
        }
        try {
            
setPositionChild(left, (Constants.SCREEN_WIDTH 2) - 205);
        } catch (
Exception e) {
        }
        try {
            
setPositionChild(right, (Constants.SCREEN_WIDTH 2) + 205);
        } catch (
Exception e) {
        }

    } 
I hope you can recognize the fields. Moreover I am deletind and adding the elements again on each response. Commenting the left and right button in above makes the bmpField visible. I tried the change in the alignment.
__________________
having new s for developers!!!
Offline  
Old 06-24-2009, 07:03 AM   #4
abhsax1978@hotmail.com
Thumbs Must Hurt
 
abhsax1978@hotmail.com's Avatar
 
Join Date: Jun 2008
Location: NOIDA
Model: 8100
OS: 4.2.1.91
PIN: 2052AEF9
Carrier: Soft. Engg.
Posts: 111
Default There is paint section along with the above

PHP Code:
protected void paintBackground(Graphics g) {
        
g.drawBitmap(00statusBar.getWidth(), statusBar.getHeight(), statusBar00);
        
g.setColor(Color.WHITE);

        
super.paint(g);
    }

    protected 
void paint(Graphics g) {
//        if (doFocus) {

        
g.setFont(Font.getDefault().derive(Font.BOLD12Ui.UNITS_px));
        
int strHght getFont().getHeight();
        
g.drawText(Constants.BASE_BAR_TEXT10, (statusBar.getHeight() / 2) - (strHght 2));
        
super.paint(g);
//        } 
__________________
having new s for developers!!!
Offline  
Old 06-24-2009, 07:52 AM   #5
Ananthasivan V K
Thumbs Must Hurt
 
Join Date: Jan 2007
Location: Ernakulam, Kerala, India
Model: 8320
Carrier: Airtel
Posts: 65
Default Bitmapfields

Hi Abhsax,

I think you miss out something to write inside the sub layout method,
Where did you mention the layoutChild(field, width, height) I think you haven't
mentioned, If so please do and see if it fixes.

Also I have some suggestions.

1) Move the super.sublayout to last statement of the sublayout method body.

2) Move setExtent(width, height) to a place after setPosition(childfield, x, y).

P.S. Update here If you find a solution.
__________________
Regards
Anand.
Offline  
Old 07-14-2009, 05:22 AM   #6
abhsax1978@hotmail.com
Thumbs Must Hurt
 
abhsax1978@hotmail.com's Avatar
 
Join Date: Jun 2008
Location: NOIDA
Model: 8100
OS: 4.2.1.91
PIN: 2052AEF9
Carrier: Soft. Engg.
Posts: 111
Question

I have tried the above options, but I can not see any of the buttons at all.
Though the presence of these buttons is detected.

I have tried using different managers for each of the control.

Please help.
__________________
having new s for developers!!!
Offline  
Old 07-15-2009, 12:15 AM   #7
abhsax1978@hotmail.com
Thumbs Must Hurt
 
abhsax1978@hotmail.com's Avatar
 
Join Date: Jun 2008
Location: NOIDA
Model: 8100
OS: 4.2.1.91
PIN: 2052AEF9
Carrier: Soft. Engg.
Posts: 111
Default

Some good news:

In storm, I used the usual code that I have posted. The result is the same as required. The app is working fine. Just I am using different HorizontalFieldManagers for each of the button.

I have to override TrackWheelClick and TouchEvent for each of these managers.

Regards
__________________
having new s for developers!!!
Offline  
Old 09-08-2009, 06:20 AM   #8
abhsax1978@hotmail.com
Thumbs Must Hurt
 
abhsax1978@hotmail.com's Avatar
 
Join Date: Jun 2008
Location: NOIDA
Model: 8100
OS: 4.2.1.91
PIN: 2052AEF9
Carrier: Soft. Engg.
Posts: 111
Default

Solution:
override the OnTrackWheelRoll of the screen and return false, inside write: setDirty(false); this will refresh the screen every time the track wheel rolls.

Regards
__________________
having new s for developers!!!
Offline  
Closed Thread



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


Welch Allyn Standard (bulb) MAC 2 Laryngoscope Blade #69042 New in OEM Box picture

Welch Allyn Standard (bulb) MAC 2 Laryngoscope Blade #69042 New in OEM Box

$19.77



OEM iPhone 11 PRO X/XR XS MAX 8/7 PLUS Fast Charging USB Cable 10 Feet & 6 Feet  picture

OEM iPhone 11 PRO X/XR XS MAX 8/7 PLUS Fast Charging USB Cable 10 Feet & 6 Feet

$2.99



iPhone 13 12 11 PRO MAX XR XS 8/7/6 Fast Charger USB Data Cable cord 10 feet/3M picture

iPhone 13 12 11 PRO MAX XR XS 8/7/6 Fast Charger USB Data Cable cord 10 feet/3M

$4.99



10 Feet/3M For iPhone 13 12 11 PRO MAX MINI  X XR XS 8 7 Fast Charging USB Cable picture

10 Feet/3M For iPhone 13 12 11 PRO MAX MINI X XR XS 8 7 Fast Charging USB Cable

$5.00



18 x Sunmed Macintosh Standard (Lamp) Laryngoscope Blades, Size 2, OEM ~17016 picture

18 x Sunmed Macintosh Standard (Lamp) Laryngoscope Blades, Size 2, OEM ~17016

$129.99



490-8 Nemco 8-Section Blade Assembly-Apple Genuine OEM NEM490-8 picture

490-8 Nemco 8-Section Blade Assembly-Apple Genuine OEM NEM490-8

$157.95







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