I accidentally deleted a multi-image entry from the list in the Codename One theme designer and can no longer access the image from code (I get a NullPointerException) or the Designer & GUI Editor. The folder with the scaled images is still located in the res/theme folder for the project.
I would like to restore this entry in the list but every option I can find to add a multi (or any) image doesn't seem to be able to handle this case. How can I add a multi-image folder to the resource list?
答案 0 :(得分:2)
Follow these steps to solve this:
theme.res
and save again.EDIT: Second method:
Check XML Team Mode
under File
in your theme designer, close the designer without saving anything.
Make sure your multi-image folder is located in the res folder. Go to Netbeans and switch the projects navigation tab to Files
and look for theme.xml
under your project files tree and double click to edit, now add the below code right after <resource majorVersion="1" minorVersion="7" useXmlUI="false">
<image name="my-image-name.png" type="multi" />
Substitute your image name as necessary. Save the xml file and close it, then reopen your theme.res and change anything just to create a new "Save" .