1. saranyasampath's Avatar
    Hi All,

    I have created one custom list field. For each row I have 4 bitmaps. I have used graphics.drawBitmap method to draw all bitmaps. Actually I need to do separate action for each bitmap click. Pls help me in this regard with sample src.

    Thanks in advance,
    Saranya
    01-02-12 07:44 AM
  2. Smiley88's Avatar
    add this to your class

    public boolean navigationClick(int status, int time) {

    // index will contain 0 to x when the users clicks on the list

    int index = your_list_variable.getSelectedIndex();

    if (index == 0)
    {
    // bitmap one selected
    }
    else
    if (index ==1 )
    {
    // bitmap 2 selected
    }

    // return true cuz we already handled this event

    return true;
    }
    01-03-12 11:23 PM
  3. saranyasampath's Avatar
    Thanks for your reply. But your solution is for each row selection. If first row is selected the selection index will be 0. So we will take action according to it.

    But I need to navigate within a row. One list row having 4 bitmaps. Focus should move from one bitmap to another. And while clicking on one of them , particular action need to be done. how to handle that case? how to move focus within a row? And handling navigation click for each one of them. Pls suggest.


    Thanks in advance,
    Saranya
    01-07-12 01:05 AM
  4. Smiley88's Avatar
    when you add the list to the window the moving and highlighting is all done by the OS and you do not need to do anything.

    if use scroll the list up and down the code will not do anything until you click on.
    01-09-12 12:42 AM
LINK TO POST COPIED TO CLIPBOARD