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

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


package com.kugou.android.app.home.channel;

import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.TextView;
import com.kugou.android.app.home.channel.entity.ChannelUserLevelInfo;
import com.kugou.android.app.home.channel.protocol.w;
import com.kugou.android.common.delegate.DelegateFragment;
import com.kugou.android.lite.R;
import com.kugou.common.utils.br;
import rx.android.schedulers.AndroidSchedulers;
import rx.schedulers.Schedulers;

@com.kugou.common.base.e.c(a = 970818836)
public class ChannelUserLevelFragment extends DelegateFragment {

    private ChannelUserLevelInfo f9938a;

    private TextView f9939b;

    private TextView f9940c;

    private TextView f9941d;

    private TextView f9942e;
    private TextView f;
    private ProgressBar g;
    private ImageView h;
    private View i;

    @Override
    public boolean hasNavigationBar() {
        return false;
    }

    @Override
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        if (getArguments() != null) {
            this.f9938a = (ChannelUserLevelInfo) getArguments().getParcelable("exra_user_level_info");
        }
    }

    @Override
    public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        return layoutInflater.inflate(R.layout.s1, viewGroup, false);
    }

    @Override
    public void onViewCreated(View view, Bundle bundle) {
        super.onViewCreated(view, bundle);
        a();
        a(view);
        com.kugou.common.statistics.e.a.a(new com.kugou.common.statistics.easytrace.task.b(20401, "exposure").a("pdid", this.f9938a.f11218a));
    }

    private void a() {
        enableTitleDelegate();
        getTitleDelegate().f(false);
        getTitleDelegate().s(true);
        initDelegates();
        getTitleDelegate().O().setColorFilter(-1);
        getTitleDelegate().b(0);
        TextView F = getTitleDelegate().F();
        if (F != null) {
            F.setTextSize(1, 18.0f);
            F.setTextColor(-1);
            F.setText("我的等级");
        }
        com.kugou.common.skinpro.utils.b.a(getTitleDelegate().E(), getTitleDelegate().O(), F);
    }

    private void a(View view) {
        this.f9939b = (TextView) view.findViewById(R.id.drt);
        this.f9940c = (TextView) view.findViewById(R.id.dru);
        this.f9941d = (TextView) view.findViewById(R.id.drw);
        this.f9942e = (TextView) view.findViewById(R.id.dry);
        this.f = (TextView) view.findViewById(R.id.drx);
        this.g = (ProgressBar) view.findViewById(R.id.drv);
        this.h = (ImageView) view.findViewById(R.id.drz);
        this.i = view.findViewById(R.id.drr);
        com.bumptech.glide.g.a(this).a("https://youthimgbssdl.kugou.com/3fc9ba0e62358cbbdb8b57aa14d2934c.jpg").j().a(com.bumptech.glide.load.a.PREFER_ARGB_8888).a(new int[]{br.c(360.0f), br.c(300.0f), 1080, 900}).a((com.bumptech.glide.e<String, com.bumptech.glide.load.c.g, Bitmap, Bitmap>) new com.bumptech.glide.request.b.g<Bitmap>() {
            @Override
            public void a(Object obj, com.bumptech.glide.request.a.c cVar) {
                a((Bitmap) obj, (com.bumptech.glide.request.a.c<? super Bitmap>) cVar);
            }

            public void a(Bitmap bitmap, com.bumptech.glide.request.a.c<? super Bitmap> cVar) {
                ChannelUserLevelFragment.this.i.setBackgroundDrawable(new BitmapDrawable(bitmap));
            }
        });
        b();
        if (!TextUtils.isEmpty(this.f9938a.f11218a)) {
            w.a(this.f9938a.f11218a).b(Schedulers.io()).a(AndroidSchedulers.mainThread()).a(new rx.b.b<ChannelUserLevelInfo>() {
                @Override
                public void call(ChannelUserLevelInfo channelUserLevelInfo) {
                    ChannelUserLevelFragment.this.f9938a = channelUserLevelInfo;
                    ChannelUserLevelFragment.this.b();
                }
            }, new rx.b.b<Throwable>() {
                @Override
                public void call(Throwable th) {
                }
            });
        }
        com.kugou.android.app.home.channel.protocol.s.a().b(Schedulers.io()).a(AndroidSchedulers.mainThread()).a(new rx.b.a() {
            @Override
            public void a() {
                String aB = com.kugou.common.q.b.a().aB();
                if (TextUtils.isEmpty(aB)) {
                    return;
                }
                com.bumptech.glide.g.a(ChannelUserLevelFragment.this).a(aB).a(ChannelUserLevelFragment.this.h);
            }
        }).a(new rx.b.b<String>() {
            @Override
            public void call(String str) {
                if (TextUtils.isEmpty(str)) {
                    return;
                }
                com.bumptech.glide.g.a(ChannelUserLevelFragment.this).a(str).a(ChannelUserLevelFragment.this.h);
                com.kugou.common.q.b.a().f(str);
            }
        }, new rx.b.b<Throwable>() {
            @Override
            public void call(Throwable th) {
            }
        });
    }

    public void b() {
        this.f9939b.setText(String.format("Lv.%d", Integer.valueOf(this.f9938a.f)));
        this.f9940c.setText(this.f9938a.g);
        this.f9941d.setText(String.format("Lv.%d", Integer.valueOf(this.f9938a.f)));
        this.f.setText(String.format("还差%d点经验升级", Integer.valueOf(this.f9938a.i - this.f9938a.f11222e)));
        this.f9942e.setText(String.format("Lv.%d", Integer.valueOf(this.f9938a.f + 1)));
        this.g.setProgress(this.f9938a.h);
    }
}