@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_image_process); ButterKnife.inject(this); EffectUtil.clear(); initView(); initEvent(); initStickerToolBar(); ImageUtils.asyncLoadImage( this, getIntent().getData(), new ImageUtils.LoadImageCallback() { @Override public void callback(Bitmap result) { currentBitmap = result; mGPUImageView.setImage(currentBitmap); } }); ImageUtils.asyncLoadSmallImage( this, getIntent().getData(), new ImageUtils.LoadImageCallback() { @Override public void callback(Bitmap result) { smallImageBackgroud = result; } }); }
@Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { labelSelector.hide(); super.onActivityResult(requestCode, resultCode, data); if (AppConstants.ACTION_EDIT_LABEL == requestCode && data != null) { String text = data.getStringExtra(AppConstants.PARAM_EDIT_TEXT); if (StringUtils.isNotEmpty(text)) { TagItem tagItem = new TagItem(AppConstants.POST_TYPE_TAG, text); addLabel(tagItem); } } else if (AppConstants.ACTION_EDIT_LABEL_POI == requestCode && data != null) { String text = data.getStringExtra(AppConstants.PARAM_EDIT_TEXT); if (StringUtils.isNotEmpty(text)) { TagItem tagItem = new TagItem(AppConstants.POST_TYPE_POI, text); addLabel(tagItem); } } }