Beispiel #1
0
 @Override
 public void OnCompleteLocation(BDLocation location) {
   Log.d("TAG", "location_start");
   if (location == null || StringUtils.isEmpty(location.getCity())) {
     isLocationSuccess = false;
   } else {
     isLocationSuccess = true;
     mAddressSetting = LocationCache.getIntance();
     LocationInfo locationInfo = new LocationInfo();
     locationInfo.setCityName(location.getCity());
     locationInfo.setLocation(new Location(location.getLatitude(), location.getLongitude()));
     mAddressSetting.savaCurrentLocationInfo(locationInfo);
   }
   requestdata(0);
 }
  @Override
  public View getView(int position, View convertView, ViewGroup parent) {
    FunctionItem item = mData.get(position);
    ViewHoler holer = null;
    if (null == convertView) {
      convertView =
          LayoutInflater.from(mContext).inflate(R.layout.adapter_push_fuction_item, parent, false);
      holer = new ViewHoler(convertView);
      convertView.setTag(holer);

    } else {
      holer = (ViewHoler) convertView.getTag();
    }
    holer.ivFucImag.setImageResource(item.getFuctionRes());
    String fucName = item.getFuctionName();
    if (StringUtils.isEmpty(fucName)) {
      holer.tvFucName.setVisibility(View.GONE);
    } else {
      holer.tvFucName.setText(item.getFuctionName());
    }
    return convertView;
  }