NestedScrollingChildHelper.java
5.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
package android.support.v4.view;
import android.view.View;
import android.view.ViewParent;
public class NestedScrollingChildHelper
{
private final View a;
private ViewParent b;
private boolean c;
private int[] d;
public NestedScrollingChildHelper(View paramView)
{
this.a = paramView;
}
public boolean dispatchNestedFling(float paramFloat1, float paramFloat2, boolean paramBoolean)
{
if ((isNestedScrollingEnabled()) && (this.b != null)) {
return ViewParentCompat.onNestedFling(this.b, this.a, paramFloat1, paramFloat2, paramBoolean);
}
return false;
}
public boolean dispatchNestedPreFling(float paramFloat1, float paramFloat2)
{
if ((isNestedScrollingEnabled()) && (this.b != null)) {
return ViewParentCompat.onNestedPreFling(this.b, this.a, paramFloat1, paramFloat2);
}
return false;
}
public boolean dispatchNestedPreScroll(int paramInt1, int paramInt2, int[] paramArrayOfInt1, int[] paramArrayOfInt2)
{
boolean bool2 = false;
boolean bool1 = bool2;
int j;
int i;
if (isNestedScrollingEnabled())
{
bool1 = bool2;
if (this.b != null)
{
if ((paramInt1 == 0) && (paramInt2 == 0)) {
break label171;
}
if (paramArrayOfInt2 == null) {
break label192;
}
this.a.getLocationInWindow(paramArrayOfInt2);
j = paramArrayOfInt2[0];
i = paramArrayOfInt2[1];
}
}
for (;;)
{
int[] arrayOfInt = paramArrayOfInt1;
if (paramArrayOfInt1 == null)
{
if (this.d == null) {
this.d = new int[2];
}
arrayOfInt = this.d;
}
arrayOfInt[0] = 0;
arrayOfInt[1] = 0;
ViewParentCompat.onNestedPreScroll(this.b, this.a, paramInt1, paramInt2, arrayOfInt);
if (paramArrayOfInt2 != null)
{
this.a.getLocationInWindow(paramArrayOfInt2);
paramArrayOfInt2[0] -= j;
paramArrayOfInt2[1] -= i;
}
if (arrayOfInt[0] == 0)
{
bool1 = bool2;
if (arrayOfInt[1] == 0) {}
}
else
{
bool1 = true;
}
label171:
do
{
return bool1;
bool1 = bool2;
} while (paramArrayOfInt2 == null);
paramArrayOfInt2[0] = 0;
paramArrayOfInt2[1] = 0;
return false;
label192:
i = 0;
j = 0;
}
}
public boolean dispatchNestedScroll(int paramInt1, int paramInt2, int paramInt3, int paramInt4, int[] paramArrayOfInt)
{
boolean bool2 = false;
boolean bool1 = bool2;
int j;
int i;
if (isNestedScrollingEnabled())
{
bool1 = bool2;
if (this.b != null)
{
if ((paramInt1 == 0) && (paramInt2 == 0) && (paramInt3 == 0) && (paramInt4 == 0)) {
break label126;
}
if (paramArrayOfInt == null) {
break label147;
}
this.a.getLocationInWindow(paramArrayOfInt);
j = paramArrayOfInt[0];
i = paramArrayOfInt[1];
}
}
for (;;)
{
ViewParentCompat.onNestedScroll(this.b, this.a, paramInt1, paramInt2, paramInt3, paramInt4);
if (paramArrayOfInt != null)
{
this.a.getLocationInWindow(paramArrayOfInt);
paramArrayOfInt[0] -= j;
paramArrayOfInt[1] -= i;
}
bool1 = true;
label126:
do
{
return bool1;
bool1 = bool2;
} while (paramArrayOfInt == null);
paramArrayOfInt[0] = 0;
paramArrayOfInt[1] = 0;
return false;
label147:
i = 0;
j = 0;
}
}
public boolean hasNestedScrollingParent()
{
return this.b != null;
}
public boolean isNestedScrollingEnabled()
{
return this.c;
}
public void onDetachedFromWindow()
{
ViewCompat.stopNestedScroll(this.a);
}
public void onStopNestedScroll(View paramView)
{
ViewCompat.stopNestedScroll(this.a);
}
public void setNestedScrollingEnabled(boolean paramBoolean)
{
if (this.c) {
ViewCompat.stopNestedScroll(this.a);
}
this.c = paramBoolean;
}
public boolean startNestedScroll(int paramInt)
{
if (hasNestedScrollingParent()) {
return true;
}
if (isNestedScrollingEnabled())
{
ViewParent localViewParent = this.a.getParent();
View localView = this.a;
while (localViewParent != null)
{
if (ViewParentCompat.onStartNestedScroll(localViewParent, localView, this.a, paramInt))
{
this.b = localViewParent;
ViewParentCompat.onNestedScrollAccepted(localViewParent, localView, this.a, paramInt);
return true;
}
if ((localViewParent instanceof View)) {
localView = (View)localViewParent;
}
localViewParent = localViewParent.getParent();
}
}
return false;
}
public void stopNestedScroll()
{
if (this.b != null)
{
ViewParentCompat.onStopNestedScroll(this.b, this.a);
this.b = null;
}
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/android/support/v4/view/NestedScrollingChildHelper.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/