Пример #1
0
  private void initEvent() {
    height_view.setOnClickListener(this);
    home_view.setOnClickListener(this);
    area_view.setOnClickListener(this);

    UserInfo userInfo = ModuleMgr.getCenterMgr().getMyInfo();

    complete_view.setVisibility(
        ModuleMgr.getCenterMgr().getMustCompleteClazz().isEmpty() ? View.GONE : View.VISIBLE);
    height_view.setVisibility(userInfo.getHeight() == 0 ? View.VISIBLE : View.GONE);
    home_view.setVisibility("".equals(userInfo.getHomeprovince()) ? View.VISIBLE : View.GONE);
    area_view.setVisibility("".equals(userInfo.getWorkarea()) ? View.VISIBLE : View.GONE);

    divider_height.setVisibility(userInfo.getHeight() == 0 ? View.VISIBLE : View.GONE);
    divider_home.setVisibility("".equals(userInfo.getHomeprovince()) ? View.VISIBLE : View.GONE);
    divider_area.setVisibility("".equals(userInfo.getWorkarea()) ? View.VISIBLE : View.GONE);
  }
Пример #2
0
  public void refreshView() {
    UserInfo userInfo = ModuleMgr.getCenterMgr().getMyInfo();

    height.setText(userInfo.getHeight() == 0 ? "需要完善" : userInfo.getHeight() + "cm");
    home.setText(
        "".equals(userInfo.getHomeprovince())
            ? "需要完善"
            : userInfo.getHomeprovince() + " " + userInfo.getHomecity());
    area.setText("".equals(userInfo.getWorkarea()) ? "需要完善" : userInfo.getWorkarea());

    height.setTextColor(userInfo.getHeight() == 0 ? emptyColor : fillColor);
    home.setTextColor("".equals(userInfo.getHomeprovince()) ? emptyColor : fillColor);
    area.setTextColor("".equals(userInfo.getWorkarea()) ? emptyColor : fillColor);
  }
Пример #3
0
  private void initView() {
    gender =
        (int)
            ModuleMgr.getCfgMgr()
                .getFloat(
                    "filterGender",
                    ModuleMgr.getCenterMgr().getMyInfo().getSex() == 1
                        ? 2
                        : 1); // 从配置读取,如果没有该配置,就为异性

    statusListView = (CustomStatusListView) findViewById(R.id.status_listview);
    exListView = statusListView.getExListView();
    exListView.setOnItemClickListener(this);
    exListView.setDivider(new ColorDrawable(getResources().getColor(R.color.fengexian_gray)));
    exListView.setDividerHeight(1);

    adapter = new NearbyUserAdapter(this, null);
    exListView.setAdapter(adapter);

    exListView.setPullLoadEnable(false);
    exListView.setXListViewListener(this);
    statusListView.showLoading();
  }