j2me - How to create a master-details UI

无人久伴 提交于 2019-12-30 12:23:44

问题


I'm stuck in the middle of j2me project because I have no idea how to do something that would be easily done in other platforms, but that doesn't seem to have a direct solution in java me/j2me.

What I need to do is this (it doesn't matter if it is with Netbeans MIDP components, LWUIT or plain lcdui)

I have to display a list of customers (read from a web service) in some sort of table, and when the user navigates up or down the rows, a "Details" command must be shown so that the user can see the details for that specific customer. Something like this image:

I know I can always use a List, but the problem is that Lists only allow a single "cell" per item, which is not very visually attractive as a table.

As always any help will be GREATLY appreciated.

Thank in advance.


回答1:


as i see it you have 2 options (i use LWUIT)

  1. either allow the user to click the cell thah the chose in the list and move to another screen where the details is shown. i do exactly the same in my project.

  2. add the "details" command as you did here, and when the user will click the left button for the command in the actionPerformed method you will check which cell is chosen and switch to the details screen

i think the second option is less intuitive for the user, just let him click and choose the right row



来源:https://stackoverflow.com/questions/24121003/j2me-how-to-create-a-master-details-ui

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!