FormField.java
1.82 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
package com.bitstrips.imoji.ui.views;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.drawable.Drawable;
import android.text.SpannableString;
import android.text.TextUtils;
import android.util.AttributeSet;
import com.bitstrips.imoji.ui.BmTypefaceSpan;
public class FormField
extends BmEditText
{
private static final int[] a = { 2130772363 };
private static final int[] b = { 2130772364 };
private boolean c = false;
public FormField(Context paramContext, AttributeSet paramAttributeSet)
{
super(paramContext, paramAttributeSet);
}
public boolean isValid()
{
return this.c;
}
protected int[] onCreateDrawableState(int paramInt)
{
int[] arrayOfInt = super.onCreateDrawableState(paramInt + 2);
if (this.c) {
mergeDrawableStates(arrayOfInt, a);
}
if (TextUtils.isEmpty(getText())) {
mergeDrawableStates(arrayOfInt, b);
}
return arrayOfInt;
}
public void setError(CharSequence paramCharSequence)
{
Object localObject = paramCharSequence;
if (paramCharSequence != null)
{
localObject = new SpannableString(paramCharSequence);
((SpannableString)localObject).setSpan(new BmTypefaceSpan(getTypeface()), 0, paramCharSequence.length(), 33);
}
super.setError((CharSequence)localObject);
paramCharSequence = getCompoundDrawables();
localObject = getResources().getDrawable(2130837721);
setCompoundDrawables(paramCharSequence[0], paramCharSequence[1], (Drawable)localObject, paramCharSequence[3]);
}
public void setValid(boolean paramBoolean)
{
this.c = paramBoolean;
refreshDrawableState();
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/com/bitstrips/imoji/ui/views/FormField.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/