ThemedSpinnerAdapter.java
1.72 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
package android.support.v7.widget;
import android.content.Context;
import android.content.res.Resources.Theme;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.view.ContextThemeWrapper;
import android.view.LayoutInflater;
import android.widget.SpinnerAdapter;
public abstract interface ThemedSpinnerAdapter
extends SpinnerAdapter
{
@Nullable
public abstract Resources.Theme getDropDownViewTheme();
public abstract void setDropDownViewTheme(@Nullable Resources.Theme paramTheme);
public static final class Helper
{
private final Context a;
private final LayoutInflater b;
private LayoutInflater c;
public Helper(@NonNull Context paramContext)
{
this.a = paramContext;
this.b = LayoutInflater.from(paramContext);
}
@NonNull
public final LayoutInflater getDropDownViewInflater()
{
if (this.c != null) {
return this.c;
}
return this.b;
}
@Nullable
public final Resources.Theme getDropDownViewTheme()
{
if (this.c == null) {
return null;
}
return this.c.getContext().getTheme();
}
public final void setDropDownViewTheme(@Nullable Resources.Theme paramTheme)
{
if (paramTheme == null)
{
this.c = null;
return;
}
if (paramTheme == this.a.getTheme())
{
this.c = this.b;
return;
}
this.c = LayoutInflater.from(new ContextThemeWrapper(this.a, paramTheme));
}
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/android/support/v7/widget/ThemedSpinnerAdapter.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/