LWUIT 1.4 Plain commands Vs. Styled commands with LWUITTheme.res
I've just started to develope an LWUIT MIDlet with standard LWUITTheme.res. I added 2 commands (Exit, Search) on my first form, but they appear with no style (black on white).
Instead, other 2 commands (Back, Details) on a second form, showed on Search command click, are rendered styled in white on blue, with a blue gradient background.
The first form has a BorderLayout, the second has no p开发者_StackOverflowarticular layout set.
Since I haven't changed commands style in my code, I would expect that their appearance be the same in the first as in the second form, and precisely as they appear in the second form.
Am I wrong?
Regards
--
After @Bhakki first reply, regarding SoftButton
s, I've checked the {$LWUIT_FOLDER}/LWUITDemo/src/LWUITTheme.res
file.
As you can see, both Command
and SoftButton
has in the .res file.
It seems that the commands in the first form are styled as Command
, and those in the second form are styled as SoftButton
.
But I added them in the same way in both forms.
Am I doing something wrong?
You created the first form before installing the theme. You need to install the LWUIT theme before you create components but after Display.init().
精彩评论