gh.java
7.77 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
199
200
201
202
203
204
205
import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.drawable.Drawable;
import android.os.Build.VERSION;
import android.support.annotation.RequiresApi;
import android.support.v7.appcompat.R.styleable;
import android.support.v7.text.AllCapsTransformationMethod;
import android.support.v7.widget.AppCompatDrawableManager;
import android.support.v7.widget.TintTypedArray;
import android.text.method.PasswordTransformationMethod;
import android.util.AttributeSet;
import android.widget.TextView;
@TargetApi(9)
@RequiresApi(9)
public class gh
{
final TextView a;
private ha b;
private ha c;
private ha d;
private ha e;
gh(TextView paramTextView)
{
this.a = paramTextView;
}
public static gh a(TextView paramTextView)
{
if (Build.VERSION.SDK_INT >= 17) {
return new gi(paramTextView);
}
return new gh(paramTextView);
}
protected static ha a(Context paramContext, AppCompatDrawableManager paramAppCompatDrawableManager, int paramInt)
{
paramContext = paramAppCompatDrawableManager.b(paramContext, paramInt);
if (paramContext != null)
{
paramAppCompatDrawableManager = new ha();
paramAppCompatDrawableManager.d = true;
paramAppCompatDrawableManager.a = paramContext;
return paramAppCompatDrawableManager;
}
return null;
}
public void a()
{
if ((this.b != null) || (this.c != null) || (this.d != null) || (this.e != null))
{
Drawable[] arrayOfDrawable = this.a.getCompoundDrawables();
a(arrayOfDrawable[0], this.b);
a(arrayOfDrawable[1], this.c);
a(arrayOfDrawable[2], this.d);
a(arrayOfDrawable[3], this.e);
}
}
public final void a(Context paramContext, int paramInt)
{
paramContext = TintTypedArray.obtainStyledAttributes(paramContext, paramInt, R.styleable.TextAppearance);
if (paramContext.hasValue(R.styleable.TextAppearance_textAllCaps)) {
a(paramContext.getBoolean(R.styleable.TextAppearance_textAllCaps, false));
}
if ((Build.VERSION.SDK_INT < 23) && (paramContext.hasValue(R.styleable.TextAppearance_android_textColor)))
{
ColorStateList localColorStateList = paramContext.getColorStateList(R.styleable.TextAppearance_android_textColor);
if (localColorStateList != null) {
this.a.setTextColor(localColorStateList);
}
}
paramContext.recycle();
}
final void a(Drawable paramDrawable, ha paramha)
{
if ((paramDrawable != null) && (paramha != null)) {
AppCompatDrawableManager.a(paramDrawable, paramha, this.a.getDrawableState());
}
}
public void a(AttributeSet paramAttributeSet, int paramInt)
{
Object localObject3 = null;
Object localObject2 = null;
Object localObject4 = this.a.getContext();
Object localObject1 = AppCompatDrawableManager.get();
TintTypedArray localTintTypedArray = TintTypedArray.obtainStyledAttributes((Context)localObject4, paramAttributeSet, R.styleable.AppCompatTextHelper, paramInt, 0);
int i = localTintTypedArray.getResourceId(R.styleable.AppCompatTextHelper_android_textAppearance, -1);
if (localTintTypedArray.hasValue(R.styleable.AppCompatTextHelper_android_drawableLeft)) {
this.b = a((Context)localObject4, (AppCompatDrawableManager)localObject1, localTintTypedArray.getResourceId(R.styleable.AppCompatTextHelper_android_drawableLeft, 0));
}
if (localTintTypedArray.hasValue(R.styleable.AppCompatTextHelper_android_drawableTop)) {
this.c = a((Context)localObject4, (AppCompatDrawableManager)localObject1, localTintTypedArray.getResourceId(R.styleable.AppCompatTextHelper_android_drawableTop, 0));
}
if (localTintTypedArray.hasValue(R.styleable.AppCompatTextHelper_android_drawableRight)) {
this.d = a((Context)localObject4, (AppCompatDrawableManager)localObject1, localTintTypedArray.getResourceId(R.styleable.AppCompatTextHelper_android_drawableRight, 0));
}
if (localTintTypedArray.hasValue(R.styleable.AppCompatTextHelper_android_drawableBottom)) {
this.e = a((Context)localObject4, (AppCompatDrawableManager)localObject1, localTintTypedArray.getResourceId(R.styleable.AppCompatTextHelper_android_drawableBottom, 0));
}
localTintTypedArray.recycle();
boolean bool3 = this.a.getTransformationMethod() instanceof PasswordTransformationMethod;
boolean bool1;
if (i != -1)
{
localTintTypedArray = TintTypedArray.obtainStyledAttributes((Context)localObject4, i, R.styleable.TextAppearance);
if ((!bool3) && (localTintTypedArray.hasValue(R.styleable.TextAppearance_textAllCaps)))
{
bool1 = localTintTypedArray.getBoolean(R.styleable.TextAppearance_textAllCaps, false);
i = 1;
if (Build.VERSION.SDK_INT < 23) {
if (localTintTypedArray.hasValue(R.styleable.TextAppearance_android_textColor))
{
localObject1 = localTintTypedArray.getColorStateList(R.styleable.TextAppearance_android_textColor);
label258:
localObject3 = localObject1;
if (localTintTypedArray.hasValue(R.styleable.TextAppearance_android_textColorHint))
{
localObject2 = localTintTypedArray.getColorStateList(R.styleable.TextAppearance_android_textColorHint);
localObject3 = localObject1;
}
label287:
localTintTypedArray.recycle();
localObject1 = localObject3;
}
}
}
}
for (;;)
{
localObject4 = TintTypedArray.obtainStyledAttributes((Context)localObject4, paramAttributeSet, R.styleable.TextAppearance, paramInt, 0);
paramInt = i;
boolean bool2 = bool1;
if (!bool3)
{
paramInt = i;
bool2 = bool1;
if (((TintTypedArray)localObject4).hasValue(R.styleable.TextAppearance_textAllCaps))
{
bool2 = ((TintTypedArray)localObject4).getBoolean(R.styleable.TextAppearance_textAllCaps, false);
paramInt = 1;
}
}
paramAttributeSet = (AttributeSet)localObject1;
localObject3 = localObject2;
if (Build.VERSION.SDK_INT < 23)
{
if (((TintTypedArray)localObject4).hasValue(R.styleable.TextAppearance_android_textColor)) {
localObject1 = ((TintTypedArray)localObject4).getColorStateList(R.styleable.TextAppearance_android_textColor);
}
paramAttributeSet = (AttributeSet)localObject1;
localObject3 = localObject2;
if (((TintTypedArray)localObject4).hasValue(R.styleable.TextAppearance_android_textColorHint))
{
localObject3 = ((TintTypedArray)localObject4).getColorStateList(R.styleable.TextAppearance_android_textColorHint);
paramAttributeSet = (AttributeSet)localObject1;
}
}
((TintTypedArray)localObject4).recycle();
if (paramAttributeSet != null) {
this.a.setTextColor(paramAttributeSet);
}
if (localObject3 != null) {
this.a.setHintTextColor((ColorStateList)localObject3);
}
if ((!bool3) && (paramInt != 0)) {
a(bool2);
}
return;
localObject1 = null;
break label258;
localObject3 = null;
break label287;
i = 0;
bool1 = false;
break;
localObject1 = null;
i = 0;
bool1 = false;
localObject2 = localObject3;
}
}
public final void a(boolean paramBoolean)
{
TextView localTextView = this.a;
if (paramBoolean) {}
for (AllCapsTransformationMethod localAllCapsTransformationMethod = new AllCapsTransformationMethod(this.a.getContext());; localAllCapsTransformationMethod = null)
{
localTextView.setTransformationMethod(localAllCapsTransformationMethod);
return;
}
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/gh.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/