×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Jul 2013
    Posts
    15

    Handle Events in Custom ListCellRenderer

    Hi All,

    I am making a listview for Nokia Asha Devices(310 ,311 and 501) using lwuit.

    I was successful to write my own CustomListCellRender class with an icon and a text. Now i want to have a rectangle on the listview cell and for that i drew a rectangle.

    rectangle was good but now i want to generate a event when user clicks on the rectangle how i can get that event ??

    To give more details i have overided the paint method and drawn the icon, lable and rectangle inside it !!

  2. #2
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,087

    Re: Handle Events in Custom ListCellRenderer

    As its a list, when user clicks the list item you get list item selected or selectionChange event, based on which you take action.
    thanks,
    ~Amitabh
    (Champion of the Month -Aug'13)
    Follow me on my blog for Innovative Mobile Apps

  3. #3
    Registered User
    Join Date
    Jul 2013
    Posts
    15

    Re: Handle Events in Custom ListCellRenderer

    ok sorry i forgot to mention that, i use the item selected event but i want an different event when the user clicks my rectangle only in the cell so for that i think i need to overide some other methods in my CustomListCellRenderer class ??

  4. #4
    Nokia Developer Champion
    Join Date
    Mar 2013
    Posts
    686

    Re: Handle Events in Custom ListCellRenderer

    I'm afraid that type of behavior cannot be done with a List,
    You need to use ContainerList and even then make some corrections to the actual lwuit code to pass the pointer methods call to the inner components of your cell renderer.

  5. #5
    Nokia Developer Champion
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,852

    Re: Handle Events in Custom ListCellRenderer

    ok i did something on this, i created a layout which contained a thumbnail, title and a button as list cell items, now what i observed is the button action listener is called first and then the list selection handler.

    So you can set a flag in button action listner and then play with your model in the way you want

Similar Threads

  1. Where to handle the events of different tab views
    By vicky_nits in forum General Development Questions
    Replies: 1
    Last Post: 2010-06-15, 11:54
  2. Handle key events
    By nitroxxx123 in forum Symbian
    Replies: 4
    Last Post: 2009-03-28, 22:16
  3. Joystick events - where to handle?
    By Adriana_P in forum Symbian
    Replies: 1
    Last Post: 2008-04-11, 10:18
  4. how to handle handle two events simultaniusly
    By j2me_raj in forum Symbian
    Replies: 2
    Last Post: 2007-06-06, 03:22
  5. MMS handle events...
    By sbleriot in forum Symbian
    Replies: 0
    Last Post: 2003-12-08, 09:17

Posting Permissions

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