/** * 通过判断type,管理click事件 * * @param mtype */ private void ManageClick(int mtype) { switch (mtype) { case CLICK_TYPE_BACKBTN: // 返回按钮的监听 finish(); break; case CLICK_TYPE_EMPLOYMENT_BTN: if (Submit.isNetworkAvailable(mContext)) ProcessEmployFunction(); else Utils.ShowToast(mContext, "没有可用网!"); break; default: break; } }
private void initViews() { /** 标题部分 */ CenterTitle = (TextView) findViewById(R.id.title_text); LeftBackBtn = (ImageView) findViewById(R.id.home_back); CenterTitle.setText("雇佣管理"); LeftBackBtn.setOnClickListener(new MyOnClickListener(CLICK_TYPE_BACKBTN)); JobManagedList = (ListView) findViewById(R.id.job_managed_list); /* 等待对话框部分 */ WaitingText = (TextView) findViewById(R.id.Waiting_text); WaitingDlg = (RelativeLayout) findViewById(R.id.Waiting_dlg); EmploymentBtn = (TextView) findViewById(R.id.employment_btn); EmploymentBtn.setOnClickListener(new MyOnClickListener(CLICK_TYPE_EMPLOYMENT_BTN)); if (Submit.isNetworkAvailable(mContext)) new GetCompanyInfoAsynTask().execute(Jobid); else Utils.ShowToast(mContext, "没有可用网络"); }