导航菜单

页面标题

页面副标题

Clash Legends v0.0.1 - SingleOrderActivity.java 源代码

正在查看: Clash Legends v0.0.1 应用的 SingleOrderActivity.java JAVA 源代码文件

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


package com.clash.legends.ui.activities;

import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.res.Resources;
import android.net.Uri;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import com.clash.legends.utils.LocaleHelper;
import com.google.android.gms.ads.AdListener;
import com.google.android.gms.ads.AdRequest;
import com.google.android.gms.ads.AdView;
import com.google.android.gms.ads.LoadAdError;
import com.squareup.picasso.Picasso;

public class SingleOrderActivity extends AppCompatActivity {
    TextView addTv;
    TextView additionalTitleTv;
    TextView additionalTv;
    ImageView back;
    Context context;
    TextView dateTv;
    ImageView imageIv;
    TextView ordernameTv;
    TextView pnameTv;
    TextView priceTv;
    Resources resources;
    TextView statusTv;
    TextView trackOrderTitleTv;
    TextView trackOrderTv;
    TextView unameTv;

    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(2131558482);
        SharedPreferences sp = getSharedPreferences("SMINFO", 0);
        if (TextUtils.equals(sp.getString("baner", "no"), "yes")) {
            final AdView mAdView = findViewById(2131361885);
            AdRequest adRequest = new AdRequest.Builder().build();
            mAdView.loadAd(adRequest);
            mAdView.setAdListener(new AdListener() {
                public void onAdLoaded() {
                    mAdView.setVisibility(0);
                }

                public void onAdFailedToLoad(LoadAdError adError) {
                    mAdView.setVisibility(8);
                }

                public void onAdOpened() {
                }

                public void onAdClicked() {
                }

                public void onAdLeftApplication() {
                }

                public void onAdClosed() {
                }
            });
        }
        Context locale = LocaleHelper.setLocale(this);
        this.context = locale;
        this.resources = locale.getResources();
        ImageView imageView = (ImageView) findViewById(2131362004);
        this.back = imageView;
        imageView.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                SingleOrderActivity.this.m207x6a80fc9b(view);
            }
        });
        this.ordernameTv = (TextView) findViewById(2131362914);
        this.imageIv = (ImageView) findViewById(2131363022);
        this.pnameTv = (TextView) findViewById(2131363039);
        this.priceTv = (TextView) findViewById(2131363081);
        this.unameTv = (TextView) findViewById(2131362794);
        this.addTv = (TextView) findViewById(2131361890);
        this.additionalTitleTv = (TextView) findViewById(2131361892);
        this.additionalTv = (TextView) findViewById(2131361891);
        this.statusTv = (TextView) findViewById(2131363397);
        this.trackOrderTv = (TextView) findViewById(2131363543);
        this.trackOrderTitleTv = (TextView) findViewById(2131363544);
        this.dateTv = (TextView) findViewById(2131362218);
        final Intent intent = getIntent();
        this.ordernameTv.setText(intent.getStringExtra("ordername"));
        if (!intent.getStringExtra("image").equals("")) {
            Picasso.get().load(Uri.parse(intent.getStringExtra("image"))).placeholder(2131230869).fit().into(this.imageIv);
        } else {
            this.imageIv.setImageDrawable(getResources().getDrawable(2131230869));
        }
        this.pnameTv.setText(intent.getStringExtra("pname"));
        this.priceTv.setText(intent.getStringExtra("price"));
        this.unameTv.setText(intent.getStringExtra("uname"));
        this.addTv.setText(intent.getStringExtra("add"));
        this.statusTv.setText(intent.getStringExtra("status"));
        this.dateTv.setText(intent.getStringExtra("date"));
        if (!TextUtils.equals(intent.getStringExtra("tracklink").trim(), "")) {
            this.trackOrderTv.setText(intent.getStringExtra("tracklink"));
            this.trackOrderTv.setOnClickListener(new View.OnClickListener() {
                @Override
                public final void onClick(View view) {
                    SingleOrderActivity.this.m208xf7bbae1c(intent, view);
                }
            });
        } else {
            this.trackOrderTv.setVisibility(8);
            this.trackOrderTitleTv.setVisibility(8);
        }
        if (!TextUtils.equals(intent.getStringExtra("additional").trim(), "")) {
            this.additionalTv.setText(intent.getStringExtra("additional"));
        } else {
            this.additionalTv.setVisibility(8);
            this.additionalTitleTv.setVisibility(8);
        }
    }

    void m207x6a80fc9b(View view) {
        onBackPressed();
    }

    void m208xf7bbae1c(Intent intent, View view) {
        try {
            Intent browserIntent = new Intent("android.intent.action.VIEW", Uri.parse(intent.getStringExtra("tracklink")));
            startActivity(browserIntent);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}