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

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


package com.kugou.android.netmusic.search.presenter;

import android.content.Intent;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.view.View;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.kugou.android.app.NavigationUtils;
import com.kugou.android.app.flexowebview.KGFlexoWebActivity;
import com.kugou.android.lite.R;
import com.kugou.android.netmusic.search.SearchMainFragment;
import com.kugou.android.netmusic.search.f.e;
import com.kugou.common.statistics.song.a.p;
import com.kugou.framework.service.util.PlaybackServiceUtil;
import de.greenrobot.event.EventBus;

public class b implements View.OnClickListener {

    private com.kugou.android.netmusic.search.holder.a f37709a;

    private SearchMainFragment f37710b;

    private View f37711c;

    private View f37712d;

    public b(SearchMainFragment searchMainFragment, com.kugou.android.netmusic.search.holder.a aVar) {
        this.f37710b = searchMainFragment;
        this.f37709a = aVar;
    }

    public void a() {
        this.f37711c = this.f37709a.Y();
        this.f37709a.av().setOnClickListener(this);
        this.f37711c.setVisibility(4);
        TextView textView = (TextView) this.f37711c.findViewById(R.id.bv8);
        View findViewById = this.f37711c.findViewById(R.id.e0t);
        this.f37712d = this.f37711c.findViewById(R.id.g_6);
        findViewById.setOnClickListener(this);
        textView.setOnClickListener(this);
        ((TextView) this.f37711c.findViewById(R.id.g_7)).setOnClickListener(this);
        d();
    }

    public boolean b() {
        View view = this.f37711c;
        return view != null && view.getVisibility() == 0;
    }

    public void c() {
        if (PlaybackServiceUtil.B()) {
            b(this.f37709a.ar() ? this.f37709a.X() : this.f37709a.Y());
        }
    }

    private void b(View view) {
        RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) view.getLayoutParams();
        layoutParams.bottomMargin = this.f37710b.getResources().getDimensionPixelOffset(R.dimen.a20) + this.f37710b.getResources().getDimensionPixelOffset(R.dimen.rq);
        view.setLayoutParams(layoutParams);
    }

    @Override
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.bv8:
            case R.id.bzg:
                c(view);
                return;
            case R.id.e0t:
                h();
                return;
            case R.id.g_7:
                e();
                return;
            default:
                return;
        }
    }

    public void d() {
        Drawable background;
        View view = this.f37712d;
        if (view == null || (background = view.getBackground()) == null) {
            return;
        }
        background.setColorFilter(com.kugou.common.skinpro.d.b.b(com.kugou.common.skinpro.d.b.a().a(com.kugou.common.skinpro.shadowframe.c.TAB)));
    }

    public void e() {
        Intent intent = new Intent(this.f37710b.aN_(), (Class<?>) KGFlexoWebActivity.class);
        Bundle bundle = new Bundle();
        bundle.putString("web_title", "上传音乐");
        bundle.putString("web_url", "https://h5.kugou.com/apps/yinyueren/html/entry.html");
        bundle.putBoolean("extra_from_account_appeal", true);
        bundle.putBoolean("felxo_fragment_has_menu", false);
        bundle.putBoolean("felxo_fragment_has_title_menu", false);
        bundle.putBoolean("felxo_fragment_has_playing_bar", false);
        intent.putExtras(bundle);
        this.f37710b.aN_().startActivity(intent);
        com.kugou.common.statistics.e.a.a(new p(this.f37710b.aN_(), com.kugou.framework.statistics.easytrace.c.bF).a(this.f37710b.t).setSource(this.f37710b.getSourcePath()));
    }

    private void c(final View view) {
        view.setEnabled(false);
        view.postDelayed(new Runnable() {
            @Override
            public void run() {
                view.setEnabled(true);
            }
        }, 800L);
        SearchMainFragment searchMainFragment = this.f37710b;
        NavigationUtils.startSearchFeedbackFragment(searchMainFragment, searchMainFragment.t, this.f37709a.au());
        this.f37709a.s_(true);
        com.kugou.common.statistics.e.a.a(new p(this.f37710b.aN_(), com.kugou.framework.statistics.easytrace.c.bE).a(this.f37710b.t).setSource(this.f37710b.getSourcePath()));
    }

    private void h() {
        SearchMainFragment.C = true;
        f();
        EventBus.getDefault().post(new e());
    }

    public void f() {
        View view = this.f37711c;
        if (view == null || view.getVisibility() != 0) {
            return;
        }
        this.f37711c.setVisibility(4);
    }

    public void g() {
        if (SearchMainFragment.C) {
            f();
            return;
        }
        View view = this.f37711c;
        if (view != null) {
            if (view.getVisibility() == 4 || this.f37711c.getVisibility() == 8) {
                c();
            }
        }
    }
}