/
f.java
144 lines (130 loc) · 3.33 KB
/
f.java
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
package com.yelp.android.ui.activities;
import android.content.Context;
import android.content.res.Resources;
import android.content.res.Resources.NotFoundException;
import android.graphics.PorterDuff.Mode;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
import com.yelp.android.serializable.Badge;
import com.yelp.android.ui.util.cp;
import com.yelp.android.ui.util.j;
import com.yelp.android.ui.widgets.WebImageView;
import java.util.ArrayList;
class f
extends BaseAdapter
implements j
{
LayoutInflater a;
ArrayList<Badge> b;
boolean c;
private f(Context paramContext, ArrayList<Badge> paramArrayList, boolean paramBoolean)
{
a = LayoutInflater.from(paramContext);
b = paramArrayList;
c = paramBoolean;
}
private void a(TextView paramTextView)
{
a(paramTextView, 2130837632, 2131165806, 2130837633);
}
private void a(TextView paramTextView, int paramInt1, int paramInt2, int paramInt3)
{
try
{
paramTextView.setBackgroundDrawable(paramTextView.getContext().getResources().getDrawable(paramInt1));
paramTextView.setText("");
paramTextView.setVisibility(0);
return;
}
catch (Resources.NotFoundException localNotFoundException)
{
for (;;)
{
paramTextView.setText(paramInt2);
paramTextView.setBackgroundResource(paramInt3);
}
}
}
private void b(TextView paramTextView)
{
a(paramTextView, 2130837638, 2131165281, 2130837639);
}
public Badge a(int paramInt)
{
return (Badge)b.get(paramInt);
}
public boolean areAllItemsEnabled()
{
return false;
}
public void clear()
{
b.clear();
notifyDataSetInvalidated();
}
public int getCount()
{
return b.size();
}
public long getItemId(int paramInt)
{
return paramInt;
}
public View getView(int paramInt, View paramView, ViewGroup paramViewGroup)
{
View localView = paramView;
if (paramView == null)
{
localView = a.inflate(2130903126, paramViewGroup, false);
localView.setTag(new g(localView));
}
paramView = (g)localView.getTag();
Badge localBadge = (Badge)b.get(paramInt);
c.setText(localBadge.getTitle());
if (localBadge.isNew()) {
b(b);
}
while (!localBadge.isAssigned())
{
a.setImageResource(2130838524);
return localView;
if (localBadge.getExpirePercent() > 0.0F) {
a(b);
} else {
b.setVisibility(8);
}
}
if (!cp.a(paramViewGroup.getContext(), a, localBadge.getImageSmallPath()))
{
paramViewGroup = localBadge.getImageSmallUrl();
if (paramViewGroup == null) {
break label202;
}
a.setImageUrl(paramViewGroup);
}
while (localBadge.getExpirePercent() > 0.0F)
{
a.setColorFilter(localBadge.getExpireFadeTint(), PorterDuff.Mode.SRC_ATOP);
return localView;
label202:
a.setImageResource(2130838524);
}
a.setColorFilter(null);
return localView;
}
public boolean isEnabled(int paramInt)
{
if (c) {
return false;
}
return ((Badge)b.get(paramInt)).isAssigned() == true;
}
}
/* Location:
* Qualified Name: com.yelp.android.ui.activities.f
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/