App

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
mhr.app.fragments.toolbox.transforms.CropPopUpFragment Class Reference
Inheritance diagram for mhr.app.fragments.toolbox.transforms.CropPopUpFragment:

## Public Member Functions
void | onClick (View v)
void | onAttach (Activity activity)
View | onCreateView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
void | onResume ()
void | onPause ()

## Protected Member Functions
View | initView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
| Provede inicializaci view.

## Protected Attributes
View | root
AppMainActivity | activity
boolean | firstCreated = true
Button | cropBtn
FrameLayout | guiHolder
CropPicker | p

## Detailed Description

Definition at line 31 of file CropPopUpFragment.java.

## Member Function Documentation

View mhr.app.fragments.toolbox.transforms.CropPopUpFragment.initView | ( | LayoutInflater | inflater,
|  | ViewGroup | container,
|  | Bundle | savedInstanceState
| ) |  |
| inlineprotected

Provede inicializaci view.

Parameters

  inflater |
  container |
  savedInstanceState |

Returns

Definition at line 59 of file CropPopUpFragment.java.

{
root = inflater.inflate(R.layout.fragment_crop_tool_popup, container, false);
cropBtn = (Button) root.findViewById(R.id.ApplyCropBtn);
cropBtn.setOnClickListener(this);
firstCreated = false;
return root;
}

void mhr.app.fragments.toolbox.transforms.CropPopUpFragment.onAttach | ( | Activity | activity | ) |
| inline

Definition at line 103 of file CropPopUpFragment.java.

{
super.onAttach(activity);
/*
* called once the fragment is associated with its activity.
*/
this.activity = (AppMainActivity) activity;
}

void mhr.app.fragments.toolbox.transforms.CropPopUpFragment.onClick | ( | View | v | ) |
| inline

Definition at line 77 of file CropPopUpFragment.java.

{
int id = v.getId();
switch (id) {
//(biasSeekBar.getProgress() - 100) / 100.0)
case R.id.ApplyCropBtn:
BitmapDisplayer disp = activity.getBitmapDisplayer();
RectF crop = p.getCrop();
Rect cropR = new Rect(
disp.translateCoordX(crop.left),
disp.translateCoordY(crop.top),
disp.translateCoordX(crop.right),
disp.translateCoordY(crop.bottom));
if (cropR.getWidth() == 0 || cropR.getHeight() == 0) {
return;
}
activity.addCommand(new CropImageCommand(cropR));
p.resetCrop();
break;
}
}

View mhr.app.fragments.toolbox.transforms.CropPopUpFragment.onCreateView | ( | LayoutInflater | inflater,
|  | ViewGroup | container,
|  | Bundle | savedInstanceState
| ) |  |
| inline

Definition at line 123 of file CropPopUpFragment.java.

{
/*
* creates and returns the view hierarchy associated with the fragment.
*
* The system calls this when it's time for the fragment to draw its user interface for the first time. To draw a UI for your fragment, you must return a
* View from this method that is the root of your fragment's layout. You can return null if the fragment does not provide a UI.
*
* Zde začíná životní cyklus při návratu z backstacku
*/
if (firstCreated) {
firstCreated = false;
return initView(inflater, container, savedInstanceState);
} else {
return root;
}
}

void mhr.app.fragments.toolbox.transforms.CropPopUpFragment.onPause | ( |  | ) |
| inline

Definition at line 179 of file CropPopUpFragment.java.

{
super.onPause();
/*
* fragment is no longer interacting with the user either because its activity is being paused or a fragment operation is modifying it in the activity.
*
* The system calls this method as the first indication that the user is leaving the fragment (though it does not always mean the fragment is being destroyed).
* This is usually where you should commit any changes that should be persisted beyond the current user session (because the user might not come back).
*/
guiHolder.removeAllViews();
guiHolder.setVisibility(View.GONE);
}

void mhr.app.fragments.toolbox.transforms.CropPopUpFragment.onResume | ( |  | ) |
| inline

Definition at line 165 of file CropPopUpFragment.java.

{
super.onResume();
/*
* makes the fragment interacting with the user (based on its containing activity being resumed).
*/
guiHolder = activity.getGuiOverCanvas();
guiHolder.removeAllViews();
p = new CropPicker(activity);
p.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
guiHolder.addView(p);
guiHolder.setVisibility(View.VISIBLE);
}

## Member Data Documentation

AppMainActivity mhr.app.fragments.toolbox.transforms.CropPopUpFragment.activity
| protected

Definition at line 40 of file CropPopUpFragment.java.

Button mhr.app.fragments.toolbox.transforms.CropPopUpFragment.cropBtn
| protected

Definition at line 43 of file CropPopUpFragment.java.

boolean mhr.app.fragments.toolbox.transforms.CropPopUpFragment.firstCreated = true
| protected

Definition at line 41 of file CropPopUpFragment.java.

FrameLayout mhr.app.fragments.toolbox.transforms.CropPopUpFragment.guiHolder
| protected

Definition at line 45 of file CropPopUpFragment.java.

CropPicker mhr.app.fragments.toolbox.transforms.CropPopUpFragment.p
| protected

Definition at line 46 of file CropPopUpFragment.java.

View mhr.app.fragments.toolbox.transforms.CropPopUpFragment.root
| protected

Definition at line 39 of file CropPopUpFragment.java.

The documentation for this class was generated from the following file:

- /home/xxx/eclipse_workspaces/app/app/src/mhr/app/fragments/toolbox/transforms/CropPopUpFragment.java