j2me-如何创建主从界面 [英] j2me - How to create a master-details UI

查看:44
本文介绍了j2me-如何创建主从界面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我被困在j2me项目的中间,因为我不知道如何做在其他平台上可以轻松完成的事情,但是在java me/j2me中似乎没有直接的解决方案.

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.

我需要做的是(与Netbeans MIDP组件,LWUIT或纯lcdui无关)

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

我必须在某种表中显示客户列表(从Web服务读取),并且当用户在行中上下移动时,必须显示详细信息"命令,以便用户可以看到该特定客户的详细信息.像这样的图片:

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.

谢谢.

推荐答案

我看到它有2个选项(我使用LWUIT)

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

  1. 或者允许用户单击列表中所选单元格的单元格,然后移动到另一个显示详细信息的屏幕.我在我的项目中做的完全一样.

  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.

像在此处一样添加详细信息"命令,当用户在actionPerformed方法中单击该命令的左按钮时,您将检查选择了哪个单元并切换到详细信息屏幕

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

这篇关于j2me-如何创建主从界面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