private void initView() {
    titleBarView = (TitleBarView) this.findViewById(R.id.title_bar_mycourse);
    titleBarView.setCommonTitle(
        View.GONE, View.GONE, View.VISIBLE, View.VISIBLE, View.GONE, View.GONE);
    titleBarView.setTitleText(R.string.title_text_course_m);
    titleBarView.getIvLeft().setImageResource(R.drawable.arrow_left);
    titleBarView.setBarLeftOnclickListener(
        new OnClickListener() {

          @Override
          public void onClick(View v) {
            doBack();
          }
        });
    lv_county = (ListView) findViewById(R.id.lv_county);
    CourseCountyAdapter adapter = new CourseCountyAdapter(this, list);
    lv_county.setAdapter(adapter);
    lv_county.setOnItemClickListener(
        new OnItemClickListener() {

          @Override
          public void onItemClick(AdapterView<?> arg0, View arg1, int position, long arg3) {
            // TODO Auto-generated method stub
            Intent intent = new Intent();
            intent.putExtra("regionBean", list.get(position));
            // 通过调用setResult方法返回结果给前一个activity。
            setResult(2, intent);
            finish();
          }
        });
  }
  private void initView() {
    titleBarView = (TitleBarView) this.findViewById(R.id.title_bar_activity_zxdt_teacher);
    titleBarView.setCommonTitle(
        View.GONE, View.GONE, View.VISIBLE, View.VISIBLE, View.GONE, View.VISIBLE);

    titleBarView.setTitleText(R.string.in_school_dynamic);

    titleBarView.getIvLeft().setImageResource(R.drawable.arrow_left);
    titleBarView.setBarLeftOnclickListener(
        new OnClickListener() {

          @Override
          public void onClick(View v) {
            doBack();
          }
        });
    titleBarView.getBtnRight().setBackgroundResource(R.drawable.fadongtai);
    titleBarView.setBarRightOnclickListener(
        new OnClickListener() {

          @Override
          public void onClick(View v) {
            Intent fsdtIntent = new Intent(context, SendDynamicActivity.class);
            startActivityForResult(fsdtIntent, FLAG_SENDDYNAMIC_REQUESTCODE_STRING);
            intoAnim();
          }
        });
    // 下拉刷新控件
    mPullListView = (PullToRefreshListView) this.findViewById(R.id.ll_activity_zxdt_teacher);
    fl_common_zxhf = (FrameLayout) findViewById(R.id.fl_common_zxhf);
    fl_common_zxhf.setOnClickListener(
        new OnClickListener() {

          @Override
          public void onClick(View v) {
            Intent intent = new Intent(context, NewCommonCommentsActivity.class);
            intent.putExtra("type", Constant.COMMNETTYPE_ZXDT);
            startActivity(intent);
            intoAnim();
          }
        });
    newReplyMsgBadgeView = new BadgeView(context);
    newReplyMsgBadgeView.setBadgeGravity(Gravity.RIGHT | Gravity.CENTER_VERTICAL);
    newReplyMsgBadgeView.setBadgeMargin(0, 0, 2, 0);
    newReplyMsgBadgeView.setTargetView(fl_common_zxhf);

    // 没有数据显示
    // ll_no_items_listed = (LinearLayout)
    // findViewById(R.id.ll_no_items_listed);
  }
Exemplo n.º 3
0
  private void initView() {
    titleBarView = (TitleBarView) this.findViewById(R.id.title_bar_activity_zhizun_commodity);
    titleBarView.setCommonTitle(
        View.GONE, View.GONE, View.VISIBLE, View.VISIBLE, View.GONE, View.GONE);
    titleBarView.setTitleText(R.string.add_commodity);
    titleBarView.getIvLeft().setImageResource(R.drawable.fanhui_zhizun);
    titleBarView.setBarLeftOnclickListener(
        new OnClickListener() {

          @Override
          public void onClick(View v) {
            doBack();
          }
        });
    et_commodity_bar_code = (EditText) findViewById(R.id.et_commodity_bar_code);
    if (baer != null && !baer.equals("")) {
      et_commodity_bar_code.setText(baer);
    }
  }
  private void initView() {
    titleBarView = (TitleBarView) this.findViewById(R.id.title_bar_forgetpassword);
    titleBarView.setCommonTitle(
        View.GONE, View.GONE, View.VISIBLE, View.VISIBLE, View.GONE, View.VISIBLE);

    titleBarView.setTitleText("验证手机号码");

    titleBarView.getIvLeft().setImageResource(R.drawable.arrow_left);
    titleBarView.setBarLeftOnclickListener(
        new OnClickListener() {

          @Override
          public void onClick(View v) {
            doBack();
          }
        });
    et_forget_passrword_text = (EditText) this.findViewById(R.id.et_forget_passrword_text);
    et_forget_passrword_text.addTextChangedListener(
        new TextWatcher() {

          @Override
          public void onTextChanged(CharSequence s, int start, int before, int count) {
            // TODO Auto-generated method stub

          }

          @Override
          public void beforeTextChanged(CharSequence s, int start, int count, int after) {
            // TODO Auto-generated method stub

          }

          @Override
          public void afterTextChanged(Editable s) {
            if (et_forget_passrword_text.getText().toString().length() == 11) {
              btn_nexe_submit_gray.setVisibility(View.GONE);
              btn_next_submit.setVisibility(View.VISIBLE);
            } else {
              btn_nexe_submit_gray.setVisibility(View.VISIBLE);
              btn_next_submit.setVisibility(View.GONE);
            }
          }
        });
    btn_nexe_submit_gray = (Button) findViewById(R.id.btn_nexe_submit_gray);
    btn_next_submit = (Button) this.findViewById(R.id.btn_next_submit);
    btn_next_submit.setOnClickListener(
        new OnClickListener() {

          @Override
          public void onClick(View v) {

            String phone = et_forget_passrword_text.getText().toString().trim();

            if (null == phone || "".equals(phone)) {
              UIHelper.ToastMessage(context, "手机号码不能为空!", 0);
              return;
            }
            if (!StringUtils.isMobile(phone)) {
              UIHelper.ToastMessage(context, "请输入正确的手机号!", 0);
              return;
            }
            showProgressDialog(context, "", getResources().getString(R.string.load_ing));
            new ValidUserTask().execute(phone);
          }
        });
  }