CustomModeFragment

com.j0h1.contour

## Class CustomModeFragment

- java.lang.Object
- - Fragment
  - - com.j0h1.contour.CustomModeFragment

-     public class CustomModeFragment
      extends Fragment

  Fragment that is responsible of defining a custom drawing session.
  Author:
    Johannes Riedmann

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private Bitmap` | `currentSelectedImage`
    `private Bitmap` | `edgeImage`
    `private ImageView` | `ivChooseImage`
    `private static int` | `RESULT_LOAD_IMAGE`
    `private SeekBar` | `sbImageUpload`
    `private EditText` | `tbxCustomSessionImageName`
    `private Toast` | `toast`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CustomModeFragment()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `private void` | `createEdgeImage(int progress)` Generates an edge image from the currently selected image.
    `void` | `onActivityResult(int requestCode, int resultCode, Intent data)`
    `View` | `onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)`
    `void` | `onStart()`
    `private void` | `prepareToast(java.lang.String message)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### RESULT_LOAD_IMAGE

          private static final int RESULT_LOAD_IMAGE

      See Also:
        Constant Field Values

    - #### ivChooseImage

          private ImageView ivChooseImage

    - #### tbxCustomSessionImageName

          private EditText tbxCustomSessionImageName

    - #### sbImageUpload

          private SeekBar sbImageUpload

    - #### currentSelectedImage

          private Bitmap currentSelectedImage

    - #### edgeImage

          private Bitmap edgeImage

    - #### toast

          private Toast toast

  - ### Constructor Detail

    - #### CustomModeFragment

          public CustomModeFragment()

  - ### Method Detail

    - #### onCreateView

          public View onCreateView(LayoutInflater inflater,
                                   ViewGroup container,
                                   Bundle savedInstanceState)

    - #### onStart

          public void onStart()

    - #### prepareToast

          private void prepareToast(java.lang.String message)

    - #### createEdgeImage

          private void createEdgeImage(int progress)

      Generates an edge image from the currently selected image. The low threshold is defined by the progress value of the SeekBar.
      Parameters:
        `progress` -

    - #### onActivityResult

          public void onActivityResult(int requestCode,
                                       int resultCode,
                                       Intent data)