简体   繁体   中英

Blackberry PictureScrollField image issue when focus is removed

I'm using a PictureScrollField in a VerticalFieldManager with other fields that need focus. When the PictureScrollField receives focus, the images are shown in their original form. But when I remove focus, by default, the field draws a white square over the images. I looked around in the API and couldn't find a way to undo this default property. How to remove these squares?

This is the image when the field has focus-

这是场聚焦时的图像

And this is when the field loses focus-

在此处输入图片说明

You can see how the images have white overlays which look bad for non rectangular transparent images.

The solution is pretty simple - override onUnfocus method as

protected void onUnfocus(){
    /*do nothing to prevent BB default image highlight*/
    /*or do your own thing*/
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM