コード例 #1
0
  public void drop(int from, int to) {
    if (_isDrag) {
      Log.i("Drag and Drop : drop", "from : " + from + ", to : " + to);
      if (from == to) return;

      ActionUnit item = _activityAdapter._itemList.remove(from);
      _activityAdapter._itemList.add(to, item);

      _isDrag = false;
      _activityAdapter.notifyDataSetChanged();
    }
  }
コード例 #2
0
        @Override
        public void onClick(View v) {
          if (_activityAdapter.getCount() > 7) {
            Toast.makeText(
                    EditActListActivity.this,
                    "Cannot add more than 8 activities.",
                    Toast.LENGTH_SHORT)
                .show();
            return;
          }

          Intent kIntent = new Intent(EditActListActivity.this, AddActionActivity.class);
          startActivity(kIntent);
        }
コード例 #3
0
 private void addActions() {
   startProgress();
   _activityAdapter.putItems(_actionController._actionUnits);
 }