翰林优商.apk(点击下载) / SpeechVoiceFuzzyLandingActivity.java


package com.xlx.speech.voicereadsdk.ui.activity;

import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.xlx.speech.b.a;
import com.xlx.speech.m0.e0;
import com.xlx.speech.m0.i0;
import com.xlx.speech.m0.j;
import com.xlx.speech.m0.m;
import com.xlx.speech.m0.s;
import com.xlx.speech.m0.u;
import com.xlx.speech.o.n;
import com.xlx.speech.o.o;
import com.xlx.speech.voicereadsdk.R;
import com.xlx.speech.voicereadsdk.bean.resp.OverPageResult;
import com.xlx.speech.voicereadsdk.bean.resp.SingleAdDetailResult;
import com.xlx.speech.voicereadsdk.ui.widget.CountDownTextView;
import com.xlx.speech.voicereadsdk.ui.widget.DownloadButton;
import com.xlx.speech.voicereadsdk.ui.widget.a;
import java.util.HashMap;
import java.util.List;

public class SpeechVoiceFuzzyLandingActivity extends com.xlx.speech.t.a {
    public static final /* synthetic */ int o = 0;
    public a.c c;
    public SingleAdDetailResult d;
    public ImageView e;
    public CountDownTextView f;
    public ImageView g;
    public TextView h;
    public TextView i;
    public ImageView j;
    public DownloadButton k;
    public OverPageResult l;
    public u m;
    public u.b n;

    public class a implements a.AbstractC0415a {
        public a() {
        }

        @Override // com.xlx.speech.voicereadsdk.ui.widget.a.AbstractC0415a
        public void a() {
            SingleAdDetailResult singleAdDetailResult = SpeechVoiceFuzzyLandingActivity.this.d;
            i0.a(singleAdDetailResult.logId, singleAdDetailResult.icpmOne);
        }
    }

    public class b extends s {
        public b() {
        }

        @Override // com.xlx.speech.m0.s
        public void a(View view) {
            SpeechVoiceFuzzyLandingActivity speechVoiceFuzzyLandingActivity = SpeechVoiceFuzzyLandingActivity.this;
            m.a((Context) speechVoiceFuzzyLandingActivity, true, speechVoiceFuzzyLandingActivity.m, speechVoiceFuzzyLandingActivity.d);
        }
    }

    public final void b() {
        a.c a2;
        this.h.setText(this.l.getAdvertName());
        this.i.setText(String.format("“ %s ”", this.l.getAdContent()));
        j.a().loadImage(this, this.l.getIconUrl(), this.g);
        List<String> list = this.d.packetImgList;
        j.a().loadBlurImage(this, (list == null || list.isEmpty()) ? this.d.packetImg : list.get(list.size() - 1), 6.0f, this.e);
        this.k.setText(this.l.getButtonMsg());
        this.f.a(this.l.getDelaySeconds(), "%dS");
        if (this.l.getButtonType() == 1) {
            a2 = com.xlx.speech.b.a.b(this.k);
        } else {
            if (this.l.getButtonType() == 2) {
                this.j.setVisibility(0);
                a2 = com.xlx.speech.b.a.a(this.j);
            }
            HashMap hashMap = new HashMap();
            hashMap.put("reward", this.l.getReward());
            hashMap.put("ad_name", this.l.getAdvertName());
            hashMap.put("type", Integer.valueOf(this.l.getPageMode()));
            hashMap.put(CampaignEx.JSON_KEY_LANDING_TYPE, 2);
            com.xlx.speech.i.b.a("landing_page_view", hashMap);
        }
        this.c = a2;
        HashMap hashMap2 = new HashMap();
        hashMap2.put("reward", this.l.getReward());
        hashMap2.put("ad_name", this.l.getAdvertName());
        hashMap2.put("type", Integer.valueOf(this.l.getPageMode()));
        hashMap2.put(CampaignEx.JSON_KEY_LANDING_TYPE, 2);
        com.xlx.speech.i.b.a("landing_page_view", hashMap2);
    }

    public void onBackPressed() {
        m.a((Context) this, true, this.m, this.d);
    }

    @Override // com.xlx.speech.t.a
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        e0.a((Activity) this);
        setContentView(R.layout.xlx_voice_activity_fuzzy_landing);
        this.d = (SingleAdDetailResult) getIntent().getParcelableExtra("data");
        this.l = (OverPageResult) getIntent().getParcelableExtra("over_page_data");
        this.e = (ImageView) findViewById(R.id.xlx_voice_iv_bg);
        this.f = (CountDownTextView) findViewById(R.id.xlx_voice_tv_count_down_close);
        this.g = (ImageView) findViewById(R.id.xlx_voice_detail_ad_icon);
        this.h = (TextView) findViewById(R.id.xlx_voice_tv_ad_name);
        this.i = (TextView) findViewById(R.id.xlx_voice_tv_ad_content);
        this.k = (DownloadButton) findViewById(R.id.xlx_voice_download_button);
        this.j = (ImageView) findViewById(R.id.xlx_voice_iv_gesture);
        this.f.setOnCountDownListener(new a());
        this.f.setOnClickListener(new b());
        if (this.l != null) {
            b();
        } else {
            new com.xlx.speech.e.b().a(this.d.logId, new com.xlx.speech.o.m(this));
        }
        SingleAdDetailResult singleAdDetailResult = this.d;
        u a2 = u.a(this, singleAdDetailResult.adId, singleAdDetailResult.logId, singleAdDetailResult.packageName);
        this.m = a2;
        n nVar = new n(this);
        this.n = nVar;
        a2.a(nVar);
        this.k.setOnClickListener(new o(this));
    }

    @Override // com.xlx.speech.t.a
    public void onDestroy() {
        super.onDestroy();
        this.m.b(this.n);
    }

    @Override // com.xlx.speech.t.a
    public void onPause() {
        super.onPause();
        a.c cVar = this.c;
        if (cVar != null) {
            cVar.b();
        }
    }

    @Override // com.xlx.speech.t.a
    public void onResume() {
        super.onResume();
        a.c cVar = this.c;
        if (cVar != null) {
            cVar.c();
        }
    }
}