// 刷新界面
 private void initView(UserCenterBean bean) {
   if (bean != null && null != bean.getData()) {
     IQueryUserCenterInfoBean centerInfo = bean.getData();
     tvdsk.setText(centerInfo.getPay_count() + "");
     tvdfh.setText(centerInfo.getDai_count() + "");
     tvdsh.setText(centerInfo.getShou_count() + "");
     tvdpj.setText(centerInfo.getPing_count() + "");
     tvshz.setText(centerInfo.getRep_count() + "");
     tvcollectionpro.setText(centerInfo.getCommodity_count() + "件商品");
     tvcollectionfac.setText(centerInfo.getStore_count() + "个厂家");
     ImageManager.Load(centerInfo.getHead_img(), ciuser);
   } else {
     mUsername.setText("未登录");
     btnLogin.setText("登录");
     isFlag = false;
     int count = 0;
     tvdsk.setText(count + "");
     tvdfh.setText(count + "");
     tvdsh.setText(count + "");
     tvdpj.setText(count + "");
     tvshz.setText(count + "");
     tvcollectionpro.setText(count + "件商品");
     tvcollectionfac.setText(count + "个厂家");
     ciuser.setImageResource(R.drawable.icon_head);
   }
 }
Exemple #2
0
  /** 初始化UI */
  private void init() {
    changeBtnBg(btn_qyjs);
    showWitchOne(QYJS);

    tv_qyjs.setText(null != iUserInfo.getData() ? iUserInfo.getData().getF_introduction() : "");

    if (null != iUserInfo.getUserMap()) {
      tv_company.setText("公司名称:" + iUserInfo.getUserMap().getF_company_name());
      tv_company2.setText("公司名称:" + iUserInfo.getUserMap().getF_company_name());
      tv_adress.setText("注册地址:" + iUserInfo.getUserMap().getF_address_info());
      tv_license_code.setText("工商注册号:" + iUserInfo.getUserMap().getF_registration_mark());
      tv_create_time.setText("成立时间:" + iUserInfo.getUserMap().getF_create_time());
      tv_representative.setText("法定代表人:" + iUserInfo.getUserMap().getF_legal_representative());
    }

    adapter =
        new FactoryImgGridAdapter(
            mContext,
            getImgs(null != iUserInfo.getData() ? iUserInfo.getData().getF_honor_imgs() : ""));
    gv_imgs.setAdapter(adapter);

    if (null != iUserInfo.getOurMap()) {
      tv_contact_person.setText("联系人:" + iUserInfo.getOurMap().getF_link_man());
      tv_tel.setText("座机号码:" + iUserInfo.getOurMap().getF_link_moblie());
      tv_phone.setText("手机号码:" + iUserInfo.getOurMap().getF_link_phone());
    }
    ArrayList<String> imgs =
        getImgs(null != iUserInfo.getData() ? iUserInfo.getData().getF_honor_imgs() : "");
    ArrayList<ImageView> imageViews = new ArrayList<ImageView>();
    imageViews.add(ivright1);
    imageViews.add(ivright2);
    imageViews.add(ivbigright);
    imageViews.add(ivleft1);
    imageViews.add(ivleft2);
    imageViews.add(ivbigleft);
    for (int i = 0; i < (imgs.size() > 6 ? 6 : imgs.size()); i++) {
      ImageManager.Load(imgs.get(i), imageViews.get(i));
    }
  }
 @Override
 public View getView(int position, View convertView, ViewGroup parent) {
   MyHolder holder = null;
   if (null == convertView) {
     convertView = LayoutInflater.from(context).inflate(R.layout.browse_history_lv_item, null);
     holder = new MyHolder();
     holder.iv_pro = (ImageView) convertView.findViewById(R.id.iv_pro);
     holder.tv_pro_name = (TextView) convertView.findViewById(R.id.tv_pro_name);
     holder.tv_price = (TextView) convertView.findViewById(R.id.tv_price);
     holder.tv_sprice = (TextView) convertView.findViewById(R.id.tv_sprice);
     convertView.setTag(holder);
   } else {
     holder = (MyHolder) convertView.getTag();
   }
   ImageManager.Load(data.get(position).img, holder.iv_pro);
   holder.tv_pro_name.setText(data.get(position).name);
   Spanned sprice =
       Html.fromHtml(
           ResourceUtils.changeStringColor(
               "#C30001", MathUtil.priceForAppWithSign(data.get(position).price)));
   holder.tv_price.setText(sprice);
   holder.tv_sprice.setText("已销售" + data.get(position).sales_num + "双");
   return convertView;
 }