BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 05-15-2007, 01:17 AM   #1 (permalink)
Thumbs Must Hurt
 
Join Date: Mar 2007
Location: India
Model: 8100
Carrier: Airtel
Posts: 64
Post Thanks: 0
Thanked 0 Times in 0 Posts
Question How to change application icon while old icon get focus

Please Login to Remove!

Hi All,

I'm trying to change application icon. I want to change old icon that is set through JDE and replace that with other when the old one got focus.

Did anybody know how to do this?

If yes let me know too.

Also is it possible in 4.0.2. If yes let me know the way too.

Thanks
__________________
Crazy for BlackBerry
Offline  
Old 05-15-2007, 03:06 AM   #2 (permalink)
CrackBerry Addict
 
Join Date: Jun 2005
Location: Manchester, UK
Model: BOLD
Carrier: t-mobile
Posts: 714
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

okay, that's 5 threads you've posted the same question to, 3 here and two over at blackberry.com, please just post once at each.

the application icon pre 4.1 is not able to have a rollover image, this feature was introduced in 4.1 after developers complained that rims own apps had rollover icons but there was no api for us to do it in our own apps. in 4.1 rim introduced the HomeScreen api which allows you to change icons at runtime:

try {
HomeScreen.updateIcon(icon);
HomeScreen.setRolloverIcon(rollover);
} catch (Exception e) {
}

HomeScreen now has a few other features including the ability to change the application title at runtime.
__________________
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 05-15-2007, 05:58 AM   #3 (permalink)
Thumbs Must Hurt
 
Join Date: Mar 2007
Location: India
Model: 8100
Carrier: Airtel
Posts: 64
Post Thanks: 0
Thanked 0 Times in 0 Posts
Smile how to change application icon

Thanks for quick reply.

and Sorry too.
__________________
Crazy for BlackBerry
Offline  
Old 08-23-2007, 05:06 AM   #4 (permalink)
Knows Where the Search Button Is
 
Join Date: Jul 2007
Model: 8800
PIN: N/A
Carrier: CLDC
Posts: 29
Post Thanks: 0
Thanked 0 Times in 0 Posts
Post Rollover Icon

Hi,

It is ok to use the following code for rollover image...

try {
HomeScreen.updateIcon(icon);
HomeScreen.setRolloverIcon(rollover);
} catch (Exception e) {
}

but where should i put this code?

if i put inside main() method then it will not work when an application icon got focus.....
anybody have a possible solution???

Thanks in advance
Offline  
Old 08-23-2007, 04:29 PM   #5 (permalink)
Knows Where the Search Button Is
 
Join Date: Jul 2007
Model: 8300
PIN: N/A
Carrier: AT&T
Posts: 25
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Here how I am using it, and it works fine.


public static void main(String[] args)
{
theApp = new myApp();
.
.
.
}
public myApp()
{
try
{
updateIcon(...);
setRolloverIcon(...);

.
.
.
}

rab
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





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