Ejemplo n.º 1
0
 private void addLable(TagItem tagItem) {
   int left = (int) tagItem.getX();
   int top = (int) tagItem.getY();
   LabelView label = new LabelView(PhotoProcessActivity.this);
   label.init(tagItem);
   EffectUtil.addLabelEditable(mImageView, drawArea, label, left, top);
   labels.add(label);
 }
Ejemplo n.º 2
0
 @Override
 public void onClick(final LabelView label) {
   EffectUtil.removeLabelEditable(mImageView, drawArea, label);
   labels.remove(label);
   EditTextActivity.openTextEdit(
       PhotoProcessActivity.this, label.getTagInfo(), AppConstants.ACTION_EDIT_LABEL);
 }
Ejemplo n.º 3
0
    @Override
    protected void onPostExecute(String fileName) {
      super.onPostExecute(fileName);
      dismissProgressDialog();
      if (StringUtils.isEmpty(fileName)) {
        return;
      }

      // 保存标签信息
      List<TagItem> tagInfoList = new ArrayList<>();
      for (LabelView label : labels) {
        tagInfoList.add(label.getTagInfo());
      }

      // 将图片信息通过EventBus发送到MainActivity

      if (feedItem != null) {
        feedItem.setTagList(tagInfoList);
      } else {
        feedItem = new FeedItem(tagInfoList, fileName);
      }
      EventBus.getDefault().post(feedItem);
      CameraManager.getInst().close();
    }