public class ResultFragment
extends android.app.Fragment
Modifier and Type | Class and Description |
---|---|
private class |
ResultFragment.BWButtonClickListener
A class to transform the image to a Black-&-White image.
|
private class |
ResultFragment.DeleteButtonListener
A class to delete the image
|
private class |
ResultFragment.GrayButtonClickListener
A class to transform the image to a Grayscale image.
|
private class |
ResultFragment.MagicColorButtonClickListener
A class to transform the image to a Magic-Color image.
|
private class |
ResultFragment.OriginalButtonClickListener
A class to transform the image to the original image.
|
private class |
ResultFragment.RotButtonClickListener
A class to rotate the image.
|
Modifier and Type | Field and Description |
---|---|
boolean |
deleted
A variable used by the EditViewActivity to check whether the image has been deleted or not
|
private android.graphics.Bitmap |
original
A bitmap to keep in memory the original picture
|
private static ProgressDialogFragment |
progressDialogFragment
The Fragment to show loading when any operation is being performed
|
private android.graphics.Bitmap |
rotoriginal
The bitmap to keep in memory the original rotation of the image
|
private android.widget.ImageView |
scannedImageView
The imageView containing the image to be formatted
|
private android.graphics.Bitmap |
transformed
The bitmap that will be shown to the user
|
private android.view.View |
view
The root view of the fragment
|
Constructor and Description |
---|
ResultFragment() |
Modifier and Type | Method and Description |
---|---|
protected void |
dismissDialog()
A function to dismiss the progress dialog.
|
void |
finish()
A function to prepare the image for compiling the images into a PDF.
|
private void |
getBitmap()
Get the bitmap set by the user asynchronously
|
private android.net.Uri |
getUri()
The URI of the bitmap
|
private void |
init()
The main function of the Fragment
|
android.view.View |
onCreateView(android.view.LayoutInflater inflater,
android.view.ViewGroup container,
android.os.Bundle savedInstanceState)
A function to create the view and start the main function (the init function)
|
void |
onReceiveBitmap(android.graphics.Bitmap bitmap)
A function to receive the requested bitmap
|
void |
setScannedImage(android.graphics.Bitmap scannedImage)
Tha function to set the image on the view
|
protected void |
showProgressDialog(java.lang.String message)
A function to show the progress dialog.
|
dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getContext, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLayoutInflater, getLoaderManager, getParentFragment, getReenterTransition, getResources, getRetainInstance, getReturnTransition, getSharedElementEnterTransition, getSharedElementReturnTransition, getString, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, hashCode, instantiate, instantiate, isAdded, isDetached, isHidden, isInLayout, isRemoving, isResumed, isStateSaved, isVisible, onActivityCreated, onActivityResult, onAttach, onAttach, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreate, onCreateAnimator, onCreateContextMenu, onCreateOptionsMenu, onDestroy, onDestroyOptionsMenu, onDestroyView, onDetach, onGetLayoutInflater, onHiddenChanged, onInflate, onInflate, onInflate, onLowMemory, onMultiWindowModeChanged, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPictureInPictureModeChanged, onPictureInPictureModeChanged, onPrepareOptionsMenu, onRequestPermissionsResult, onResume, onSaveInstanceState, onStart, onStop, onTrimMemory, onViewCreated, onViewStateRestored, postponeEnterTransition, registerForContextMenu, requestPermissions, setAllowEnterTransitionOverlap, setAllowReturnTransitionOverlap, setArguments, setEnterSharedElementCallback, setEnterTransition, setExitSharedElementCallback, setExitTransition, setHasOptionsMenu, setInitialSavedState, setMenuVisibility, setReenterTransition, setRetainInstance, setReturnTransition, setSharedElementEnterTransition, setSharedElementReturnTransition, setTargetFragment, setUserVisibleHint, shouldShowRequestPermissionRationale, startActivity, startActivity, startActivityForResult, startActivityForResult, startIntentSenderForResult, startPostponedEnterTransition, toString, unregisterForContextMenu
public boolean deleted
private android.graphics.Bitmap original
private static ProgressDialogFragment progressDialogFragment
private android.graphics.Bitmap rotoriginal
private android.widget.ImageView scannedImageView
private android.graphics.Bitmap transformed
private android.view.View view
protected void dismissDialog()
public void finish()
private void getBitmap()
private android.net.Uri getUri()
private void init()
public android.view.View onCreateView(android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState)
onCreateView
in class android.app.Fragment
inflater
- the default LayoutInflatorcontainer
- the default containersavedInstanceState
- the save state of the fragment (not used)public void onReceiveBitmap(android.graphics.Bitmap bitmap)
bitmap
- the requested bitmappublic void setScannedImage(android.graphics.Bitmap scannedImage)
scannedImage
- the Image to be setprotected void showProgressDialog(java.lang.String message)
message
- the message to show.