使用 LWUIT 的评级屏幕

发布于 2024-12-01 10:59:48 字数 258 浏览 2 评论 0原文

我想从我调用该类的地方创建一个 MIDlet。在该类中有一个图像数组,其中包含 10 个图像,默认比例为 0。现在我想知道当 MIDlet 调用该类时如何创建该类假设 iRating=new Rating(3),其中Rating是类名。当我show()时,此时只有3张图像会突出显示,其余的则不会突出显示,如果我输入4 然后 4 图像将突出显示。请帮助我该怎么做 输出如下。 当我们单击第三颗星时,前三颗星将突出显示,其余的则不会。请建议我该怎么做。

I want to create a MIDlet from where I call the class.In the class there is an Image Array which contain 10 images and default ration is 0.Now I want to know how to create the class when the MIDlet call the class suppose iRating=new Rating(3),where Rating is the class name.when I show() the form at that moment only 3 image will be highlighted rest are not,if I put 4 then 4 image will highlighted.Please help me how to do
the output will be as follow.
when we click the 3rd star then first three star will be highlighted rest are not.please suggest me how to do that.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

南汐寒笙箫 2024-12-08 10:59:48

我建议您使用复选框或切换按钮(带有 setToggle(true) 的复选框)并适当地设置图像。要放置其中 5 个,只需将它们全部添加到水平布局容器中即可。

I suggest you use a checkbox or toggle button (checkbox with setToggle(true)) and set the images appropriately. To place 5 of these just add them all into a horizontal layout container.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文