ActionProvider.java
2.67 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
package android.support.v4.view;
import android.content.Context;
import android.support.annotation.RestrictTo;
import android.util.Log;
import android.view.MenuItem;
import android.view.SubMenu;
import android.view.View;
public abstract class ActionProvider
{
private final Context a;
private SubUiVisibilityListener b;
private VisibilityListener c;
public ActionProvider(Context paramContext)
{
this.a = paramContext;
}
public Context getContext()
{
return this.a;
}
public boolean hasSubMenu()
{
return false;
}
public boolean isVisible()
{
return true;
}
public abstract View onCreateActionView();
public View onCreateActionView(MenuItem paramMenuItem)
{
return onCreateActionView();
}
public boolean onPerformDefaultAction()
{
return false;
}
public void onPrepareSubMenu(SubMenu paramSubMenu) {}
public boolean overridesItemVisibility()
{
return false;
}
public void refreshVisibility()
{
if ((this.c != null) && (overridesItemVisibility())) {
this.c.onActionProviderVisibilityChanged(isVisible());
}
}
@RestrictTo({android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP})
public void reset()
{
this.c = null;
this.b = null;
}
@RestrictTo({android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP})
public void setSubUiVisibilityListener(SubUiVisibilityListener paramSubUiVisibilityListener)
{
this.b = paramSubUiVisibilityListener;
}
public void setVisibilityListener(VisibilityListener paramVisibilityListener)
{
if ((this.c != null) && (paramVisibilityListener != null)) {
Log.w("ActionProvider(support)", "setVisibilityListener: Setting a new ActionProvider.VisibilityListener when one is already set. Are you reusing this " + getClass().getSimpleName() + " instance while it is still in use somewhere else?");
}
this.c = paramVisibilityListener;
}
@RestrictTo({android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP})
public void subUiVisibilityChanged(boolean paramBoolean)
{
if (this.b != null) {
this.b.onSubUiVisibilityChanged(paramBoolean);
}
}
@RestrictTo({android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP})
public static abstract interface SubUiVisibilityListener
{
public abstract void onSubUiVisibilityChanged(boolean paramBoolean);
}
public static abstract interface VisibilityListener
{
public abstract void onActionProviderVisibilityChanged(boolean paramBoolean);
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/android/support/v4/view/ActionProvider.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/