酷狗概念版 v2.5.5版本的 MD5 值为:782d327088fca4e58310f35a56f41319
以下内容为反编译后的 e.java 源代码,内容仅作参考
package com.kugou.android.netmusic.bills.a;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.LinearLayout;
import android.widget.ListAdapter;
import android.widget.TextView;
import com.kugou.android.app.flexowebview.KGFelxoWebFragment;
import com.kugou.android.common.delegate.DelegateFragment;
import com.kugou.android.lite.R;
import com.kugou.android.netmusic.bills.SingerDetailFragment;
import com.kugou.android.netmusic.bills.SingerDetailRichFansFragment;
import com.kugou.android.netmusic.bills.SingerVideoListFragment;
import com.kugou.android.netmusic.bills.a.m;
import com.kugou.android.netmusic.bills.widget.HorizontalListView;
import com.kugou.android.netmusic.bills.widget.ListViewForScrollView;
import com.kugou.android.netmusic.discovery.flow.zone.model.VideoBean;
import com.kugou.android.netmusic.mv.ExpandableTextView;
import com.kugou.common.utils.as;
import com.kugou.common.utils.br;
import com.kugou.common.utils.bv;
import com.kugou.framework.netmusic.bills.entity.SingerInfo;
import com.kugou.framework.service.util.BackgroundServiceUtil;
import java.util.ArrayList;
public class e extends com.kugou.android.common.a.c<com.kugou.android.netmusic.bills.a> implements View.OnClickListener {
private DelegateFragment f32419a;
private LayoutInflater f32420b;
private ExpandableTextView f32421c;
private View f32422d;
private ListViewForScrollView f32423e;
private HorizontalListView f;
private TextView g;
private a h;
private SingerDetailFragment i;
private c j;
private l k;
private ExpandableTextView.b l;
private boolean m;
private long n;
private boolean o = true;
private View p;
private int q;
b r;
public interface a {
void a(com.kugou.framework.netmusic.bills.entity.b bVar);
void a(ArrayList<com.kugou.framework.netmusic.bills.entity.f> arrayList, com.kugou.framework.netmusic.bills.entity.f fVar);
}
public interface b {
void a(VideoBean videoBean, int i);
}
private boolean c() {
return getDatas() != null && getDatas().size() >= 1 && getDatas().get(0).f == 1;
}
public e(DelegateFragment delegateFragment, a aVar) {
this.f32419a = delegateFragment;
this.h = aVar;
this.f32420b = LayoutInflater.from(this.f32419a.aN_());
DelegateFragment delegateFragment2 = this.f32419a;
if (delegateFragment2 instanceof SingerDetailFragment) {
this.i = (SingerDetailFragment) delegateFragment2;
}
}
public void a(ExpandableTextView.b bVar) {
this.l = bVar;
}
@Override
public View getView(int i, View view, ViewGroup viewGroup) {
boolean z;
View findViewById;
SingerDetailFragment singerDetailFragment;
if (view == null || ((singerDetailFragment = this.i) != null && singerDetailFragment.f32186a)) {
view = this.f32420b.inflate(R.layout.b1j, (ViewGroup) null);
z = true;
} else {
z = false;
}
this.f32421c = (ExpandableTextView) view.findViewById(R.id.w7);
this.f32421c.setOnExpandStateChangeListener(new ExpandableTextView.b() {
@Override
public void a(View view2) {
if (e.this.l != null) {
e.this.l.a(view2);
}
}
@Override
public void b(View view2) {
if (e.this.l != null) {
e.this.l.b(view2);
}
}
});
this.f32422d = view.findViewById(R.id.b_b);
this.f32422d.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view2) {
e.this.f32421c.onClick(null);
}
});
this.g = (TextView) view.findViewById(R.id.c1m);
this.f32423e = (ListViewForScrollView) view.findViewById(R.id.c1l);
this.f32423e.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> adapterView, View view2, int i2, long j) {
if (e.this.h != null) {
e.this.h.a(e.this.k.getDatas(), e.this.k.getItem(i2));
}
BackgroundServiceUtil.trace(new com.kugou.framework.statistics.easytrace.task.d(e.this.f32419a.aN_(), com.kugou.framework.statistics.easytrace.a.fF));
}
});
this.f = (HorizontalListView) view.findViewById(R.id.bx4);
this.f.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> adapterView, View view2, int i2, long j) {
if (e.this.h != null) {
e.this.h.a(e.this.j.getItem(i2));
}
BackgroundServiceUtil.trace(new com.kugou.framework.statistics.easytrace.task.d(e.this.f32419a.aN_(), com.kugou.framework.statistics.easytrace.a.fG));
}
});
if (this.mDatas != null) {
final com.kugou.android.netmusic.bills.a item = getItem(i);
ArrayList<com.kugou.framework.netmusic.bills.entity.b> arrayList = item.f32368d;
ArrayList<com.kugou.framework.netmusic.bills.entity.f> arrayList2 = item.f32367c;
ArrayList<com.kugou.framework.netmusic.bills.entity.e> arrayList3 = item.f32369e;
if (arrayList2 != null && arrayList2.size() > 0) {
this.k = new l(this.f32419a);
this.k.setData(arrayList2);
this.f32423e.setAdapter((ListAdapter) this.k);
this.g.setText(this.f32419a.getResources().getString(R.string.b91, item.f32365a));
view.findViewById(R.id.c1j).setVisibility(8);
if (!this.m) {
this.m = true;
this.f32421c.setExpanded(false);
}
} else {
view.findViewById(R.id.c1j).setVisibility(8);
if (!this.m) {
this.f32421c.setExpanded(true);
}
}
if (arrayList != null && arrayList.size() > 0) {
this.j = new c(this.f32419a);
this.j.setData(arrayList);
this.f.setAdapter((ListAdapter) this.j);
view.findViewById(R.id.bx2).setVisibility(0);
} else {
view.findViewById(R.id.bx2).setVisibility(8);
}
if (c()) {
this.f32422d.setVisibility(8);
this.f32421c.a(false);
this.p = view.findViewById(R.id.brg);
this.p.setVisibility(0);
this.f32421c.setMaxLines(7);
this.p.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view2) {
e.this.b(item.h);
}
});
} else {
this.f32422d.setVisibility(0);
View view2 = this.p;
if (view2 != null) {
view2.setVisibility(8);
this.f32421c.setMaxLines(Integer.MAX_VALUE);
}
}
String str = item.g;
if (TextUtils.isEmpty(str)) {
if (TextUtils.isEmpty(item.f32366b)) {
this.f32421c.setExpanded(true);
this.f32422d.setVisibility(8);
str = "该歌手暂无介绍资料";
} else {
str = item.f32366b;
this.f32421c.setExpanded(true);
}
}
this.f32421c.setText(str);
if (c()) {
this.f32421c.setExpanded(true);
}
ArrayList<com.kugou.android.concerts.entity.b> arrayList4 = ((com.kugou.android.netmusic.bills.a) this.mDatas.get(0)).i;
if (arrayList4 != null) {
arrayList4.size();
}
ArrayList<VideoBean> arrayList5 = ((com.kugou.android.netmusic.bills.a) this.mDatas.get(0)).j;
LinearLayout linearLayout = (LinearLayout) view.findViewById(R.id.gcg);
if (arrayList5 != null && arrayList5.size() >= 2) {
linearLayout.setVisibility(0);
LinearLayout linearLayout2 = (LinearLayout) view.findViewById(R.id.gci);
if (z) {
m mVar = new m(this.f32419a.aN_());
mVar.a(linearLayout2);
linearLayout2.setTag(R.id.gci, mVar);
}
m mVar2 = (m) linearLayout2.getTag(R.id.gci);
if (mVar2 != null) {
mVar2.a(arrayList5);
mVar2.a();
mVar2.a(new m.a() {
@Override
public void a(VideoBean videoBean, int i2) {
if (e.this.r != null) {
e.this.r.a(videoBean, i2);
}
}
});
}
view.findViewById(R.id.gch).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view3) {
Bundle bundle = new Bundle();
SingerInfo singerInfo = new SingerInfo();
singerInfo.f60224a = item.h;
singerInfo.f60225b = item.f32365a;
bundle.putParcelable("singer_info", singerInfo);
e.this.i.startFragment(SingerVideoListFragment.class, bundle);
BackgroundServiceUtil.trace(new com.kugou.framework.statistics.easytrace.task.d(e.this.f32419a.aN_(), com.kugou.framework.statistics.easytrace.a.ajM).setSource(e.this.f32419a.getSourcePath()));
}
});
} else {
linearLayout.setVisibility(8);
}
}
if (view.findViewById(R.id.c1j).getVisibility() == 8 && view.findViewById(R.id.bx2).getVisibility() == 8 && (findViewById = view.findViewById(R.id.c4l)) != null) {
findViewById.setVisibility(8);
}
return view;
}
public void b(long j) {
Bundle bundle = new Bundle();
bundle.putString("web_url", "https://m3ws.kugou.com/webapp/singerInfo/info.html?id=" + j);
bundle.putString("web_title", "歌手详情");
this.f32419a.startFragment(KGFelxoWebFragment.class, bundle);
d();
}
private void d() {
ArrayList<com.kugou.android.netmusic.bills.a> datas = getDatas();
if (datas == null || datas.size() < 1) {
return;
}
BackgroundServiceUtil.trace(new com.kugou.framework.statistics.easytrace.task.d(this.f32419a.aN_(), com.kugou.framework.statistics.easytrace.a.Xy).setSvar1(datas.get(0).f32365a));
}
@Override
public int getCount() {
if (this.mDatas == null || this.mDatas.size() <= 0) {
return 0;
}
return this.mDatas.size();
}
@Override
public void onClick(View view) {
int id = view.getId();
if (id == R.id.br1) {
if (as.f54365e) {
as.c("cwt yueku fans 点击查看更多土豪粉丝");
}
if (e()) {
Bundle bundle = new Bundle(1);
bundle.putLong("singer_detail_rich_fans_singer_id", this.n);
this.f32419a.startFragment(SingerDetailRichFansFragment.class, bundle);
BackgroundServiceUtil.trace(new com.kugou.framework.statistics.easytrace.task.d(this.f32419a.aN_(), com.kugou.framework.statistics.easytrace.a.fJ).setSource("歌手详情页-土豪粉丝榜页"));
return;
}
return;
}
if (id != R.id.br6) {
return;
}
com.kugou.common.dialog8.popdialogs.b bVar = new com.kugou.common.dialog8.popdialogs.b(this.f32419a.aN_());
bVar.setMessage("购买过该歌手付费单曲、专辑,排名前50的用户");
bVar.setTitle("土豪粉丝榜");
bVar.setTitleVisible(true);
bVar.setPositiveHint("我知道了");
bVar.setButtonMode(1);
bVar.show();
}
public void a(long j) {
this.n = j;
}
public void a(int i) {
this.q = i;
}
private boolean e() {
if (!br.Q(this.f32419a.aN_())) {
this.f32419a.a(new Runnable() {
@Override
public void run() {
bv.b(e.this.f32419a.aN_(), R.string.av3);
}
});
return false;
}
if (com.kugou.common.environment.a.o()) {
return true;
}
br.T(this.f32419a.aN_());
return false;
}
public void a(b bVar) {
this.r = bVar;
}
}