×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    Mar 2005
    Location
    Hamburg, Germany
    Posts
    285

    List.IMPLICIT in new asha: how diable the cmd button?

    Hello developer,

    I just port a app to the new Asha 501. It uses a standard LCDUI.
    I uses a List of style IMPLICIT. When the user presses an item, the command is called. That still works.
    But now the command is also placed in a big button at the bottom bar.

    I like to get rid of this button, as it is useless there and even confusing, because the user can press it without selecting an item.

    The command it created like this:

    Code:
            editCmd = new Command( "Edit", Command.ITEM, 1);
            setSelectCommand(editCmd);
            // addCommand() not called
    How can I suppress the creation of the button, but still have the implicit command work?

    Regards

    Karsten Meier

  2. #2
    Registered User
    Join Date
    Jun 2013
    Posts
    22

    Re: List.IMPLICIT in new asha: how diable the cmd button?

    Hi internetlabor!

    I think you are talking about Context Menu[1], if so, in the Nokia developer's guide there are instructions[2]. I wrote a very sample app, the list is based in LWUIT:

    Code:
    public class Sample extends MIDlet {
    
        public void startApp() {
                Display.init( this );
    //            Display.getInstance().setForceFullScreen( true );
                Form f = new Form( "Menus" );
                String []items = { "0", "1", "2", "3", "4", "5", "6", "7" };
                final List list = new List( items );
                ListCellRenderer renderer = new NokiaListCellRenderer();
                list.setRenderer( renderer );
                list.addActionListener( new ActionListener() {
                    public void actionPerformed(ActionEvent ae) {
                        Command []cmds = new Command[ 2 ];
                        cmds[0] = new Command("Menu item one");
                        cmds[1] = new Command("Menu item two");
                        ContextMenu.show( cmds, list );
                    }
                } );
                f.addComponent( list );
                f.show();
        }
    
        public void pauseApp() {
        }
    
        public void destroyApp(boolean unconditional) {
        }
    }
    Let us know if it works for your requirements,

    Best Regards



    [1] http://developer.nokia.com/Resources...ons-lists.html
    [2] http://developer.nokia.com/Resources...ntextmenu.html
    Last edited by minirich; 2013-09-18 at 23:25. Reason: extra info

  3. #3
    Registered User
    Join Date
    Jun 2013
    Posts
    22

    Re: List.IMPLICIT in new asha: how diable the cmd button?

    According to the Nokia's guide[1] there is one NOTE with LCDUI.

    Note: Currently, ITEM Commands work for Items on Form, but not for List items.



    [1] http://developer.nokia.com/Resources...ons-lists.html
    Last edited by minirich; 2013-09-18 at 23:28.

  4. #4
    Regular Contributor
    Join Date
    Mar 2005
    Location
    Hamburg, Germany
    Posts
    285

    Re: List.IMPLICIT in new asha: how diable the cmd button?

    Thank you. My case is not so complex. I just have a simple LCDUI-List with one command (and the back-command). So I don't need a context menu.

    Thank you for the reference that Item-Command are not working in a List. It looked like my Item-Command works, but it generate this superfluous button in the footer.

    My current workaround is using the implicit Selection Command of the List. So I just add no selection command to the list. That works. The detection and handling of the implicit command is not so nice, but if you have only two commands it is easy.

    Regards

    Karsten Meier

Similar Threads

  1. Implicit list click
    By krikor20 in forum Mobile Java General
    Replies: 1
    Last Post: 2013-02-04, 12:50
  2. Replies: 2
    Last Post: 2011-05-06, 14:43
  3. Implicit List and Tickers
    By am11 in forum Mobile Java Media (Graphics & Sounds)
    Replies: 8
    Last Post: 2010-01-24, 13:12
  4. problem with list.IMPLICIT
    By rathikathangaraj in forum Mobile Java General
    Replies: 2
    Last Post: 2005-06-23, 07:23
  5. Changing the 'Select' Soft Button in an Implicit List
    By daniel_wave2005 in forum Mobile Java General
    Replies: 0
    Last Post: 2005-02-10, 21:05

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×