Пример #1
0
  protected void onActivityResult(int requestCode, int resultCode, Intent intent) {

    if (requestCode == 0 && intent != null && intent.getBooleanExtra("refresh", false)) {
      LoadVideoAsyncTask task = new LoadVideoAsyncTask();
      task.execute(0);
      mAdapter.notifyDataSetChanged();
    }
  };
Пример #2
0
 @Override
 public boolean onItemLongClick(AdapterView<?> arg0, View arg1, int position, long arg3) {
   // TODO Auto-generated method stub
   initTileBar(true);
   mAdapter.setMultiChoiseMode(true);
   mAdapter.notifyDataSetChanged();
   return true;
 }
Пример #3
0
 @Override
 public boolean onKeyDown(int keyCode, KeyEvent event) {
   if (keyCode == KeyEvent.KEYCODE_BACK) {
     if (mAdapter != null && mAdapter.getMultiChoiseMode()) {
       mAdapter.setMultiChoiseMode(false);
       initTileBar(false);
       mAdapter.clearSelect();
       mAdapter.notifyDataSetChanged();
       return true;
     }
   }
   return super.onKeyDown(keyCode, event);
 }
Пример #4
0
 @Override
 public void onClick(View v) {
   // TODO Auto-generated method stub
   switch (v.getId()) {
     case R.id.btn_hide:
       // 确定按钮的事件
       mAdapter.getSelectData();
       break;
     case R.id.btn_select_all:
       if (mSelectAllBtn.getText().equals("全选")) {
         mSelectAllBtn.setText("全不选");
         mAdapter.selectAll();
       } else {
         mSelectAllBtn.setText("全选");
         mAdapter.clearSelect();
       }
       mAdapter.notifyDataSetChanged();
       break;
   }
 }