public void setSwitchChildDialogueData() { appController = (AppController) getApplicationContext(); parentModel = appController.getParentsData(); if (parentModel != null && parentModel.getNumberOfChildren() >= 0) { selectedChildPosition = appController.getSelectedChild(); } }
@Override public void onClick(View v) { switch (v.getId()) { case R.id.back: onBackPressed(); break; case R.id.reply_imgview: Intent intent = new Intent( ParentMailDetailedActivity.this, com.mychild.view.Parent.ParentWriteMailToTeacher.class); Bundle b = new Bundle(); b.putString("mailto", regardsFromTV.getText().toString()); b.putString("mailToId", mailFromId); b.putString("msg", detailedMailTV.getText().toString()); intent.putExtras(b); startActivity(intent); break; /* case R.id.write_mailIV: startActivity(new Intent(this, com.sandeepani.view.Parent.ParentWriteMailToTeacher.class)); break;*/ case R.id.switch_child: if (parentModel.getChildList() != null) { dialog = CommonUtils.getSwitchChildDialog( this, parentModel.getChildList(), selectedChildPosition); } else { Toast.makeText(this, "No Child data found..", Toast.LENGTH_LONG).show(); } // case R.id.logoutIV: // Toast.makeText(this, "Clicked Logout", Toast.LENGTH_LONG).show(); // Constants.logOut(this); // // Intent i = new Intent(this, LoginActivity.class); // i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | // Intent.FLAG_ACTIVITY_CLEAR_TASK); // startActivity(i); // finish(); // // break; default: // Enter code in the event that that no cases match } }