1
-
2
1
package me .imid .swipebacklayout .lib ;
3
2
4
3
import android .app .Activity ;
@@ -161,18 +160,18 @@ public SwipeBackLayout(Context context, AttributeSet attrs, int defStyle) {
161
160
162
161
/**
163
162
* Sets the sensitivity of the NavigationLayout.
164
- *
165
- * @param context The application context.
163
+ *
164
+ * @param context The application context.
166
165
* @param sensitivity value between 0 and 1, the final value for touchSlop =
167
- * ViewConfiguration.getScaledTouchSlop * (1 / s);
166
+ * ViewConfiguration.getScaledTouchSlop * (1 / s);
168
167
*/
169
168
public void setSensitivity (Context context , float sensitivity ) {
170
169
mDragHelper .setSensitivity (context , sensitivity );
171
170
}
172
171
173
172
/**
174
173
* Set up contentView which will be moved by user gesture
175
- *
174
+ *
176
175
* @param view
177
176
*/
178
177
private void setContentView (View view ) {
@@ -191,7 +190,7 @@ public void setEnableGesture(boolean enable) {
191
190
* {@link me.imid.swipebacklayout.lib.ViewDragHelper.Callback#onEdgeDragStarted(int, int)}
192
191
* methods will only be invoked for edges for which edge tracking has been
193
192
* enabled.
194
- *
193
+ *
195
194
* @param edgeFlags Combination of edge flags describing the edges to watch
196
195
* @see #EDGE_LEFT
197
196
* @see #EDGE_RIGHT
@@ -205,7 +204,7 @@ public void setEdgeTrackingEnabled(int edgeFlags) {
205
204
/**
206
205
* Set a color to use for the scrim that obscures primary content while a
207
206
* drawer is open.
208
- *
207
+ *
209
208
* @param color Color to use in 0xAARRGGBB format.
210
209
*/
211
210
public void setScrimColor (int color ) {
@@ -217,7 +216,7 @@ public void setScrimColor(int color) {
217
216
* Set the size of an edge. This is the range in pixels along the edges of
218
217
* this view that will actively detect edge touches or drags if edge
219
218
* tracking is enabled.
220
- *
219
+ *
221
220
* @param size The size of an edge in pixels
222
221
*/
223
222
public void setEdgeSize (int size ) {
@@ -227,7 +226,7 @@ public void setEdgeSize(int size) {
227
226
/**
228
227
* Register a callback to be invoked when a swipe event is sent to this
229
228
* view.
230
- *
229
+ *
231
230
* @param listener the swipe listener to attach to this view
232
231
* @deprecated use {@link #addSwipeListener} instead
233
232
*/
@@ -238,7 +237,7 @@ public void setSwipeListener(SwipeListener listener) {
238
237
239
238
/**
240
239
* Add a callback to be invoked when a swipe event is sent to this view.
241
- *
240
+ *
242
241
* @param listener the swipe listener to attach to this view
243
242
*/
244
243
public void addSwipeListener (SwipeListener listener ) {
@@ -250,7 +249,7 @@ public void addSwipeListener(SwipeListener listener) {
250
249
251
250
/**
252
251
* Removes a listener from the set of listeners
253
- *
252
+ *
254
253
* @param listener
255
254
*/
256
255
public void removeSwipeListener (SwipeListener listener ) {
@@ -263,18 +262,18 @@ public void removeSwipeListener(SwipeListener listener) {
263
262
public static interface SwipeListener {
264
263
/**
265
264
* Invoke when state change
266
- *
267
- * @param state flag to describe scroll state
265
+ *
266
+ * @param state flag to describe scroll state
267
+ * @param scrollPercent scroll percent of this view
268
268
* @see #STATE_IDLE
269
269
* @see #STATE_DRAGGING
270
270
* @see #STATE_SETTLING
271
- * @param scrollPercent scroll percent of this view
272
271
*/
273
272
public void onScrollStateChange (int state , float scrollPercent );
274
273
275
274
/**
276
275
* Invoke when edge touched
277
- *
276
+ *
278
277
* @param edgeFlag edge flag describing the edge being touched
279
278
* @see #EDGE_LEFT
280
279
* @see #EDGE_RIGHT
@@ -291,7 +290,7 @@ public static interface SwipeListener {
291
290
/**
292
291
* Set scroll threshold, we will close the activity, when scrollPercent over
293
292
* this value
294
- *
293
+ *
295
294
* @param threshold
296
295
*/
297
296
public void setScrollThresHold (float threshold ) {
@@ -303,8 +302,8 @@ public void setScrollThresHold(float threshold) {
303
302
304
303
/**
305
304
* Set a drawable used for edge shadow.
306
- *
307
- * @param shadow Drawable to use
305
+ *
306
+ * @param shadow Drawable to use
308
307
* @param edgeFlags Combination of edge flags describing the edge to set
309
308
* @see #EDGE_LEFT
310
309
* @see #EDGE_RIGHT
@@ -323,8 +322,8 @@ public void setShadow(Drawable shadow, int edgeFlag) {
323
322
324
323
/**
325
324
* Set a drawable used for edge shadow.
326
- *
327
- * @param resId Resource of drawable to use
325
+ *
326
+ * @param resId Resource of drawable to use
328
327
* @param edgeFlags Combination of edge flags describing the edge to set
329
328
* @see #EDGE_LEFT
330
329
* @see #EDGE_RIGHT
@@ -453,8 +452,8 @@ private void drawShadow(Canvas canvas, View child) {
453
452
454
453
public void attachToActivity (Activity activity ) {
455
454
mActivity = activity ;
456
- TypedArray a = activity .getTheme ().obtainStyledAttributes (new int [] {
457
- android .R .attr .windowBackground
455
+ TypedArray a = activity .getTheme ().obtainStyledAttributes (new int []{
456
+ android .R .attr .windowBackground
458
457
});
459
458
int background = a .getResourceId (0 , 0 );
460
459
a .recycle ();
0 commit comments