private void startSideLoadActivity() { int enterAnimation = AnimationParadigm.getNextAnimationEnter(AnimationParadigm.ANIMATION_VERTICAL); int exitAnimation = AnimationParadigm.getNextAnimationExit(AnimationParadigm.ANIMATION_VERTICAL); startActivityForResult(SharingHelper.getIntentForLoading(getApplicationContext()), 0); overridePendingTransition(enterAnimation, exitAnimation); }
@Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if (data != null) { Uri file = SideLoadTypeChoosingFragment.getUriFromActivityResult( requestCode, resultCode, data, SharingHelper.getLoadInformation()); if (file != null) { loadVersion(file); } } }
private void showSideLoadDialog() { SideLoadTypeChoosingFragment.constructFragment( SharingHelper.getLoadInformation(), new SideLoadTypeChoosingFragment.SideLoadChoosingFragmentListener() { @Override public void finishWithFile(Uri uri) { loadVersion(uri); } @Override public void finishWithText(String s) {} }) .show(getSupportFragmentManager(), "SideLoadTypeChoosingFragment"); }