コード例 #1
0
  /** @Description: 设置监听器 */
  private void setListener() {
    topBackBtn.setOnClickListener(this);
    topSendBtn.setOnClickListener(this);

    itemTitleRL.setOnClickListener(this);
    contactTitleRL.setOnClickListener(this);

    picGV.setOnItemClickListener(this);
    picGV.setOnItemLongClickListener(this);
  }
コード例 #2
0
  /** @Description: 初始化数据 */
  private void initData() {
    dialog = new CircularLoadingDialog(this);
    topTitleTV.setText("闲置发布");
    topSendBtn.setVisibility(View.VISIBLE);

    // 默认打开时候第一个选项为张开
    itemArrowIV.setImageResource(R.drawable.arrow_up);
    itemLL.setVisibility(View.VISIBLE);
    llList = new ArrayList<LinearLayout>();
    llList.add(itemLL);
    llList.add(contactLL);
    imgList = new ArrayList<ImageView>();
    imgList.add(itemArrowIV);
    imgList.add(contactArrowIV);
    isOpenList = new ArrayList<Boolean>();
    isOpenList.add(true);
    isOpenList.add(false);

    picList = new ArrayList<ImageItem>();
    editGridAdapter = new EditGridAdapter(this, picList);
    picGV.setAdapter(editGridAdapter);
    if (CommonConstant.FROM_SECOND_HAND_FRAGMENT.equals(from)) {
      // 添加
      isNew = true;
      secondHandInfo = new SecondHandGoods();
      picFileList = new ArrayList<BmobFile>();
    } else if (CommonConstant.FROM_SECOND_HAND_MY_FRAGMENT.equals(from)) {
      // 修改
      isNew = false;
      secondHandInfo = (SecondHandGoods) getIntent().getSerializableExtra("secondHandInfo");
      initSecondHandInfo();
    }
  }