PopupWindowCompat.java
4.95 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
package android.support.v4.widget;
import android.os.Build.VERSION;
import android.support.v4.view.GravityCompat;
import android.support.v4.view.ViewCompat;
import android.view.View;
import android.widget.PopupWindow;
import ez;
import java.lang.reflect.Method;
public final class PopupWindowCompat
{
static final e a = new c();
static
{
int i = Build.VERSION.SDK_INT;
if (i >= 23)
{
a = new b();
return;
}
if (i >= 21)
{
a = new a();
return;
}
if (i >= 19)
{
a = new d();
return;
}
}
public static boolean getOverlapAnchor(PopupWindow paramPopupWindow)
{
return a.a(paramPopupWindow);
}
public static int getWindowLayoutType(PopupWindow paramPopupWindow)
{
return a.b(paramPopupWindow);
}
public static void setOverlapAnchor(PopupWindow paramPopupWindow, boolean paramBoolean)
{
a.a(paramPopupWindow, paramBoolean);
}
public static void setWindowLayoutType(PopupWindow paramPopupWindow, int paramInt)
{
a.a(paramPopupWindow, paramInt);
}
public static void showAsDropDown(PopupWindow paramPopupWindow, View paramView, int paramInt1, int paramInt2, int paramInt3)
{
a.a(paramPopupWindow, paramView, paramInt1, paramInt2, paramInt3);
}
static class a
extends PopupWindowCompat.d
{
public void a(PopupWindow paramPopupWindow, boolean paramBoolean)
{
ez.a(paramPopupWindow, paramBoolean);
}
public boolean a(PopupWindow paramPopupWindow)
{
return ez.a(paramPopupWindow);
}
}
static final class b
extends PopupWindowCompat.a
{
public final void a(PopupWindow paramPopupWindow, int paramInt)
{
paramPopupWindow.setWindowLayoutType(paramInt);
}
public final void a(PopupWindow paramPopupWindow, boolean paramBoolean)
{
paramPopupWindow.setOverlapAnchor(paramBoolean);
}
public final boolean a(PopupWindow paramPopupWindow)
{
return paramPopupWindow.getOverlapAnchor();
}
public final int b(PopupWindow paramPopupWindow)
{
return paramPopupWindow.getWindowLayoutType();
}
}
static class c
implements PopupWindowCompat.e
{
private static Method a;
private static boolean b;
private static Method c;
private static boolean d;
public void a(PopupWindow paramPopupWindow, int paramInt)
{
if (!b) {}
try
{
Method localMethod = PopupWindow.class.getDeclaredMethod("setWindowLayoutType", new Class[] { Integer.TYPE });
a = localMethod;
localMethod.setAccessible(true);
b = true;
if (a != null) {}
try
{
a.invoke(paramPopupWindow, new Object[] { Integer.valueOf(paramInt) });
return;
}
catch (Exception paramPopupWindow) {}
}
catch (Exception localException)
{
for (;;) {}
}
}
public void a(PopupWindow paramPopupWindow, View paramView, int paramInt1, int paramInt2, int paramInt3)
{
int i = paramInt1;
if ((GravityCompat.getAbsoluteGravity(paramInt3, ViewCompat.getLayoutDirection(paramView)) & 0x7) == 5) {
i = paramInt1 - (paramPopupWindow.getWidth() - paramView.getWidth());
}
paramPopupWindow.showAsDropDown(paramView, i, paramInt2);
}
public void a(PopupWindow paramPopupWindow, boolean paramBoolean) {}
public boolean a(PopupWindow paramPopupWindow)
{
return false;
}
public int b(PopupWindow paramPopupWindow)
{
if (!d) {}
try
{
Method localMethod = PopupWindow.class.getDeclaredMethod("getWindowLayoutType", new Class[0]);
c = localMethod;
localMethod.setAccessible(true);
d = true;
if (c != null) {
try
{
int i = ((Integer)c.invoke(paramPopupWindow, new Object[0])).intValue();
return i;
}
catch (Exception paramPopupWindow) {}
}
return 0;
}
catch (Exception localException)
{
for (;;) {}
}
}
}
static class d
extends PopupWindowCompat.c
{
public final void a(PopupWindow paramPopupWindow, View paramView, int paramInt1, int paramInt2, int paramInt3)
{
paramPopupWindow.showAsDropDown(paramView, paramInt1, paramInt2, paramInt3);
}
}
static abstract interface e
{
public abstract void a(PopupWindow paramPopupWindow, int paramInt);
public abstract void a(PopupWindow paramPopupWindow, View paramView, int paramInt1, int paramInt2, int paramInt3);
public abstract void a(PopupWindow paramPopupWindow, boolean paramBoolean);
public abstract boolean a(PopupWindow paramPopupWindow);
public abstract int b(PopupWindow paramPopupWindow);
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/android/support/v4/widget/PopupWindowCompat.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/