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
baskaraninfo
Posts: 342
Registered: ‎02-04-2009
My Device: BB 8320
Accepted Solution

To get MainScreen Title's background and foreground color

Presently MainScreen Title's background color is Black and foreground color is White.

 

But when we use custom theme then it may have different color for background and foreground.

Hence I need to fetch those color properties from MainScreen's Title.

 

How can I achieve this?

 

Thanks 


Use Search. "Accept Solution" if the problem gets resolved.
Developer
mantaker
Posts: 1,477
Registered: ‎12-30-2008
My Device: Torch 9810

Re: To get MainScreen Title's background and foreground color

I think you want to color your application according to the background and foreground color! Override the paint method of the main screen and use graphics instance to call getColor( ) and getBackgroundColor( ) .. Save it to integer variables and use it wherever you need..

 

Cheers.. 

--
Manimaran Selvan
Co-Founder, Tech Lead,
Equity Markets Research Group
Developer
baskaraninfo
Posts: 342
Registered: ‎02-04-2009
My Device: BB 8320

Re: To get MainScreen Title's background and foreground color

Thanks mantaker for your suggestion.

Your suggestion seems to be an work around. But, Is there any other alternative way of accessing these values?

Use Search. "Accept Solution" if the problem gets resolved.
Developer
mantaker
Posts: 1,477
Registered: ‎12-30-2008
My Device: Torch 9810

Re: To get MainScreen Title's background and foreground color

As far as this thing is concerned, I don't think there is an API to do this .. I surfed into Screen, FullScreen, MainScreen and didn't find any appropriate.. Also in to Managers..

 

And I also personally think that this is needless for RIM to expose it ..

 

Cheers.. 

--
Manimaran Selvan
Co-Founder, Tech Lead,
Equity Markets Research Group
Developer
baskaraninfo
Posts: 342
Registered: ‎02-04-2009
My Device: BB 8320

Re: To get MainScreen Title's background and foreground color

Yes, before posting I too searched in the api's. But, cannot found anything relevant. Hence I doubt whether any API is there or not. So, I posted to confirm it.

 

Sometimes I may try to be perfectionist. 

 

Thanks Mantaker 


Use Search. "Accept Solution" if the problem gets resolved.