@Override
        public void run() {

          if (getAuditResponse != null
              && getAuditResponse.getOS() != null
              && getAuditResponse.getOS().equalsIgnoreCase("Success")) {

            if (getAuditResponse.getErrorList() != null
                    && getAuditResponse.getErrorList().size() > 0
                || getAuditResponse.getCautionList() != null
                    && getAuditResponse.getCautionList().size() > 0) {

              wholeNoErrorLayout.setVisibility(View.GONE);
              wholeErrorLayout.setVisibility(View.VISIBLE);

              if (getAuditResponse.getErrorList() != null
                  && getAuditResponse.getErrorList().size() > 0) {

                Error_layout.setVisibility(View.VISIBLE);
                NoError_layout.setVisibility(View.GONE);

                ReviewErrorListAdapter adapter =
                    new ReviewErrorListAdapter(
                        mContext,
                        getAuditResponse.getErrorList(),
                        R.layout.error_adapter,
                        getActivity(),
                        BId,
                        EIN,
                        BN);

                //                    LinearLayoutManager llm = new LinearLayoutManager(mContext);
                //                    llm.setOrientation(LinearLayoutManager.VERTICAL);
                //                    errorlist.setLayoutManager(llm);
                errorlist.setAdapter(adapter);

                errorlist.setExpanded(true);

                adapter.notifyDataSetChanged();

              } else {

                ReviewNext.setEnabled(true);

                Error_layout.setVisibility(View.GONE);
                NoError_layout.setVisibility(View.VISIBLE);
              }

              if (getAuditResponse.getCautionList() != null
                  && getAuditResponse.getCautionList().size() > 0) {

                ReviewCautionListAdapter adapter =
                    new ReviewCautionListAdapter(
                        mContext,
                        getAuditResponse.getCautionList(),
                        R.layout.error_adapter,
                        getActivity(),
                        BId,
                        EIN,
                        BN);

                //                    LinearLayoutManager llm = new LinearLayoutManager(mContext);
                //                    llm.setOrientation(LinearLayoutManager.VERTICAL);
                //                    cautionList.setLayoutManager(llm);
                cautionList.setAdapter(adapter);

                cautionList.setExpanded(true);

                adapter.notifyDataSetChanged();

                caution_layout.setVisibility(View.VISIBLE);
                NoCaution_layout.setVisibility(View.GONE);

              } else {

                caution_layout.setVisibility(View.GONE);
                NoCaution_layout.setVisibility(View.VISIBLE);
              }
            } else {

              ReviewNext.setEnabled(true);

              wholeNoErrorLayout.setVisibility(View.VISIBLE);
              wholeErrorLayout.setVisibility(View.GONE);
            }

          } else if (getAuditResponse.getOS().equalsIgnoreCase("Failure")) {

            if (getAuditResponse.getEM() != null
                && !getAuditResponse.getEM().equalsIgnoreCase("null")) {

              if (getAuditResponse.getEM().equalsIgnoreCase("Access Token is invalid")) {

                utils.errorMessage(mContext, "Your session is Expired");
                Logout.logout(mContext);

              } else {

                utils.errorMessage(mContext, getAuditResponse.getEM());
              }
            }
          }
        }
  private void onClick() {

    WholeLayout.setOnTouchListener(
        new View.OnTouchListener() {

          @Override
          public boolean onTouch(View v, MotionEvent event) {
            InputMethodManager in =
                (InputMethodManager) mContext.getSystemService(Context.INPUT_METHOD_SERVICE);

            in.hideSoftInputFromWindow(v.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);
            return false;
          }
        });

    logolayout.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            InputMethodManager in =
                (InputMethodManager) mContext.getSystemService(Context.INPUT_METHOD_SERVICE);

            in.hideSoftInputFromWindow(v.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);

            startActivity(
                new Intent(mContext, DashboardActivity.class).putExtra("TO_LAYOUT", "Dashboard"));

            ((Activity) mContext).finish();
          }
        });

    ReviewCancelbutton.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {

            InputMethodManager in =
                (InputMethodManager) mContext.getSystemService(Context.INPUT_METHOD_SERVICE);

            in.hideSoftInputFromWindow(v.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);

            Fragment newFragment = new SummaryFragment(mContext);

            FragmentTransaction transaction =
                getActivity().getSupportFragmentManager().beginTransaction();

            transaction.setCustomAnimations(R.anim.slidein, R.anim.slideout);

            // Replace whatever is in the fragment_container view with this fragment,
            // and add the transaction to the back stack if needed
            transaction.replace(R.id.rightFragment, newFragment);

            transaction.addToBackStack(FragmentNameConfig.SUMMARY_FRAGMENT);

            // Commit the transaction
            transaction.commit();
          }
        });

    ReviewNext.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {

            InputMethodManager in =
                (InputMethodManager) mContext.getSystemService(Context.INPUT_METHOD_SERVICE);

            in.hideSoftInputFromWindow(v.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);

            TaxPageFragment();
          }
        });

    errorlist.setOnItemClickListener(
        new AdapterView.OnItemClickListener() {
          @Override
          public void onItemClick(AdapterView<?> parent, View view, final int position, long id) {

            for (int i = 0; i < cautionList.getChildCount(); i++) {
              View v = cautionList.getChildAt(i);
              v.getTag();
            }

            TextView fix_me = (TextView) view.findViewById(R.id.fix_me);

            fix_me.setOnClickListener(
                new View.OnClickListener() {
                  @Override
                  public void onClick(View v) {

                    if (getAuditResponse.getErrorList().get(position).getACT() != null
                        && getAuditResponse
                            .getErrorList()
                            .get(position)
                            .getACT()
                            .equalsIgnoreCase("Create")) {

                      Fragment newFragment = new AddExemptOrganization(mContext, true, true);

                      FragmentTransaction transaction =
                          getActivity().getSupportFragmentManager().beginTransaction();

                      transaction.setCustomAnimations(R.anim.slidein, R.anim.slideout);

                      // Replace whatever is in the fragment_container view with this fragment,
                      // and add the transaction to the back stack if needed
                      transaction.replace(R.id.wholevertical, newFragment);

                      transaction.addToBackStack(FragmentNameConfig.ORG_DETAIL_FRAGMENT);

                      // Commit the transaction
                      transaction.commit();

                    } else if (getAuditResponse.getErrorList().get(position).getACT() != null
                        && getAuditResponse
                            .getErrorList()
                            .get(position)
                            .getACT()
                            .equalsIgnoreCase("IRSPayment")) {

                      Fragment newFragment = new IRSPayment(mContext);

                      FragmentTransaction transaction =
                          getActivity().getSupportFragmentManager().beginTransaction();

                      transaction.setCustomAnimations(R.anim.slidein, R.anim.slideout);

                      // Replace whatever is in the fragment_container view with this fragment,
                      // and add the transaction to the back stack if needed
                      transaction.replace(R.id.rightFragment, newFragment);

                      transaction.addToBackStack(FragmentNameConfig.IRS_PAYMENT_FRAGMENT);

                      // Commit the transaction
                      transaction.commit();

                    } else if (getAuditResponse.getErrorList().get(position).getACT() != null
                        && getAuditResponse
                            .getErrorList()
                            .get(position)
                            .getACT()
                            .equalsIgnoreCase("Step1")) {

                      Fragment newFragment = new NewTaxYearFragment(mContext, 0);

                      FragmentTransaction transaction =
                          getActivity().getSupportFragmentManager().beginTransaction();

                      transaction.setCustomAnimations(R.anim.slidein, R.anim.slideout);

                      // Replace whatever is in the fragment_container view with this fragment,
                      // and add the transaction to the back stack if needed
                      transaction.replace(R.id.rightFragment, newFragment);

                      // transaction.addToBackStack(FragmentNameConfig.FORM_TAX_SELECTION_FRAGMENT);
                      // Commit the transaction
                      transaction.commit();

                    } else if (getAuditResponse.getErrorList().get(position).getACT() != null
                        && getAuditResponse
                            .getErrorList()
                            .get(position)
                            .getACT()
                            .equalsIgnoreCase("Step2")) {
                      Fragment newFragment = new NewTaxYearFragment(mContext, 0);

                      FragmentTransaction transaction =
                          getActivity().getSupportFragmentManager().beginTransaction();

                      transaction.setCustomAnimations(R.anim.slidein, R.anim.slideout);

                      // Replace whatever is in the fragment_container view with this fragment,
                      // and add the transaction to the back stack if needed
                      transaction.replace(R.id.rightFragment, newFragment);

                      // transaction.addToBackStack(FragmentNameConfig.FORM_TAX_SELECTION_FRAGMENT);
                      // Commit the transaction
                      transaction.commit();

                    } else if (getAuditResponse.getErrorList().get(position).getACT() != null
                        && getAuditResponse
                            .getErrorList()
                            .get(position)
                            .getACT()
                            .equalsIgnoreCase("Step3")) {

                      Fragment newFragment = new NewTaxYearFragment(mContext, 0);

                      FragmentTransaction transaction =
                          getActivity().getSupportFragmentManager().beginTransaction();

                      transaction.setCustomAnimations(R.anim.slidein, R.anim.slideout);

                      // Replace whatever is in the fragment_container view with this fragment,
                      // and add the transaction to the back stack if needed
                      transaction.replace(R.id.rightFragment, newFragment);

                      // transaction.addToBackStack(FragmentNameConfig.FORM_TAX_SELECTION_FRAGMENT);
                      // Commit the transaction
                      transaction.commit();

                    } else if (getAuditResponse.getErrorList().get(position).getACT() != null
                        && getAuditResponse
                            .getErrorList()
                            .get(position)
                            .getACT()
                            .equalsIgnoreCase("BookInCareOf")) {

                      Fragment newFragment = new BooksInCareOf(mContext, true);

                      FragmentTransaction transaction =
                          getActivity().getSupportFragmentManager().beginTransaction();

                      transaction.setCustomAnimations(R.anim.slidein, R.anim.slideout);

                      // Replace whatever is in the fragment_container view with this fragment,
                      // and add the transaction to the back stack if needed
                      transaction.replace(R.id.rightFragment, newFragment);

                      transaction.addToBackStack(FragmentNameConfig.BOOKS_IN_CARE_OF_FRAGMENT);

                      // Commit the transaction
                      transaction.commit(); // TODO: 11/26/2015

                    } else if (getAuditResponse.getErrorList().get(position).getACT() != null
                        && getAuditResponse
                            .getErrorList()
                            .get(position)
                            .getACT()
                            .equalsIgnoreCase("PrimaryExemptPurpose")) {

                      Fragment newFragment = new BooksInCareOf(mContext, true);

                      FragmentTransaction transaction =
                          getActivity().getSupportFragmentManager().beginTransaction();

                      transaction.setCustomAnimations(R.anim.slidein, R.anim.slideout);

                      // Replace whatever is in the fragment_container view with this fragment,
                      // and add the transaction to the back stack if needed
                      transaction.replace(R.id.rightFragment, newFragment);

                      transaction.addToBackStack(FragmentNameConfig.BOOKS_IN_CARE_OF_FRAGMENT);

                      // Commit the transaction
                      transaction.commit(); // TODO: 11/26/2015

                    } else if (getAuditResponse.getErrorList().get(position).getACT() != null
                        && getAuditResponse
                            .getErrorList()
                            .get(position)
                            .getACT()
                            .equalsIgnoreCase("ProgramServiceAccomplishment")) {

                      Fragment newFragment = new BooksInCareOf(mContext, true);

                      FragmentTransaction transaction =
                          getActivity().getSupportFragmentManager().beginTransaction();

                      transaction.setCustomAnimations(R.anim.slidein, R.anim.slideout);

                      // Replace whatever is in the fragment_container view with this fragment,
                      // and add the transaction to the back stack if needed
                      transaction.replace(R.id.rightFragment, newFragment);

                      transaction.addToBackStack(FragmentNameConfig.BOOKS_IN_CARE_OF_FRAGMENT);

                      // Commit the transaction
                      transaction.commit(); // TODO: 11/26/2015

                    } else {

                      Fragment newFragment = new AddExemptOrganization(mContext, true, true);

                      FragmentTransaction transaction =
                          getActivity().getSupportFragmentManager().beginTransaction();

                      transaction.setCustomAnimations(R.anim.slidein, R.anim.slideout);

                      // Replace whatever is in the fragment_container view with this fragment,
                      // and add the transaction to the back stack if needed
                      transaction.replace(R.id.wholevertical, newFragment);

                      transaction.addToBackStack(FragmentNameConfig.ORG_DETAIL_FRAGMENT);

                      // Commit the transaction
                      transaction.commit();
                    }
                  }
                });
          }
        });

    cautionList.setOnItemClickListener(
        new AdapterView.OnItemClickListener() {
          @Override
          public void onItemClick(AdapterView<?> parent, View view, final int position, long id) {

            TextView fix_me = (TextView) view.findViewById(R.id.fix_me);

            fix_me.setOnClickListener(
                new View.OnClickListener() {
                  @Override
                  public void onClick(View v) {

                    if (getAuditResponse.getErrorList().get(position).getACT() != null
                        && getAuditResponse
                            .getErrorList()
                            .get(position)
                            .getACT()
                            .equalsIgnoreCase("Create")) {

                      Fragment newFragment = new AddExemptOrganization(mContext, true, true);

                      FragmentTransaction transaction =
                          getActivity().getSupportFragmentManager().beginTransaction();

                      transaction.setCustomAnimations(R.anim.slidein, R.anim.slideout);

                      // Replace whatever is in the fragment_container view with this fragment,
                      // and add the transaction to the back stack if needed
                      transaction.replace(R.id.wholevertical, newFragment);

                      transaction.addToBackStack(FragmentNameConfig.ORG_DETAIL_FRAGMENT);

                      // Commit the transaction
                      transaction.commit();

                    } else if (getAuditResponse.getErrorList().get(position).getACT() != null
                        && getAuditResponse
                            .getErrorList()
                            .get(position)
                            .getACT()
                            .equalsIgnoreCase("IRSPayment")) {

                      Fragment newFragment = new IRSPayment(mContext);

                      FragmentTransaction transaction =
                          getActivity().getSupportFragmentManager().beginTransaction();

                      transaction.setCustomAnimations(R.anim.slidein, R.anim.slideout);

                      // Replace whatever is in the fragment_container view with this fragment,
                      // and add the transaction to the back stack if needed
                      transaction.replace(R.id.rightFragment, newFragment);

                      transaction.addToBackStack(FragmentNameConfig.IRS_PAYMENT_FRAGMENT);

                      // Commit the transaction
                      transaction.commit();

                    } else if (getAuditResponse.getErrorList().get(position).getACT() != null
                        && getAuditResponse
                            .getErrorList()
                            .get(position)
                            .getACT()
                            .equalsIgnoreCase("Step1")) {

                      Fragment newFragment = new NewTaxYearFragment(mContext, 0);

                      FragmentTransaction transaction =
                          getActivity().getSupportFragmentManager().beginTransaction();

                      transaction.setCustomAnimations(R.anim.slidein, R.anim.slideout);

                      // Replace whatever is in the fragment_container view with this fragment,
                      // and add the transaction to the back stack if needed
                      transaction.replace(R.id.rightFragment, newFragment);

                      // transaction.addToBackStack(FragmentNameConfig.FORM_TAX_SELECTION_FRAGMENT);
                      // Commit the transaction
                      transaction.commit();

                    } else if (getAuditResponse.getErrorList().get(position).getACT() != null
                        && getAuditResponse
                            .getErrorList()
                            .get(position)
                            .getACT()
                            .equalsIgnoreCase("Step2")) {
                      Fragment newFragment = new NewTaxYearFragment(mContext, 0);

                      FragmentTransaction transaction =
                          getActivity().getSupportFragmentManager().beginTransaction();

                      transaction.setCustomAnimations(R.anim.slidein, R.anim.slideout);

                      // Replace whatever is in the fragment_container view with this fragment,
                      // and add the transaction to the back stack if needed
                      transaction.replace(R.id.rightFragment, newFragment);

                      // transaction.addToBackStack(FragmentNameConfig.FORM_TAX_SELECTION_FRAGMENT);
                      // Commit the transaction
                      transaction.commit();

                    } else if (getAuditResponse.getErrorList().get(position).getACT() != null
                        && getAuditResponse
                            .getErrorList()
                            .get(position)
                            .getACT()
                            .equalsIgnoreCase("Step3")) {

                      Fragment newFragment = new NewTaxYearFragment(mContext, 0);

                      FragmentTransaction transaction =
                          getActivity().getSupportFragmentManager().beginTransaction();

                      transaction.setCustomAnimations(R.anim.slidein, R.anim.slideout);

                      // Replace whatever is in the fragment_container view with this fragment,
                      // and add the transaction to the back stack if needed
                      transaction.replace(R.id.rightFragment, newFragment);

                      // transaction.addToBackStack(FragmentNameConfig.FORM_TAX_SELECTION_FRAGMENT);
                      // Commit the transaction
                      transaction.commit();

                    } else if (getAuditResponse.getErrorList().get(position).getACT() != null
                        && getAuditResponse
                            .getErrorList()
                            .get(position)
                            .getACT()
                            .equalsIgnoreCase("BookInCareOf")) {

                      Fragment newFragment = new BooksInCareOf(mContext, true);

                      FragmentTransaction transaction =
                          getActivity().getSupportFragmentManager().beginTransaction();

                      transaction.setCustomAnimations(R.anim.slidein, R.anim.slideout);

                      // Replace whatever is in the fragment_container view with this fragment,
                      // and add the transaction to the back stack if needed
                      transaction.replace(R.id.rightFragment, newFragment);

                      transaction.addToBackStack(FragmentNameConfig.BOOKS_IN_CARE_OF_FRAGMENT);

                      // Commit the transaction
                      transaction.commit(); // TODO: 11/26/2015

                    } else if (getAuditResponse.getErrorList().get(position).getACT() != null
                        && getAuditResponse
                            .getErrorList()
                            .get(position)
                            .getACT()
                            .equalsIgnoreCase("PrimaryExemptPurpose")) {

                      Fragment newFragment = new BooksInCareOf(mContext, true);

                      FragmentTransaction transaction =
                          getActivity().getSupportFragmentManager().beginTransaction();

                      transaction.setCustomAnimations(R.anim.slidein, R.anim.slideout);

                      // Replace whatever is in the fragment_container view with this fragment,
                      // and add the transaction to the back stack if needed
                      transaction.replace(R.id.rightFragment, newFragment);

                      transaction.addToBackStack(FragmentNameConfig.BOOKS_IN_CARE_OF_FRAGMENT);

                      // Commit the transaction
                      transaction.commit(); // TODO: 11/26/2015

                    } else if (getAuditResponse.getErrorList().get(position).getACT() != null
                        && getAuditResponse
                            .getErrorList()
                            .get(position)
                            .getACT()
                            .equalsIgnoreCase("ProgramServiceAccomplishment")) {

                      Fragment newFragment = new BooksInCareOf(mContext, true);

                      FragmentTransaction transaction =
                          getActivity().getSupportFragmentManager().beginTransaction();

                      transaction.setCustomAnimations(R.anim.slidein, R.anim.slideout);

                      // Replace whatever is in the fragment_container view with this fragment,
                      // and add the transaction to the back stack if needed
                      transaction.replace(R.id.rightFragment, newFragment);

                      transaction.addToBackStack(FragmentNameConfig.BOOKS_IN_CARE_OF_FRAGMENT);

                      // Commit the transaction
                      transaction.commit(); // TODO: 11/26/2015

                    } else {

                      Fragment newFragment = new AddExemptOrganization(mContext, true, true);

                      FragmentTransaction transaction =
                          getActivity().getSupportFragmentManager().beginTransaction();

                      transaction.setCustomAnimations(R.anim.slidein, R.anim.slideout);

                      // Replace whatever is in the fragment_container view with this fragment,
                      // and add the transaction to the back stack if needed
                      transaction.replace(R.id.wholevertical, newFragment);

                      transaction.addToBackStack(FragmentNameConfig.ORG_DETAIL_FRAGMENT);

                      // Commit the transaction
                      transaction.commit();
                    }
                  }
                });
          }
        });
  }