Ejemplo n.º 1
0
 @Override
 protected void onStart() {
   super.onStart();
   ConnectionIntent intent = new ConnectionIntent(getIntent());
   formList.adapter.setupParameter(intent.getConnectionId());
   formList.refresh();
   if (formList.adapter.getCount() == 0) {
     onRefresh();
   }
 }
Ejemplo n.º 2
0
 protected void onRefresh() {
   if (task != null && task.getStatus() == Status.RUNNING) {
     return;
   }
   ConnectionIntent intent = new ConnectionIntent(getIntent());
   int id = intent.getConnectionId();
   ConnectionModel mConnection = new ConnectionModel(getApplicationContext());
   RedmineConnection connection = mConnection.getItem(id);
   mConnection.finalize();
   task = new SelectDataTask(getHelper());
   task.execute(connection);
 }
Ejemplo n.º 3
0
 @Override
 public boolean onOptionsItemSelected(MenuItem item) {
   switch (item.getItemId()) {
     case R.id.menu_refresh:
       {
         this.onRefresh();
         return true;
       }
     case R.id.menu_settings:
       {
         ConnectionIntent input = new ConnectionIntent(getIntent());
         ConnectionIntent intent =
             new ConnectionIntent(getApplicationContext(), ConnectionActivity.class);
         intent.setConnectionId(input.getConnectionId());
         startActivity(intent.getIntent());
         return true;
       }
   }
   return super.onOptionsItemSelected(item);
 }