Netbeans 中的 J2me:如何从右向左对齐列表项?
我刚刚使用 Netbeans 7.1 为我的手机创建了一个简单的 java-me 程序
我有一个启动屏幕,然后是一个包含 4 个项目的列表。
我想从右到左对齐我的列表项 RTL
有没有办法做到这一点?
I just created a simple java-me program for my cellphone with Netbeans 7.1
I have a splash screen and then a list with 4 items.
I want to align my list items from right to left RTL
Is there a way do do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您使用本机 midp 小部件 - 您不能依赖 RTL 支持,因为它取决于设备制造商来实现(如果有的话)。
所以你需要在 Canvas 之上实现你的 UI。
但是您可以使用一些小部件库来帮助您实现这一点。
我个人推荐 LWUIT 用于 RTL 工作,因为它是在设计时考虑到 RTL 的 - 它是它是在以色列开发和维护的,据我所知,许多具有出色 RTL 实现的项目都使用它。
还有一个额外的好处 - 您的代码可以轻松移植到 Android 和 ios(这是 Codename One 使用的库) )。
If you're using the native midp widgets - you can't rely on having RTL support, since it's up to the device manufacturer to implement, if at all.
So you need to implement your UI on top of Canvas.
But there are widgets libraries that you can use to help you with that.
I personally recommend LWUIT for RTL work, since it was designed with RTL in mind - It was developed and still maintained in Israel, and many projects I know of with great RTL implementations use it.
And as a side bonus - your code will be easily portable to Android and ios (It's the library used by Codename One).