@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); } } }
@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); } } }