java - Insert each selected item in a list Android -


i want insert each selected item of listview in list, list going parameter method. elements in listview selected long click. i'm new @ android, appreciate.

this code:

listviewtodo.setonitemlongclicklistener(new onitemlongclicklistener()  {    @override   public boolean onitemlongclick(adapterview<?> arg0, view arg1,           int position, long arg3)    {       // todo auto-generated method stub        return false;   }  }); 

listviewtodo.setonitemlongclicklistener(new onitemlongclicklistener()  {  @override public boolean onitemlongclick(adapterview<?> arg0, view arg1,       int position, long arg3)  {   yourlist.add(arg0.getitem(position));    return false; }  }); 

yourlist list of whatever items want store, whitch of same type items supplied listview adapter


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -