开发者

LWUIT 1.4 Plain commands Vs. Styled commands with LWUITTheme.res

开发者 https://www.devze.com 2023-03-14 23:03 出处:网络
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).

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).

LWUIT 1.4 Plain commands Vs. Styled commands with LWUITTheme.res

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.

LWUIT 1.4 Plain commands Vs. Styled commands with LWUITTheme.res

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 SoftButtons, I've checked the {$LWUIT_FOLDER}/LWUITDemo/src/LWUITTheme.res file.

LWUIT 1.4 Plain commands Vs. Styled commands with LWUITTheme.res

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().

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号