列表小部件在 BlackBerry 中不可见

发布于 2024-12-26 06:10:01 字数 1118 浏览 1 评论 0原文

以下是我的黑莓设备代码片段。这是一个包含 3 个项目的列表小部件。问题是当我运行它时,只有标题在我的黑莓模拟器中可见,这 3 个项目是不可见的。这个 UI 基于 j2me Polish。我是否在代码中遗漏了一些内容,请指导。

de.enough.polish.ui.List transTypeList = new de.enough.polish.ui.List("", List.IMPLICIT);
        //  transTypeList.setInfo("View Transaction Status. Select the Transaction Status to view details.");
            System.out.println("Setting Title");
            transTypeList.setTitle("View Transaction Status. Select the Transaction Status to view details.");
            //#style list1
            transTypeList.append("Processed Transactions", null);
                //#style list1
            transTypeList.append("Un-Processed Transactions", null);
            //#style list1
            transTypeList.append("Rejected Transactions", null);


            transTypeList.addCommand(backCmd);
            transTypeList.setCommandListener(this);

            System.out.println("Setting Title");


            //#style nameTicker
            transTypeList.setTicker(nameTrans);
            display.setCurrent(this.transTypeList);
            currentItem = "transTypeList";

Below is the snippet of my code for blackberry device. It is a list widget with 3 items.The problem is when i run it ,only title is visible in my blackberry simulator the 3 items are invisible.This UI is based on j2me polish.Am I missing something in code,Please guide.

de.enough.polish.ui.List transTypeList = new de.enough.polish.ui.List("", List.IMPLICIT);
        //  transTypeList.setInfo("View Transaction Status. Select the Transaction Status to view details.");
            System.out.println("Setting Title");
            transTypeList.setTitle("View Transaction Status. Select the Transaction Status to view details.");
            //#style list1
            transTypeList.append("Processed Transactions", null);
                //#style list1
            transTypeList.append("Un-Processed Transactions", null);
            //#style list1
            transTypeList.append("Rejected Transactions", null);


            transTypeList.addCommand(backCmd);
            transTypeList.setCommandListener(this);

            System.out.println("Setting Title");


            //#style nameTicker
            transTypeList.setTicker(nameTrans);
            display.setCurrent(this.transTypeList);
            currentItem = "transTypeList";

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

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

发布评论

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

评论(1

北城半夏 2025-01-02 06:10:01

我并不是说这是正确的,但希望这可能是:

我认为你必须在黑莓中使用 ListField 而不是 List;

最后 add(listField);

意思是:

ListField transTypeList=new ListField(ListField.HIGHLIGHT_FOCUS);

//Write what you want according to blackberry methods;

add(transTypeList);//without adding field to the screen you didn't get anything;

setTitle() 是一个预定义的方法,因此它只显示“Title”,

因为在黑莓 ListField 中有效;

I am not saying that this is correct but hope so this may be:

I think you have to use ListField instead of List in blackberry;

and at last add(listField);

Means:

ListField transTypeList=new ListField(ListField.HIGHLIGHT_FOCUS);

//Write what you want according to blackberry methods;

add(transTypeList);//without adding field to the screen you didn't get anything;

setTitle() is a pre-defined method so it shows only "Title"

because in blackberry ListField works;

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