private void initialization() { DashBoardTitle = (TextView) ((Activity) mContext).findViewById(R.id.DashBoardTitle); DashBoardTitle = (TextView) ((Activity) mContext).findViewById(R.id.DashBoardTitle); logolayout = (LinearLayout) ((Activity) mContext).findViewById(R.id.logolayout); DashboardOrgDetailsLayout = (LinearLayout) ((Activity) mContext).findViewById(R.id.DashboardOrgDetailsLayout); DashboardOrgEin = (TextView) ((Activity) mContext).findViewById(R.id.DashboardOrgEin); DashboardOrgName = (TextView) ((Activity) mContext).findViewById(R.id.DashboardOrgName); DashBoardTitle.setText("REVIEW"); if (EIN != null && BN != null) { DashboardOrgEin.setText(EIN); DashboardOrgName.setText(BN); DashboardOrgDetailsLayout.setVisibility(View.VISIBLE); } else DashboardOrgDetailsLayout.setVisibility(View.GONE); WholeLayout = (LinearLayout) CommonTaxView.findViewById(R.id.WholeLayout); ReviewCancelbutton = (android.support.v7.widget.CardView) CommonTaxView.findViewById(R.id.ReviewCancelbutton); ReviewNext = (android.support.v7.widget.CardView) CommonTaxView.findViewById(R.id.ReviewNext); ReviewNext.setEnabled(false); ReviewCancelbuttonText = (TextView) CommonTaxView.findViewById(R.id.ReviewCancelbuttonText); ReviewNextText = (TextView) CommonTaxView.findViewById(R.id.ReviewNextText); text1 = (TextView) CommonTaxView.findViewById(R.id.text1); text2 = (TextView) CommonTaxView.findViewById(R.id.text2); text3 = (TextView) CommonTaxView.findViewById(R.id.text3); wholeNoErrorLayout = (LinearLayout) CommonTaxView.findViewById(R.id.wholeNoErrorLayout); wholeErrorLayout = (LinearLayout) CommonTaxView.findViewById(R.id.wholeErrorLayout); wholeNoErrorLayout.setVisibility(View.GONE); wholeErrorLayout.setVisibility(View.GONE); Error_layout = (LinearLayout) CommonTaxView.findViewById(R.id.Error_layout); Error_layout.setVisibility(View.GONE); NoError_layout = (LinearLayout) CommonTaxView.findViewById(R.id.NoError_layout); NoError_layout.setVisibility(View.GONE); caution_layout = (LinearLayout) CommonTaxView.findViewById(R.id.caution_layout); caution_layout.setVisibility(View.GONE); NoCaution_layout = (LinearLayout) CommonTaxView.findViewById(R.id.NoCaution_layout); NoCaution_layout.setVisibility(View.GONE); errorlist = (com.span.expressextension8868.utils.utility.ExpandableHeightListView) CommonTaxView.findViewById(R.id.errorlist); cautionList = (com.span.expressextension8868.utils.utility.ExpandableHeightListView) CommonTaxView.findViewById(R.id.cautionList); }
@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()); } } } }