gx.java
3.13 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
import android.support.v7.widget.OrientationHelper;
import android.support.v7.widget.RecyclerView.LayoutManager;
import android.support.v7.widget.RecyclerView.State;
import android.view.View;
public final class gx
{
public static int a(RecyclerView.State paramState, OrientationHelper paramOrientationHelper, View paramView1, View paramView2, RecyclerView.LayoutManager paramLayoutManager, boolean paramBoolean)
{
if ((paramLayoutManager.getChildCount() == 0) || (paramState.getItemCount() == 0) || (paramView1 == null) || (paramView2 == null)) {
return 0;
}
if (!paramBoolean) {
return Math.abs(paramLayoutManager.getPosition(paramView1) - paramLayoutManager.getPosition(paramView2)) + 1;
}
int i = paramOrientationHelper.getDecoratedEnd(paramView2);
int j = paramOrientationHelper.getDecoratedStart(paramView1);
return Math.min(paramOrientationHelper.getTotalSpace(), i - j);
}
public static int a(RecyclerView.State paramState, OrientationHelper paramOrientationHelper, View paramView1, View paramView2, RecyclerView.LayoutManager paramLayoutManager, boolean paramBoolean1, boolean paramBoolean2)
{
int i = 0;
int j = i;
if (paramLayoutManager.getChildCount() != 0)
{
j = i;
if (paramState.getItemCount() != 0)
{
j = i;
if (paramView1 != null)
{
if (paramView2 != null) {
break label45;
}
j = i;
}
}
}
return j;
label45:
i = Math.min(paramLayoutManager.getPosition(paramView1), paramLayoutManager.getPosition(paramView2));
j = Math.max(paramLayoutManager.getPosition(paramView1), paramLayoutManager.getPosition(paramView2));
if (paramBoolean2) {}
for (i = Math.max(0, paramState.getItemCount() - j - 1);; i = Math.max(0, i))
{
j = i;
if (!paramBoolean1) {
break;
}
j = Math.abs(paramOrientationHelper.getDecoratedEnd(paramView2) - paramOrientationHelper.getDecoratedStart(paramView1));
int k = Math.abs(paramLayoutManager.getPosition(paramView1) - paramLayoutManager.getPosition(paramView2));
float f = j / (k + 1);
return Math.round(i * f + (paramOrientationHelper.getStartAfterPadding() - paramOrientationHelper.getDecoratedStart(paramView1)));
}
}
public static int b(RecyclerView.State paramState, OrientationHelper paramOrientationHelper, View paramView1, View paramView2, RecyclerView.LayoutManager paramLayoutManager, boolean paramBoolean)
{
if ((paramLayoutManager.getChildCount() == 0) || (paramState.getItemCount() == 0) || (paramView1 == null) || (paramView2 == null)) {
return 0;
}
if (!paramBoolean) {
return paramState.getItemCount();
}
int i = paramOrientationHelper.getDecoratedEnd(paramView2);
int j = paramOrientationHelper.getDecoratedStart(paramView1);
int k = Math.abs(paramLayoutManager.getPosition(paramView1) - paramLayoutManager.getPosition(paramView2));
return (int)((i - j) / (k + 1) * paramState.getItemCount());
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/gx.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/