private void initData() {
   if (pet != null && !CommonTextUtils.isEmpty(pet.getName())) {
     nickname = pet.getName();
     mNickName.setText(pet.getName());
     mNickName.setSelection(pet.getName().length());
   }
 }
  public View getView(int position, View convertView, ViewGroup parent) {
    ViewHolder holder = null;
    if (convertView == null || convertView.getTag() == null) {
      convertView = LayoutInflater.from(mContext).inflate(R.layout.listitem_centerpet, null);
      holder = new ViewHolder(convertView);
      convertView.setTag(holder);
    } else {
      holder = (ViewHolder) convertView.getTag();
    }
    PetObject pet = getItem(position);
    if (pet != null) {
      if (!CommonTextUtils.isEmpty(pet.getIcoUrl())) {
        FrescoHelper.displayImageview(
            holder.petImg,
            pet.getIcoUrl() + CommonUtils.getAvatarSize(mContext),
            R.drawable.avatar_default_image,
            mContext.getResources(),
            true);
      }
      if (!CommonTextUtils.isEmpty(pet.getGender())) {
        if (pet.getGender().equals("0")) {
          holder.petSex.setBackgroundResource(R.drawable.pet_bitch);
        } else {
          holder.petSex.setBackgroundResource(R.drawable.pet_dog);
        }
      }
      if (!CommonTextUtils.isEmpty(pet.getName())) {
        holder.petName.setText(pet.getName());
      }

      if (!CommonTextUtils.isEmpty(pet.getCategoryName())) {
        holder.petCategory.setText(pet.getCategoryName());
      }
      if (!CommonTextUtils.isEmpty(pet.getBirthday())) {
        holder.petBirthday.setText(CommonUtils.getPetAge(mContext, pet.getBirthday()));
      }
    }
    return convertView;
  }