BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 08-14-2008, 09:47 AM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: Mar 2008
Model: 8300
PIN: N/A
Carrier: O2
Posts: 17
Post Thanks: 0
Thanked 0 Times in 0 Posts
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 (permalink)
CrackBerry Addict
 
Join Date: Jun 2005
Location: Manchester, UK
Model: BOLD
Carrier: t-mobile
Posts: 714
Post Thanks: 0
Thanked 0 Times in 0 Posts
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 (permalink)
Knows Where the Search Button Is
 
Join Date: Mar 2008
Model: 8300
PIN: N/A
Carrier: O2
Posts: 17
Post Thanks: 0
Thanked 0 Times in 0 Posts
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


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





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