App
GaussianBlurLayerSettingsFragment.java
Go to the documentation of this file.
1 package mhr.app.fragments.layers.filter;
2 
3 import java.text.DecimalFormat;
4 
5 import mhr.app.R;
6 import mhr.app.fragments.layers.LayerSettingsFragment;
7 
8 import mhr.appandroid.views.LabelledSeekBar;
9 import mhr.appcore.image.layers.LayerSpecificPresentation;
10 import mhr.appcore.image.layers.filter.GaussianBlurFilterLayerSpecificPresentation;
11 
12 import android.os.Bundle;
13 import android.view.LayoutInflater;
14 import android.view.View;
15 import android.view.View.OnClickListener;
16 import android.view.ViewGroup;
17 import android.widget.SeekBar;
18 import android.widget.SeekBar.OnSeekBarChangeListener;
19 import android.widget.TextView;
20 
24 public class GaussianBlurLayerSettingsFragment extends LayerSettingsFragment implements OnClickListener {
25 
26 
27  //===== INTERFACES, CLASSES, ENUMS ==========================================================================================================//
28  //----- NON-PUBLIC --------------------------------------------------------------------------------------------------------------------------//
29  //----- PUBLIC ------------------------------------------------------------------------------------------------------------------------------//
30 
31  //===== FIELDS ==============================================================================================================================//
32  //----- NON-PUBLIC --------------------------------------------------------------------------------------------------------------------------//
35 
36  //----- PUBLIC ------------------------------------------------------------------------------------------------------------------------------//
37 
38  //===== CONSTRUCTORS, DESTRUCTORS, RELATED METHODS ==========================================================================================//
39  //----- NON-PUBLIC --------------------------------------------------------------------------------------------------------------------------//
40  @Override
41  protected View initView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
42  root = inflater.inflate(R.layout.fragment_gaussian_blur_layer_settings, container, false);
43  xSigmaLSB = (LabelledSeekBar) root.findViewById(R.id.LayerXSigmaValueLSB);
44  ySigmaLSB = (LabelledSeekBar) root.findViewById(R.id.LayerYSigmaValueLSB);
45  return root;
46  }
47  //----- PUBLIC ------------------------------------------------------------------------------------------------------------------------------//
48 
49  //===== METHODS =============================================================================================================================//
50  //----- NON-PUBLIC --------------------------------------------------------------------------------------------------------------------------//
51  @Override
54  xSigmaLSB.setProgress((float)p.xSigma);
55  ySigmaLSB.setProgress((float)p.ySigma);
56  }
57 
58  @Override
63  }
64 
65  //----- PUBLIC ------------------------------------------------------------------------------------------------------------------------------//
66 
67  //===== CALLBACKS ===========================================================================================================================//
68  @Override
69  public void onClick(View v) {
70  switch (v.getId()) {
71  default:
72  super.onClick(v);
73  break;
74  }
75  }
76 
77  //----- LIFE CYCLE --------------------------------------------------------------------------------------------------------------------------//
78 
79  // @Override
80  // public void onAttach(Activity activity) {
81  // super.onAttach(activity);
82  // /*
83  // * called once the fragment is associated with its activity.
84  // */
85  // }
86 
87  // @Override
88  // public void onCreate(Bundle savedInstanceState) {
89  // super.onCreate(savedInstanceState);
90  // /*
91  // * called to do initial creation of the fragment.
92  // *
93  // * The system calls this when creating the fragment. Within your implementation, you should initialize essential components of the fragment that you want
94  // * to retain when the fragment is paused or stopped, then resumed.
95  // */
96  // }
97 
98  // @Override
99  // public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
100  // return super.onCreateView(inflater, container, savedInstanceState);
101  // /*
102  // * creates and returns the view hierarchy associated with the fragment.
103  // *
104  // * 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
105  // * 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.
106  // *
107  // * Zde začíná životní cyklus při návratu z backstacku
108  // */
109  // }
110 
111  // @Override
112  // public void onActivityCreated(Bundle savedInstanceState) {
113  // super.onActivityCreated(savedInstanceState);
114  // /*
115  // * tells the fragment that its activity has completed its own Activity.onCreate().
116  // */
117  // }
118 
119  // @Override // Vyžaduje API 17
120  // public void onViewStateRestored(Bundle savedInstanceState) {
121  // super.onViewStateRestored(savedInstanceState);
122  // /*
123  // * tells the fragment that all of the saved state of its view hierarchy has been restored.
124  // */
125  // }
126 
127  // @Override
128  // public void onStart() {
129  // super.onStart();
130  // /*
131  // * makes the fragment visible to the user (based on its containing activity being started).
132  // */
133  // }
134  //
135  // @Override
136  // public void onResume() {
137  // super.onResume();
138  // /*
139  // * makes the fragment interacting with the user (based on its containing activity being resumed).
140  // */
141  // }
142 
143  // @Override
144  // public void onPause() {
145  // super.onPause();
146  // /*
147  // * 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.
148  // *
149  // * 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).
150  // * 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).
151  // */
152  // }
153 
154  // @Override
155  // public void onStop() {
156  // super.onStop();
157  // /*
158  // * fragment is no longer visible to the user either because its activity is being stopped or a fragment operation is modifying it in the activity.
159  // */
160  // }
161 
162  // @Override
163  // public void onDestroyView() {
164  // super.onDestroyView();
165  // /*
166  // * allows the fragment to clean up resources associated with its View.
167  // *
168  // * Zde končí životní cyklus při umístění do backstacku
169  // */
170  // }
171 
172  // @Override
173  // public void onDestroy() {
174  // super.onDestroy();
175  // /*
176  // * called to do final cleanup of the fragment's state.
177  // */
178  // }
179 
180  // @Override
181  // public void onDetach() {
182  // super.onDetach();
183  // /*
184  // * called immediately prior to the fragment no longer being associated with its activity.
185  // */
186  // }
187 }