private void getResult(String parameter) { DBController dbc = new DBController(this); skydrive = new ArrayList<SearchResults>(); skydrive = dbc.getSearchDataFromSkydrive(parameter); adapt = new MyCustomBaseAdapter(SkydriveFolderList.this, skydrive); adapt.notifyDataSetChanged(); lv.setAdapter(adapt); }
public boolean onContextItemSelected(MenuItem item) { // Get extra info about list item that was long-pressed AdapterContextMenuInfo menuInfo = (AdapterContextMenuInfo) item.getMenuInfo(); DBController dbc2 = new DBController(this); folderpath = dbc2.getSkydriveFilePath(file_id); DropboxBean db = new DropboxBean(); // mDBApi=db.getmDBApi(); switch (item.getItemId()) { case CONTEXTMENU_OPTION1: new Skydrive_InterTransfer().execute(); // Toast.makeText(getApplicationContext(),folderpath , Toast.LENGTH_LONG).show(); // dt.DownloadFromDropbox(folderpath, mDBApi, service); // st.UploadToSkydrive(service, client); break; case CONTEXTMENU_OPTION2: try { ProgressDialog downloadProgressDialog = new ProgressDialog(SkydriveFolderList.this); downloadProgressDialog.setTitle("Downloading..."); downloadProgressDialog.setMessage("Downloading" + service + "from skydrive"); downloadProgressDialog.show(); st.downloadFromSkydrive(SkyFolderPath, folderpath, service, mClient); downloadProgressDialog.dismiss(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } // new skydrive_download().execute(); break; } return true; }