Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

List semi-transparent bug?

I have a QNX list with a custom renderer.  When the list is displayed in the simulator, it is semi-transparent like an alpha value of 0.2ish was being applied.  If I move the items (scroll), the items in the list become "normal" again.  Has anyone seen this?

 

When first displayed:

list_faded.jpg

 

After dragging an item in the list:

 

list_slided.jpg

Developer
Posts: 297
Registered: ‎10-30-2010
My Device: PlayBook
My Carrier: other

Re: List semi-transparent bug?

[ Edited ]

I have seen this bug before. I use a custom cell renderer and drew my own seperator line. Some times the seperator line appear correct with right alpha. Sometimes it appears too thick.

It's like the rendering is not pixel perfect.

 

(can't see your images)

Developer
Posts: 323
Registered: ‎05-07-2009
My Device: BlackBerry Z10, PlayBook, 9900
My Carrier: Telus

Re: List semi-transparent bug?

Your images display now ;-)  (I like your custom list, very clean)

 

I can't speak specifically for the List issue you are seeing but I've had transparency issues with the PickerList since day 1.

 

In 0.9.1 it would be like yours, transparent until touched... but worse, every time a selection was made (I asked for single selection, but it allowed multiple) it would add more transparency to the point that you saw nothing

 

In 0.9.2 it "fixed" single selection so It only dimmed a bit

 

In 0.9.3 (kinda*) it tends not to dim....(does occasionally), but now it won't show what item is selected (e.g. a blue highlight)... the item is selected, and I can use it, but there is no visual clue that it is working.

 

(*kinda - apparently I have the 0.9.3 simulator with the 0.9.2 SDK - I'm updating now to see if this fixes it)

 

Finally - since I see you have a list appearing on top of a map of some sort...  I'm curious (as I was hoping to do something similar for a part of my app)... are you in a WebWorks project adding stuff on top of a regular HTML page in the browser?, a QNX WebView? or something else?

 

Essentially I was hoping my user could "pick" a location on a map but I wasn't sure how I could pull this off?  e.g. displaying the map is easy, I'm just not sure how I could pass that selection back to my AIR application.


PlayBook Apps: DataMine, Dots + Boxes, 5 Marbles
BlackBerry SmartPhone Apps: 5 Marbles Soon: **** (D.Z.A), ****Quest, **** Challenge, VaultCracker, DevBrowser, Radial****
Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: List semi-transparent bug?

Well, it sounds like it might be an issue with others.  Thanks for the feedback.

 

I am using Google maps in the application and not any web view.

Developer
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: List semi-transparent bug?

thats strange ive never seen this happen before. one thing that it might be, in the beginning the "z-order" of children in your custom cell renderer might be a little off. if you and set the child index of the items in your cell renderer to the top most that may clear it up. other than that nothing comes to mind. i'll see if i can reproduce this. if not maybe a sample of an instance i can use. good luck!

J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
Highlighted
Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: List semi-transparent bug?

All I am doing is calling addChild in onAdded (and removeChild in onRemoved).  It happens in all my custom renderers.

Developer
Posts: 409
Registered: ‎12-10-2010
My Device: PlayBook
My Carrier: N/A

Re: List semi-transparent bug?

it seems that this might be cause by the UIComponent redrawing itself, which happens during scrolling.

 

rather than explicitly setting the alpha value of the cell, maybe you could add an element in the dataProvider to control the alpha of the cell, that value should maintain during a redraw.  another possible solution could be to create a controllable opacity mask in your custom renderer - assuming your implementing ICellRenderer on a Sprite.


PlayBook Applications:
Drop Swatch
Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: List semi-transparent bug?

That's the whole issue.  I am not setting the alpha attribute.

Developer
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: List semi-transparent bug?

hey john,

 

instead of just adding at the onAdded method, try adding on the drawLabel() method instead. then on the onAdded method do a if (!this.contains(this.childObject)) this.addChild(this.childObject) for good measure. the order of method calls is so off sometimes.

J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
Developer
Posts: 409
Registered: ‎12-10-2010
My Device: PlayBook
My Carrier: N/A

Re: List semi-transparent bug?

[ Edited ]

 


jtegen wrote:

That's the whole issue.  I am not setting the alpha attribute.


oh, i see.  i should have read more clearly.  i thought you had explicitly set some of your cells to display at a low alpha (perhaps to show them as disabled) and that they were not holding that value while scrolling.

 

does calling drawNow() on the list when it is displaying the low alpha solve the problem?  


PlayBook Applications:
Drop Swatch