예제 #1
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_image_process);
    ButterKnife.inject(this);
    EffectUtil.clear();
    initView();
    initEvent();

    ImageUtils.asyncLoadImage(
        this,
        getIntent().getData(),
        result -> {
          currentBitmap = result;
          imageView.setImageBitmap(currentBitmap);
        });

    Bundle bundle = getIntent().getExtras();
    if (bundle != null) {
      feedItem = (FeedItem) bundle.getSerializable("lables");
      for (TagItem tagItem : feedItem.getTagList()) {
        addLable(tagItem);
      }
    }
  }
예제 #2
0
 @Override
 protected void onActivityResult(int requestCode, int resultCode, Intent data) {
   super.onActivityResult(requestCode, resultCode, data);
   if (AppConstants.ACTION_EDIT_LABEL == requestCode && data != null) {
     TagItem tagItem = (TagItem) data.getExtras().getSerializable(AppConstants.EDIT_TAG);
     if (StringUtils.isNotEmpty(tagItem.getName())) {
       addLable(tagItem);
     }
   }
 }