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


Used & Tested IEI Rocky-4784EV V1.2 Industrial Motherboard picture

Used & Tested IEI Rocky-4784EV V1.2 Industrial Motherboard

$302.20



DSC PC1832 PowerSeries 8-32 Zone Alarm System Motherboard PC1832PCB Board Only picture

DSC PC1832 PowerSeries 8-32 Zone Alarm System Motherboard PC1832PCB Board Only

$199.99



Used & Tested IEI IMBA-G410-R10 Motherboard picture

Used & Tested IEI IMBA-G410-R10 Motherboard

$428.00



Used & Tested IPC PCI-6870F Motherboard picture

Used & Tested IPC PCI-6870F Motherboard

$255.11



Used & Tested IEI SSC-5X86HVGA REV.1.8 Industrial Motherboard       picture

Used & Tested IEI SSC-5X86HVGA REV.1.8 Industrial Motherboard

$299.18



Used & Tested 5366271-2 Motherboard picture

Used & Tested 5366271-2 Motherboard

$819.84







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