List widget is invisible in BlackBerry

116 views Asked by At

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";
1

There are 1 answers

0
alishaik786 On

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;