gp.java
4.12 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
import android.content.Context;
import android.os.Build.VERSION;
import android.support.v4.view.MotionEventCompat;
import android.support.v4.view.ViewPropertyAnimatorCompat;
import android.support.v4.widget.ListViewAutoScrollHelper;
import android.support.v7.appcompat.R.attr;
import android.support.v7.widget.ListViewCompat;
import android.view.MotionEvent;
import android.view.View;
public class gp
extends ListViewCompat
{
private boolean f;
private boolean g;
private boolean h;
private ViewPropertyAnimatorCompat i;
private ListViewAutoScrollHelper j;
public gp(Context paramContext, boolean paramBoolean)
{
super(paramContext, null, R.attr.dropDownListViewStyle);
this.g = paramBoolean;
setCacheColorHint(0);
}
public boolean hasFocus()
{
return (this.g) || (super.hasFocus());
}
public boolean hasWindowFocus()
{
return (this.g) || (super.hasWindowFocus());
}
public boolean isFocused()
{
return (this.g) || (super.isFocused());
}
public boolean isInTouchMode()
{
return ((this.g) && (this.f)) || (super.isInTouchMode());
}
public boolean onForwardedEvent(MotionEvent paramMotionEvent, int paramInt)
{
int k = MotionEventCompat.getActionMasked(paramMotionEvent);
label41:
View localView1;
switch (k)
{
default:
paramInt = 0;
case 3:
for (bool = true;; bool = false)
{
if ((!bool) || (paramInt != 0))
{
this.h = false;
setPressed(false);
drawableStateChanged();
localView1 = getChildAt(this.mMotionPosition - getFirstVisiblePosition());
if (localView1 != null) {
localView1.setPressed(false);
}
if (this.i != null)
{
this.i.cancel();
this.i = null;
}
}
if (!bool) {
break;
}
if (this.j == null) {
this.j = new ListViewAutoScrollHelper(this);
}
this.j.setEnabled(true);
this.j.onTouch(this, paramMotionEvent);
label152:
return bool;
paramInt = 0;
}
}
for (boolean bool = false;; bool = true)
{
int m = paramMotionEvent.findPointerIndex(paramInt);
if (m < 0)
{
paramInt = 0;
bool = false;
break label41;
}
paramInt = (int)paramMotionEvent.getX(m);
m = (int)paramMotionEvent.getY(m);
int n = pointToPosition(paramInt, m);
if (n == -1)
{
paramInt = 1;
break label41;
}
localView1 = getChildAt(n - getFirstVisiblePosition());
float f1 = paramInt;
float f2 = m;
this.h = true;
if (Build.VERSION.SDK_INT >= 21) {
drawableHotspotChanged(f1, f2);
}
if (!isPressed()) {
setPressed(true);
}
layoutChildren();
if (this.mMotionPosition != -1)
{
View localView2 = getChildAt(this.mMotionPosition - getFirstVisiblePosition());
if ((localView2 != null) && (localView2 != localView1) && (localView2.isPressed())) {
localView2.setPressed(false);
}
}
this.mMotionPosition = n;
float f3 = localView1.getLeft();
float f4 = localView1.getTop();
if (Build.VERSION.SDK_INT >= 21) {
localView1.drawableHotspotChanged(f1 - f3, f2 - f4);
}
if (!localView1.isPressed()) {
localView1.setPressed(true);
}
positionSelectorLikeTouchCompat(n, localView1, f1, f2);
setSelectorEnabled(false);
refreshDrawableState();
if (k != 1) {
break;
}
performItemClick(localView1, n, getItemIdAtPosition(n));
break;
if (this.j == null) {
break label152;
}
this.j.setEnabled(false);
return bool;
}
}
public void setListSelectionHidden(boolean paramBoolean)
{
this.f = paramBoolean;
}
protected boolean touchModeDrawsInPressedStateCompat()
{
return (this.h) || (super.touchModeDrawsInPressedStateCompat());
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/gp.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/