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


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

import android.app.Activity;
import android.os.Bundle;
import android.view.ViewGroup;
import android.widget.TextView;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.xlx.speech.i.b;
import com.xlx.speech.m0.e0;
import com.xlx.speech.m0.i0;
import com.xlx.speech.o.p0;
import com.xlx.speech.o.s;
import com.xlx.speech.o.t;
import com.xlx.speech.o.v;
import com.xlx.speech.voicereadsdk.R;
import com.xlx.speech.voicereadsdk.bean.resp.ExperienceAdvertPageInfo;
import com.xlx.speech.y.u;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;

public class SpeechVoiceMultipleRewardLandingActivity extends p0 {
    public static final /* synthetic */ int U = 0;
    public TextView N;
    public TextView O;
    public TextView P;
    public TextView Q;
    public List<TextView> R;
    public boolean S;
    public boolean T = false;

    @Override // com.xlx.speech.o.p0
    public void a(float f) {
        super.a(f);
        this.w.setAlpha(1.0f - f);
        ViewGroup.MarginLayoutParams marginLayoutParams = (ViewGroup.MarginLayoutParams) this.C.getLayoutParams();
        marginLayoutParams.setMargins(marginLayoutParams.leftMargin, (int) (((float) getResources().getDimensionPixelSize(R.dimen.xlx_voice_dp_34)) - (((float) getResources().getDimensionPixelSize(R.dimen.xlx_voice_dp_24)) * f)), marginLayoutParams.rightMargin, 0);
        this.C.setLayoutParams(marginLayoutParams);
    }

    @Override // com.xlx.speech.o.p0, com.xlx.speech.o.i
    public void a(ExperienceAdvertPageInfo experienceAdvertPageInfo) {
        super.a(experienceAdvertPageInfo);
        this.P.setText(c().getRewardName());
        this.Q.setText(c().getFormatRewardCount());
        int i = 0;
        while (i < this.R.size() && i < experienceAdvertPageInfo.getPlayStep().size()) {
            this.R.get(i).setText(experienceAdvertPageInfo.getPlayStep().get(i).getTip());
            i++;
        }
        if (!this.T) {
            this.T = true;
            HashMap hashMap = new HashMap();
            hashMap.put("ad_name", experienceAdvertPageInfo.getAdName());
            hashMap.put("type", Integer.valueOf(experienceAdvertPageInfo.getPageMode()));
            hashMap.put(CampaignEx.JSON_KEY_LANDING_TYPE, 0);
            b.a("landing_page_view", hashMap);
        }
        super.a(experienceAdvertPageInfo);
    }

    @Override // com.xlx.speech.o.i
    public int e() {
        return 2;
    }

    @Override // com.xlx.speech.o.i, com.xlx.speech.t.a
    public void onCreate(Bundle bundle) {
        e0.a((Activity) this);
        super.onCreate(bundle);
        setContentView(R.layout.xlx_voice_activity_landing_multiple_reward);
        super.q();
        this.N = (TextView) findViewById(R.id.xlx_voice_tv_reward1);
        this.O = (TextView) findViewById(R.id.xlx_voice_tv_reward_count1);
        this.P = (TextView) findViewById(R.id.xlx_voice_tv_reward2);
        this.Q = (TextView) findViewById(R.id.xlx_voice_tv_reward_count2);
        this.R = Arrays.asList((TextView) findViewById(R.id.xlx_voice_tv_watch_task), (TextView) findViewById(R.id.xlx_voice_tv_cpa_task));
        g();
        this.C.setOnClickListener(new s(this));
        this.B.setOnClickListener(new t(this));
        if (bundle != null) {
            this.S = bundle.getBoolean("STATE_REWARD_WATCH", false);
        }
        if (x()) {
            w();
        }
        if (!(getIntent().getParcelableExtra("data") != null) || this.S) {
            TextView textView = this.O;
            textView.setText(f().getRewardCount() + "");
        } else {
            this.S = true;
            this.O.setText(String.valueOf(0));
            i0.a(this.c.getLogId(), this.c.getIcpmOne());
            this.F.setAlpha(0.0f);
            this.G.setAlpha(0.0f);
            u uVar = new u(this);
            uVar.c.setText(f().getRewardInfo());
            this.E.setAnimatorListener(new com.xlx.speech.o.u(this));
            this.L.postDelayed(new v(this, uVar), 1500);
            uVar.show();
        }
        this.N.setText(f().getRewardName());
        ExperienceAdvertPageInfo experienceAdvertPageInfo = this.i;
        if (experienceAdvertPageInfo != null) {
            a(experienceAdvertPageInfo);
        }
    }

    @Override // com.xlx.speech.o.i
    public void onSaveInstanceState(Bundle bundle) {
        bundle.putBoolean("STATE_REWARD_WATCH", this.S);
        super.onSaveInstanceState(bundle);
    }

    @Override // com.xlx.speech.o.p0
    public int p() {
        return getResources().getDimensionPixelSize(R.dimen.xlx_voice_dp_134);
    }

    public final boolean x() {
        return this.d.e() || this.d.d();
    }
}