Esempio n. 1
0
  @Override
  public void onSelects(final List<EntitySelect> entitySelects) {
    if (mWaitfor != null) {
      mWaitfor.close();
      mWaitfor = null;
    }

    if (entitySelects != null) {
      mSelectObject = new PopWindowSelectObject(this, mEntityRelation, entitySelects, this);
      mSelectObject.show();
    }
  }
Esempio n. 2
0
  @Override
  public void onClick(final View view) {
    final Object object = view.getTag();
    final int id = view.getId();
    switch (id) {
      case R.id.tv_time:
        {
          if (object != null) {
            final EntityLocations entityLocations = (EntityLocations) object;
            final double latitude = entityLocations.getLatitude();
            final double longitude = entityLocations.getLongitude();
            mapViewRefresh(latitude, longitude, 17.0f, 800);
          }
        }
        break;

      case R.id.rl_item:
        {
          if (mSelectObject != null) {
            mSelectObject.close();
            mSelectObject = null;
          }

          if (mEntityRelation == null) mEntityRelation = EntityRelation.getRelation();

          if (mEntityRelation != null) {
            mWaitfor = new PopWindowWaitfor(this);
            mWaitfor.start();

            final EntitySelect entitySelect = (EntitySelect) object;
            final String name = entitySelect.getName();
            mEntityRelation.setTo(name);
            mRequestSelect = new RequestSelect(this, mThreadPool, this);
            mRequestSelect.request(name);
          }
        }
        break;
    }
  }