ContentLoadingProgressBar.java
2 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
package android.support.v4.widget;
import android.content.Context;
import android.util.AttributeSet;
import android.widget.ProgressBar;
public class ContentLoadingProgressBar
extends ProgressBar
{
long a = -1L;
boolean b = false;
boolean c = false;
boolean d = false;
private final Runnable e = new Runnable()
{
public final void run()
{
ContentLoadingProgressBar.this.b = false;
ContentLoadingProgressBar.this.a = -1L;
ContentLoadingProgressBar.this.setVisibility(8);
}
};
private final Runnable f = new Runnable()
{
public final void run()
{
ContentLoadingProgressBar.this.c = false;
if (!ContentLoadingProgressBar.this.d)
{
ContentLoadingProgressBar.this.a = System.currentTimeMillis();
ContentLoadingProgressBar.this.setVisibility(0);
}
}
};
public ContentLoadingProgressBar(Context paramContext)
{
this(paramContext, null);
}
public ContentLoadingProgressBar(Context paramContext, AttributeSet paramAttributeSet)
{
super(paramContext, paramAttributeSet, 0);
}
private void a()
{
removeCallbacks(this.e);
removeCallbacks(this.f);
}
public void hide()
{
this.d = true;
removeCallbacks(this.f);
long l = System.currentTimeMillis() - this.a;
if ((l >= 500L) || (this.a == -1L)) {
setVisibility(8);
}
while (this.b) {
return;
}
postDelayed(this.e, 500L - l);
this.b = true;
}
public void onAttachedToWindow()
{
super.onAttachedToWindow();
a();
}
public void onDetachedFromWindow()
{
super.onDetachedFromWindow();
a();
}
public void show()
{
this.a = -1L;
this.d = false;
removeCallbacks(this.e);
if (!this.c)
{
postDelayed(this.f, 500L);
this.c = true;
}
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/android/support/v4/widget/ContentLoadingProgressBar.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/