View Single Post
Old 06-07-2006, 02:32 PM   #1 (permalink)
New Member
Join Date: Jun 2006
Model: 7100
Carrier: multiple
Posts: 5
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Application Desktop Icon Rollover.. Possible Solution?

Please Login to Remove!

Hi all...
I was wondering how to achieve cool rollover effect of application over the BB but there was no much information around... instead a found several post about imposibility (at least via JDE ... )
Well.. after a couple of hours I've managed to get a usable solution ... or so i think.. maybe there are some flawled tricky background crap involving such an use of BB api but.. i dont know and this seems to work fine..
Could someone of you realle experts on BB dev check it aput and tell??

The solution seems easy to implement...
First, attach this code on yout UIApplication derived class (the class that holds main() method )

public static void setRolloverIcon(){
        //PNG Image MUST be added to project befor compile.
        //on same folder
Second, alter yout main() method like that:

   public static void main(String[] args)  {
        if (args!=null && args[0].equals("icon")){
        //lllalalaa rest of app starting upp proccess
        Login theApp = new Login();
Third, add new procect to JDE WorkSpace, and call it whatever u want

Forth , go to this new project properties->Application
Set type to Alternate XXXX Application Entry Point (in my case, CLDC)
Set "Alternate entry point for:" value to main project
Set "icon" as value for "Arguments passed to static public void main...."
Check System module and Auto-Run on start-up checkboxes.

Et voila...

That all should be done...
Compiler creates an alternate entry-point for our app. This entry point calls main method with especific param that tells main to set rolloverIcon and exit inmediatly.
By launching this on startup, we ensure that our rollover is set when home desktop popups...
so... any ideas of impacto over system... ?
Any other way to get around this problem... ?