酷狗概念版 v2.5.5版本的 MD5 值为:782d327088fca4e58310f35a56f41319

以下内容为反编译后的 c.java 源代码,内容仅作参考


package com.kugou.android.netmusic.radio.g;

import android.view.View;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.kugou.android.app.flexowebview.KugouWebUtils;
import com.kugou.android.audiobook.ProgramNavFragment;
import com.kugou.android.audiobook.ProgramTagsFragment;
import com.kugou.android.audiobook.asset.MineProgramAssetfragment;
import com.kugou.android.audiobook.widget.HeaderSkinIcon;
import com.kugou.android.launcher.g;
import com.kugou.android.lite.R;
import com.kugou.android.netmusic.radio.RadioFMFragment;
import com.kugou.common.apm.sdk.f;
import com.kugou.common.app.KGCommonApplication;
import com.kugou.common.config.ConfigKey;
import com.kugou.common.utils.as;
import com.kugou.common.utils.bc;
import com.kugou.common.utils.br;
import com.kugou.common.widget.pressedLayout.KGPressedTransLinearLayout;
import com.kugou.framework.service.util.BackgroundServiceUtil;

public class c extends b {

    private View f36950c;

    ConfigKey f36951d;

    private View f36952e;
    private View f;
    private View g;
    private View h;
    private View i;
    private ProgramNavFragment j;
    private View k;
    private boolean l;
    private Runnable m;

    public c(View view, ProgramNavFragment programNavFragment) {
        super(view, programNavFragment);
        this.l = false;
        this.f36951d = new ConfigKey("listen.switchparam.audio_radio_fm_entry");
        this.m = new Runnable() {
            @Override
            public void run() {
                if (c.this.a()) {
                    c.this.k.setVisibility(0);
                    ((RelativeLayout.LayoutParams) c.this.k.getLayoutParams()).setMargins(0, 0, c.this.itemView.findViewById(R.id.f51).getWidth() + br.a(KGCommonApplication.getContext(), 6.0f), 0);
                    return;
                }
                c.this.k.setVisibility(8);
            }
        };
        this.f36950c = view;
        this.j = programNavFragment;
        b();
        try {
            e();
        } catch (Exception e2) {
            e2.printStackTrace();
            as.e(e2);
        }
        c();
        view.postDelayed(this.m, 32L);
    }

    private void b() {
        this.f36952e = this.f36950c.findViewById(R.id.f4r);
        this.g = this.f36950c.findViewById(R.id.f4u);
        this.h = this.f36950c.findViewById(R.id.f4t);
        this.i = this.f36950c.findViewById(R.id.f4z);
        this.f = this.f36950c.findViewById(R.id.f4x);
        this.k = this.f36950c.findViewById(R.id.f52);
        this.f36952e.setOnClickListener(this);
        this.g.setOnClickListener(this);
        this.h.setOnClickListener(this);
        this.f.setOnClickListener(this);
        this.i.setOnClickListener(this);
    }

    private void e() {
        this.l = f();
        if (this.l) {
            this.f36950c.findViewById(R.id.f4w).setVisibility(0);
            this.f36950c.findViewById(R.id.f4x).setVisibility(0);
            g();
        }
    }

    private void g() {
        a((KGPressedTransLinearLayout) this.f36952e);
        a((KGPressedTransLinearLayout) this.g);
        a((KGPressedTransLinearLayout) this.h);
        a((KGPressedTransLinearLayout) this.i);
        a((KGPressedTransLinearLayout) this.f);
    }

