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

Java Development

Reply
Developer
Posts: 246
Registered: ‎12-13-2010
My Device: Not Specified

How do you change gradient focus color of TileView for PaneManager?

[ Edited ]

How do you change gradient focus color of TileView for PaneManager?

 

header1.setBackground(BackgroundFactory.createSolidBackground(0xecf1f6));

 Changes the normal style but not the focus color.

Developer
Posts: 2,268
Registered: ‎07-08-2009
My Device: various
My Carrier: various

Re: How do you change gradient focus color of TileView for PaneManager?

Are you aware of the second form of setBackground - with two parameters?

 

The first parameter there is an integer flag - one of Field.VISUAL_STATE_NORMAL, VISUAL_STATE_ACTIVE, VISUAL_STATE_FOCUS, VISUAL_STATE_DISABLED or VISUAL_STATE_DISABLED_FOCUS.

 

With it you can selectively set backgrounds for different FIeld's states. For example, you can use ..._FOCUS for focused and ..._ACTIVE for "pressed" state.

----------------------------------------------------------
please click 'Accept Solution' on posts that provide the solution to the question you've posted. Don't say "Thanks", press 'Like' button instead!
Developer
Posts: 246
Registered: ‎12-13-2010
My Device: Not Specified

Re: How do you change gradient focus color of TileView for PaneManager?

[ Edited ]

Yes, using  Field.VISUAL_STATE_NORMAL seems to have the same effect without any parameter. All the other parameters have no effect on TitleView.  Have you ever overriden the focus gradient on the pane?