android - Delete File onLongListItemClick -


to open file listview have code:

 @override     protected void onlistitemclick(listview l, view v, int position, long id) {         // todo auto-generated method stub         super.onlistitemclick(l, v, position, id);         option o = adapter.getitem(position);         if(o.getdata().equalsignorecase("folder")||o.getdata().equalsignorecase("parent directory")){                 currentdir = new file(o.getpath());                 fill(currentdir);         }         else         {              onfileclick(o);          } 

and onfileclick(o) open file, when want delete file longclick can't, because nothing happens, can't in onlonglistitemclick method, tried this:

protected boolean onlonglistitemclick(view v, int pos, long id) { option o = adapter.getitem(position);         if(o.getdata().equalsignorecase("folder")||o.getdata().equalsignorecase("parent directory")){    currentdir = new file(o.getpath());     fill(currentdir);             }             else             {                  deletefile(o);              } } 

but doesn't work, knows happens? can me?


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -