导航菜单

页面标题

页面副标题

95爱播免登录版 v3.1.9 - StorePropDetialActivity.java 源代码

正在查看: 95爱播免登录版 v3.1.9 应用的 StorePropDetialActivity.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.showself.ui;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import com.android.volley.toolbox.ImageLoader;
import com.mifeng.ui.R;
import com.showself.domain.LoginResultInfo;
import com.showself.domain.PropInfo;
import com.showself.service.g;
import com.showself.utils.Utils;
import com.showself.utils.k0;
import com.showself.utils.l;
import com.showself.utils.r0;
import com.sina.weibo.sdk.auth.Oauth2AccessToken;
import java.util.HashMap;

public class StorePropDetialActivity extends com.showself.ui.c {
    private PropInfo a;
    private Button b;
    private ImageView c;
    private ImageView d;

    private ImageView f2880e;

    private TextView f2881f;

    private TextView f2882g;

    private TextView f2883h;

    private TextView f2884i;

    private Button f2885j;

    private boolean f2886k;
    ImageLoader l;
    private com.showself.provider.f m;

    class a implements View.OnClickListener {
        a() {
        }

        @Override
        public void onClick(View view) {
            StorePropDetialActivity.this.finish();
        }
    }

    class b implements View.OnClickListener {
        b() {
        }

        @Override
        public void onClick(View view) {
            int v = k0.k().v();
            String string = StorePropDetialActivity.this.a.getVip_level() == 1 ? StorePropDetialActivity.this.getString(R.string.card_vip_level1) : StorePropDetialActivity.this.a.getVip_level() == 2 ? StorePropDetialActivity.this.getString(R.string.card_vip_level2) : StorePropDetialActivity.this.a.getVip_level() == 3 ? StorePropDetialActivity.this.getString(R.string.card_vip_level3) : null;
            String str = StorePropDetialActivity.this.getString(R.string.card_prop_alert1) + string + StorePropDetialActivity.this.getString(R.string.card_prop_alert2) + string + StorePropDetialActivity.this.getString(R.string.card_prop_alert3);
            if (StorePropDetialActivity.this.a.getVip_level() <= v) {
                StorePropDetialActivity.this.E();
            } else {
                ?? r5 = StorePropDetialActivity.this;
                r5.F(str, r5.getString(R.string.buy_vip), StorePropDetialActivity.this.getString(R.string.negative));
            }
        }
    }

    class c implements l {
        c() {
        }

        @Override
        public void a(boolean z) {
            if (z) {
                StorePropDetialActivity.this.D();
            }
        }
    }

    class d implements l {
        final String a;

        d(String str) {
            this.a = str;
        }

        @Override
        public void a(boolean z) {
            if (z) {
                if (StorePropDetialActivity.this.getString(R.string.get_money_free).equals(this.a)) {
                    com.showself.utils.c1.e.a(StorePropDetialActivity.this);
                } else {
                    StorePropDetialActivity.this.startActivity(new Intent(StorePropDetialActivity.this.getApplicationContext(), (Class<?>) VIPActivity.class));
                }
            }
        }
    }

    public void D() {
        if (this.f2886k) {
            return;
        }
        this.f2886k = true;
        LoginResultInfo y = r0.y(getApplicationContext());
        HashMap hashMap = new HashMap();
        hashMap.put("admin_pid", Integer.valueOf(this.a.getAdmin_pid()));
        hashMap.put(Oauth2AccessToken.KEY_UID, Integer.valueOf(y.getUserId()));
        hashMap.put("fuid", Integer.valueOf(y.getUserId()));
        hashMap.put("used", 1);
        addTask(new com.showself.service.f(10085, hashMap), this);
        Utils.U0(this);
    }

    public void E() {
        Utils.Q0(this, null, getString(R.string.buy_prop_prompt), getString(R.string.negative), getResources().getColor(2131099757), getString(R.string.positive), getResources().getColor(2131099758), new c(), true);
    }

    public void F(String str, String str2, String str3) {
        Utils.Q0(this, null, str, str2, getResources().getColor(2131099757), str3, getResources().getColor(2131099758), new d(str2), true);
    }

    @Override
    public void init() {
        ((TextView) findViewById(R.id.tv_nav_title)).setText(R.string.product_info);
        Button button = (Button) findViewById(R.id.btn_nav_left);
        this.b = button;
        button.setOnClickListener(new a());
        this.c = (ImageView) findViewById(R.id.iv_prop_image);
        this.l.displayImage(this.a.getImage(), this.c);
        this.f2880e = (ImageView) findViewById(R.id.iv_prop_vip);
        if (this.a.getVip_level() != 0) {
            this.l.displayImage(this.m.k(this.a.getVip_level(), 0), this.f2880e);
            this.f2880e.setVisibility(0);
        }
        this.d = (ImageView) findViewById(R.id.iv_propt_preview);
        if (TextUtils.isEmpty(this.a.getPreview_image())) {
            this.d.setVisibility(8);
        } else {
            this.l.displayImage(this.a.getPreview_image(), this.d);
        }
        TextView textView = (TextView) findViewById(R.id.tv_prop_name);
        this.f2881f = textView;
        textView.setText(this.a.getName());
        TextView textView2 = (TextView) findViewById(R.id.tv_prop_price);
        this.f2882g = textView2;
        textView2.setText(this.a.getSpend() + "蜜钻/个");
        TextView textView3 = (TextView) findViewById(R.id.tv_prop_sell);
        this.f2883h = textView3;
        textView3.setText(this.a.getRecent_num() + "");
        TextView textView4 = (TextView) findViewById(R.id.tv_prop_desc);
        this.f2884i = textView4;
        textView4.setText(this.a.getDescr());
        Button button2 = (Button) findViewById(R.id.btn_buy);
        this.f2885j = button2;
        button2.setOnClickListener(new b());
    }

    @Override
    protected void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setContentView(R.layout.prop_detial_of_store);
        this.a = (PropInfo) getIntent().getSerializableExtra("prop");
        this.l = ImageLoader.getInstance(getApplicationContext());
        this.m = com.showself.provider.f.h();
        init();
    }

    @Override
    protected void onResume() {
        super.onResume();
    }

    @Override
    protected void onStop() {
        super.onStop();
    }

    @Override
    public void refresh(Object... objArr) {
        this.f2886k = false;
        Utils.n(this);
        g.i(this);
        int intValue = ((Integer) objArr[0]).intValue();
        HashMap hashMap = (HashMap) objArr[1];
        int intValue2 = ((Integer) hashMap.get(com.showself.net.e.n1)).intValue();
        String str = (String) hashMap.get(com.showself.net.e.o1);
        if (intValue != 10085) {
            return;
        }
        if (intValue2 == -300) {
            F(str, getString(R.string.get_money_free), getString(R.string.negative));
        } else {
            sendBroadcast(new Intent("com.showself.refresh.stor"));
            Toast.makeText((Context) this, (CharSequence) str, 0).show();
        }
    }
}