cu.java
1.48 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
import android.view.View;
import android.view.View.OnAttachStateChangeListener;
import android.view.ViewTreeObserver;
import android.view.ViewTreeObserver.OnPreDrawListener;
final class cu
implements View.OnAttachStateChangeListener, ViewTreeObserver.OnPreDrawListener
{
private final View a;
private ViewTreeObserver b;
private final Runnable c;
private cu(View paramView, Runnable paramRunnable)
{
this.a = paramView;
this.b = paramView.getViewTreeObserver();
this.c = paramRunnable;
}
public static cu a(View paramView, Runnable paramRunnable)
{
paramRunnable = new cu(paramView, paramRunnable);
paramView.getViewTreeObserver().addOnPreDrawListener(paramRunnable);
paramView.addOnAttachStateChangeListener(paramRunnable);
return paramRunnable;
}
private void a()
{
if (this.b.isAlive()) {
this.b.removeOnPreDrawListener(this);
}
for (;;)
{
this.a.removeOnAttachStateChangeListener(this);
return;
this.a.getViewTreeObserver().removeOnPreDrawListener(this);
}
}
public final boolean onPreDraw()
{
a();
this.c.run();
return true;
}
public final void onViewAttachedToWindow(View paramView)
{
this.b = paramView.getViewTreeObserver();
}
public final void onViewDetachedFromWindow(View paramView)
{
a();
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/cu.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/