delete unused images

51 views
Skip to first unread message

browser

unread,
Apr 15, 2013, 9:23:27 AM4/15/13
to codenameone...@googlegroups.com


 I dont understand what this does, how it works.

I tried it ( after backing up my project folder).
It reduced build size 6.5 to 2.7MB
However on running the app it was missing nearly all menu images, I use multiimages for all.
So I reverted to original version.



Shai Almog

unread,
Apr 15, 2013, 11:47:31 AM4/15/13
to codenameone...@googlegroups.com
It deletes images that aren't used by the resource file (theme/GUI), if you used these images in code it can't detect that.
However, if you have images that were used in GUI and weren't detected correctly then let me know how you added them.

browser

unread,
Apr 15, 2013, 1:11:03 PM4/15/13
to codenameone...@googlegroups.com


On Monday, April 15, 2013 4:47:31 PM UTC+1, Shai Almog wrote:
It deletes images that aren't used by the resource file (theme/GUI), if you used these images in code it can't detect that.
However, if you have images that were used in GUI and weren't detected correctly then let me know how you added them.


Shai,

    I put each image in project src folder, and do a Quick Add Multi Image in GUI.
For buttons etc in GUI i add them in GUI.
For the sidemenu ones (which might be the problem ones) I have a method called from beforeMaingame

void setCommands()
{
maingameCommand=new Command("",fetchResourceFile().getImage("startx.png"));
and same for each command.

}
So maybe it is deleting the multimages for these if they are not used in GUI ?
pat
 

Shai Almog

unread,
Apr 16, 2013, 1:02:05 AM4/16/13
to codenameone...@googlegroups.com
We won't detect that.
An image shouldn't reside both in the SRC and the resource file since you would effectively be packaging the image twice.

browser

unread,
Apr 16, 2013, 5:21:09 AM4/16/13
to codenameone...@googlegroups.com


On Tuesday, April 16, 2013 6:02:05 AM UTC+1, Shai Almog wrote:
We won't detect that.
An image shouldn't reside both in the SRC and the resource file since you would effectively be packaging the image twice.

Shai,
   Clearer now. but still another  problem.

When I click Delete Unused Images it shows a list of maybe a few hundred files for deletion. I recognize the image files I made myself so I  dont delete those.(they might be used in code, so undetected in GUI) I delete all the others: like ones related to Textfields, Buttons etc. Is that OK ?
  now when I run the app in simulator it runs fine. all the navigation works including sidemenu.
But in android device the sidemenu opens but doesnt bring you to a clicked form.Stays on current form.
This is similar to issue 659 problem I entered yesterday.

seems to be some image problem with sidemenu, (unless I deleted some image I shouldnt)
thanks
pat



 

browser

unread,
Apr 16, 2013, 6:55:27 AM4/16/13
to codenameone...@googlegroups.com
   Well prob not  an image problem in sidemenu since it shows and closes correctly. Something goes wrong after clicking a menuitem.
pat
    


 

browser

unread,
Apr 16, 2013, 11:16:36 AM4/16/13
to codenameone...@googlegroups.com
OK this sidemenu thing is ok now with issue 659.
and my  install files are no longer bloated.
thanks
pat 
    


 
Reply all
Reply to author
Forward
0 new messages