    private void a(KGPressedTransLinearLayout kGPressedTransLinearLayout) {
        HeaderSkinIcon headerSkinIcon = (HeaderSkinIcon) kGPressedTransLinearLayout.getChildAt(0);
        TextView textView = (TextView) kGPressedTransLinearLayout.getChildAt(1);
        LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) kGPressedTransLinearLayout.getLayoutParams();
        layoutParams.width = br.c(46.0f);
        kGPressedTransLinearLayout.setLayoutParams(layoutParams);
        LinearLayout.LayoutParams layoutParams2 = (LinearLayout.LayoutParams) headerSkinIcon.getLayoutParams();
        layoutParams2.width = br.c(42.0f);
        layoutParams2.topMargin = br.c(17.0f);
        layoutParams2.height = layoutParams2.width;
        headerSkinIcon.setLayoutParams(layoutParams2);
        textView.setTextSize(1, 11.0f);
    }

    private boolean f() {
        return com.kugou.common.config.c.a().c(com.kugou.common.config.a.kT) && com.kugou.common.config.c.a().c(this.f36951d);
    }

    private void c() {
        ((HeaderSkinIcon) this.f36952e.findViewById(R.id.f4s)).setIconItem(new g.a("电台分类", R.drawable.b3g, R.color.g7, R.color.g8));
        ((HeaderSkinIcon) this.g.findViewById(R.id.f4v)).setIconItem(new g.a("精品专区", R.drawable.b3j, R.color.g1, R.color.g2));
        ((HeaderSkinIcon) this.h.findViewById(R.id.f3w)).setIconItem(new g.a("听书排行", R.drawable.b3i, R.color.gq, R.color.gr));
        ((HeaderSkinIcon) this.i.findViewById(R.id.f50)).setIconItem(new g.a("我的书架", R.drawable.b3h, R.color.go, R.color.gp));
        if (this.l) {
            ((HeaderSkinIcon) this.f.findViewById(R.id.f4y)).setIconItem(new g.a("调频FM", R.drawable.c8r, R.color.ge, R.color.gf));
        }
    }

    public boolean a() {
        return com.kugou.android.mymusic.program.c.a().d();
    }

    public void d() {
        this.k.setVisibility(8);
        com.kugou.android.mymusic.program.c.a().c(false);
    }

    @Override
    public void a(com.kugou.android.netmusic.radio.e.a aVar, int i) {
        super.a((c) aVar, i);
    }

    @Override
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.f4r:
                if (bc.u(this.f36948a)) {
                    l();
                    return;
                }
                return;
            case R.id.f4s:
            case R.id.f4v:
            case R.id.f4w:
            case R.id.f4y:
            default:
                return;
            case R.id.f4t:
                if (bc.u(this.f36948a)) {
                    n();
                    return;
                }
                return;
            case R.id.f4u:
                if (bc.u(this.f36948a)) {
                    m();
                    return;
                }
                return;
            case R.id.f4x:
                i();
                return;
            case R.id.f4z:
                o();
                d();
                return;
        }
    }

    private String h() {
        return this.j.getSourcePath();
    }

    private void l() {
        ProgramNavFragment programNavFragment = this.j;
        if (programNavFragment != null) {
            ProgramTagsFragment.a(programNavFragment.n());
        }
        this.f36949b.startFragment(ProgramTagsFragment.class, null);
        com.kugou.common.statistics.e.a.a(new com.kugou.common.statistics.song.a.a(KGCommonApplication.getContext(), com.kugou.framework.statistics.easytrace.c.cD).setFo(h()));
    }

    private void m() {
        KugouWebUtils.openWebFragment("精品专区", "https://m2.service.kugou.com/yueku/category/html/index.html?areaid=32");
        com.kugou.common.statistics.e.a.a(new com.kugou.common.statistics.song.a.a(KGCommonApplication.getContext(), com.kugou.framework.statistics.easytrace.c.cA).setFo(h()));
    }

    private void n() {
        KugouWebUtils.openWebFragment("听书排行", com.kugou.common.config.c.a().b(com.kugou.android.app.a.a.CG));
        com.kugou.common.statistics.e.a.a(new com.kugou.common.statistics.song.a.a(KGCommonApplication.getContext(), com.kugou.framework.statistics.easytrace.c.cB).setFo(h()));
    }

    private void o() {
        this.f36949b.startFragment(MineProgramAssetfragment.class, null);
        com.kugou.common.statistics.e.a.a(new com.kugou.common.statistics.song.a.a(KGCommonApplication.getContext(), com.kugou.framework.statistics.easytrace.c.cC).setFo(h()));
    }

    private void i() {
        BackgroundServiceUtil.trace(new com.kugou.common.statistics.song.a.a(KGCommonApplication.getContext(), com.kugou.framework.statistics.easytrace.a.ani).setSvar1("调频FM"));
        com.kugou.common.q.c.b().q(false);
        f.b().a("41014");
        this.f36949b.startFragment(RadioFMFragment.class, null);
    }
}