@Override
  public boolean onOptionsItemSelected(MenuItem item) {
    switch (item.getItemId()) {
      case android.R.id.home:
        super.onBackPressed();
        Helper.isEditAllChecked = false;
        break;

      default:
        break;
    }
    return true;
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.donor_update);

    tvDisplayName = (TextView) findViewById(R.id.tv_display_name);
    etMobile = (EditText) findViewById(R.id.et_mobile);
    etName = (EditText) findViewById(R.id.et_name);
    spBloodGroup = (Spinner) findViewById(R.id.sp_blood_group);
    etLastDonationDate = (EditText) findViewById(R.id.et_last_donation_date);
    etNoOfDonation = (EditText) findViewById(R.id.et_no_of_donation);
    etLastDonationDate.setInputType(InputType.TYPE_NULL);
    etAddress = (EditText) findViewById(R.id.et_address);
    etPreferredArea = (EditText) findViewById(R.id.et_preferred_area);
    etComment = (EditText) findViewById(R.id.et_comment);
    btnUpdate = (Button) findViewById(R.id.btn_update);
    checkBoxEditAll = (CheckBox) findViewById(R.id.cb_edit_all);
    llMobile = (LinearLayout) findViewById(R.id.tupple_mobile);
    llBloodGroup = (LinearLayout) findViewById(R.id.tupple_blood_group);
    llAddress = (LinearLayout) findViewById(R.id.tupple_address);
    llPreferredArea = (LinearLayout) findViewById(R.id.tupple_preferred_area);
    llComment = (LinearLayout) findViewById(R.id.tupple_comment);

    setUpDonorCurrentInformation();
    setCurrentDateOnDatePicker();
    addListenerOnCheckBox();
    addListenerOnDateField();

    if (Helper.isEditAllChecked) {
      llMobile.setVisibility(View.VISIBLE);
      llBloodGroup.setVisibility(View.VISIBLE);
      llAddress.setVisibility(View.VISIBLE);
      llPreferredArea.setVisibility(View.VISIBLE);
      llComment.setVisibility(View.VISIBLE);
      etName.setVisibility(View.VISIBLE);
      tvDisplayName.setVisibility(View.GONE);
    }
    setupButton(btnUpdate);
  }
 @Override
 public void onBackPressed() {
   Helper.isEditAllChecked = false;
   super.onBackPressed();
 }