BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 08-14-2008, 09:47 AM   #1
ilh3-
Knows Where the Search Button Is
 
Join Date: Mar 2008
Model: 8300
PIN: N/A
Carrier: O2
Posts: 17
Default Background colour showing through field background

Please Login to Remove!

Hi all,

I've created a custom MainScreen which adds a VerticalFieldManager with a custom background colour to the screen.

I've also created a custom VerticalFieldManager that looks like some of the new 4.5 screens with the white cells with rounded corners.

ListFields look fine when added to my custom vfm, which is added to my custom main screen, but then when I scroll through the list the background colour of the row that's just been scrolled off turns to the screen background colour rather than back to white.

Also I have custom BasicEditFields that pass on focus to the next field when the trackball is clicked or the enter key is pressed and on 1 of my screens with these on using the custom mainscreen and vfm all but 2 (bizarre) leave the background colour where the cursor was when you press the trackball or enter.

If I scroll past the edge of the screen or bring up the menu, they then go back to the correct white background.

Anyone have any idea how to stop this?

(Should see the background next to "asda" and the first row in the ListField)
Attached Images
File Type: jpg screen.JPG (19.4 KB, 41 views)
Offline  
Old 08-14-2008, 10:53 AM   #2
jfisher
CrackBerry Addict
 
Join Date: Jun 2005
Location: Manchester, UK
Model: BOLD
Carrier: t-mobile
Posts: 714
Default

something like this may work, force a repaint:

Code:
  
public static class myCustomListField extends ObjectListField {

      protected boolean navigationMovement(int dx, int dy, int status, int time) {
            this.invalidate(this.getSelectedIndex()); 
            return false;
        }
    }
__________________
new job doesn't allow a public profile - please do not contact this user with questions, you will not get a response. good luck!
Offline  
Old 08-15-2008, 09:48 AM   #3
ilh3-
Knows Where the Search Button Is
 
Join Date: Mar 2008
Model: 8300
PIN: N/A
Carrier: O2
Posts: 17
Default

Thanks for that, worked a treat...sorta. Tried a custom ListField and only overriding that like you showed but it didn't work for some reason although strangely enough adding it when creating a ListField worked. E.g for anyone who might want to know in the future:

Code:
ListField lf = new ListField()
{
    protected boolean navigationMovement(int dx, int dy, int status, int time)
    {
        this.invalidate(this.getSelectedIndex()); 
        return false;
    }
};
Cheers, also inspired the solution to BEFs showing the background colour too.

Last edited by ilh3-; 08-15-2008 at 09:49 AM..
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


100 Ton Hydraulic Cylinder Jack Pancake Cylinder Ram Lifting Steel 16mm Stroke  picture

100 Ton Hydraulic Cylinder Jack Pancake Cylinder Ram Lifting Steel 16mm Stroke

$139.18



50-TON HYDRAULIC RAM JACK ?C porta power type cylinder ?C lifting jacks ?C rams picture

50-TON HYDRAULIC RAM JACK ?C porta power type cylinder ?C lifting jacks ?C rams

$119.00



30 tons 60mm Stroke Single Acting Hydraulic Cylinder Jack Ram US SHIP picture

30 tons 60mm Stroke Single Acting Hydraulic Cylinder Jack Ram US SHIP

$77.26



50 Ton Hydraulic Flat Jack Pancake Cylinder Ram 64MM for Machinery Industries picture

50 Ton Hydraulic Flat Jack Pancake Cylinder Ram 64MM for Machinery Industries

$115.89



RAM-400339-AF picture

RAM-400339-AF

$2999.00



50 Ton Hydraulic Flat Jack Pancake Cylinder Ram 64MM for Machinery Industries US picture

50 Ton Hydraulic Flat Jack Pancake Cylinder Ram 64MM for Machinery Industries US

$103.30







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