Exemple #1
0
 @Override
 public void onFilterDialogItemClick(AdapterView<?> parent, View view, int position, long id) {
   ModuleMgr.getCfgMgr().setFloat("filterGender", position); // 存储该筛选配置
   infoMgr.reset();
   gender = position;
   ModuleMgr.getDiscoverMgr().reqSecAdjacent(gender, null, 1, this);
   LoadingDialog.show(this, "加载中");
 }
Exemple #2
0
  private void writeCfg() {
    if (pointD == null) {
      return;
    }

    try {
      ModuleMgr.getCfgMgr().setString("LM_longitude", String.valueOf(pointD.longitude));
      ModuleMgr.getCfgMgr().setString("LM_latitude", String.valueOf(pointD.latitude));

      ModuleMgr.getCfgMgr().setString("LM_province", pointD.province);
      ModuleMgr.getCfgMgr().setString("LM_city", pointD.city);
      ModuleMgr.getCfgMgr().setString("LM_district", pointD.district);

      ModuleMgr.getCfgMgr().setString("LM_addr", pointD.addr);

      ModuleMgr.getCfgMgr().setBoolean("LM_Fix_use", useFixPlace);
      ModuleMgr.getCfgMgr().setString("LM_Fix_latitude", String.valueOf(fixPlace.latitude));
      ModuleMgr.getCfgMgr().setString("LM_Fix_longitude", String.valueOf(fixPlace.longitude));
    } catch (Exception e) {
      MMLog.printThrowable(e);
    }
  }
Exemple #3
0
  private void readCfg() {
    if (pointD == null) {
      pointD = new PointD();
    }

    try {
      pointD.longitude = Double.valueOf(ModuleMgr.getCfgMgr().getString("LM_longitude", "1000"));
      pointD.latitude = Double.valueOf(ModuleMgr.getCfgMgr().getString("LM_latitude", "1000"));

      pointD.province = ModuleMgr.getCfgMgr().getString("LM_province", "");
      pointD.city = ModuleMgr.getCfgMgr().getString("LM_city", "");
      pointD.district = ModuleMgr.getCfgMgr().getString("LM_district", "");

      pointD.addr = ModuleMgr.getCfgMgr().getString("LM_addr", "");

      useFixPlace = ModuleMgr.getCfgMgr().getBoolean("LM_Fix_use", false);
      fixPlace.longitude =
          Double.valueOf(ModuleMgr.getCfgMgr().getString("LM_Fix_latitude", "1000"));
      fixPlace.latitude =
          Double.valueOf(ModuleMgr.getCfgMgr().getString("LM_Fix_longitude", "1000"));
    } catch (Exception e) {
      MMLog.printThrowable(e);
    }
  }
Exemple #4
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();
  }