codenameone / CodenameOne

Cross-platform framework for building truly native mobile apps with Java or Kotlin. Write Once Run Anywhere support for iOS, Android, Desktop & Web.
https://www.codenameone.com/
Other
1.72k stars 409 forks source link

Theme issue only with IntelliJ 14.1.2 simulator #1467

Open rhg1968 opened 9 years ago

rhg1968 commented 9 years ago

I made a small change to override one item in a theme using the IntelliJ 14.1.2 IDE and it shows up in the theme editor but not when running the simulator. So I decided to install Netbeans to see if it worked correctly. Below is a list of what I did.

I installed NetBeans to test things out and it worked as expected in the Simulator running from NetBeans. All I did was create a new project with each IDE in the Chrome style and add a button to the form and changed it's UIID to CalcButton. I then went into the GUI Builder and overrode the android settings and just changed the foreground color on the calcbutton from white to green. In the theme editor in both IDE's everything appears correctly if I select the platform I am viewing.

When I run the app in the simulator and use an Android skin, only the Simulator launched from NetBeans shows the color change, whereas the simulator launched from IntelliJ 14.1.2 still shows the white lettering.

rhg1968 commented 9 years ago

I think I might have found the issue. Still an issue that needs to be fixed

In IntelliJ I can choose to run the simulator by clicking on the green play arrow or use the drop down menu off of the CodeName One icon. If I run it off of the CodeName One Icon, I see the color changes but if I click on the green arrow it runs but doesn't show the theme changes. This seems to be a solution but if I want to debug the app I have to click on the bug icon, which works, but the theme changes are lost again. They seem to only show when using the CNO icon.

cno

rhg1968 commented 9 years ago

I think I might have found some more information that will help with this.

In IntelliJ you can create, or it gets created for you, run/debug configurations. By default it is just running the Make command before running and starting the simulator. When this happens you don't see the custom themes.

When you use the CNO button to run in the simulator it runs some ANT build process first and then deploys to the simulator. When this happens everything looks as expected.

I am able to go into the IntelliJ build configuration and indicate that I want to run an ANT process, but there is a large list of them and I'm not sure if one of those are the correct items to select.