how can i create onItemClickListener


Last Updated:

  1. Leela krishna

    Leela krishna Member This Topic's Starter

    Joined:
    Sep 8, 2009
    Messages:
    10
    Likes Received:
    0
    public class VectorPlayList extends ListActivity {
    private String[] mStrings = new String[UImediaPlayer.playListForUrl.size()];
    @Override
    public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);


    setListAdapter(new ArrayAdapter<String>(this,
    android.R.layout.simple_list_item_1, mStrings));
    getListView().setTextFilterEnabled(true);

    for (int i = 0; i < UImediaPlayer.playListForUrl.size(); i++) {
    mStrings = (String) UImediaPlayer.playListForUrl.elementAt(i);
    // System.out.println(m);
    }
    }
    }
    here my code is
    now i want to create OnItemClickListener
    to my mStrings
    how can i
    please help me
     

    Advertisement
  2. jksharma

    jksharma New Member

    Joined:
    Oct 15, 2009
    Messages:
    4
    Likes Received:
    0
    set listitem as clickable and then create a class implementing interface OnClickListener and in this class override method onClick(View v) and by v you can get view which is clicked.
     

Share This Page

Loading...