正在查看: Clash Legends v0.0.1 应用的 bep20Activity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Clash Legends v0.0.1 应用的 bep20Activity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.clash.legends.ui.activities;
import android.content.ClipData;
import android.content.ClipboardManager;
import android.content.Context;
import android.content.Intent;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.Point;
import android.os.Bundle;
import android.os.CountDownTimer;
import android.view.Display;
import android.view.View;
import android.view.WindowManager;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import androidmads.library.qrgenearator.QRGEncoder;
import androidx.appcompat.app.AppCompatActivity;
import androidx.cardview.widget.CardView;
import com.clash.legends.models.CurrentUser;
import com.clash.legends.utils.LocaleHelper;
import com.clash.legends.utils.UserLocalStore;
import java.text.DecimalFormat;
import java.text.NumberFormat;
public class bep20Activity extends AppCompatActivity {
ImageView back;
TextView bep20amountdata;
CardView bep20copy;
TextView bep20dec;
Bitmap bitmap;
Context context;
public TextView dataEdt;
public ImageView qrCodeIV;
QRGEncoder qrgEncoder;
Resources resources;
TextView trontimer;
CurrentUser user;
UserLocalStore userLocalStore;
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(2131558434);
Context locale = LocaleHelper.setLocale(this);
this.context = locale;
this.resources = locale.getResources();
UserLocalStore userLocalStore = new UserLocalStore(getApplicationContext());
this.userLocalStore = userLocalStore;
this.user = userLocalStore.getLoggedInUser();
this.qrCodeIV = (ImageView) findViewById(2131362025);
this.dataEdt = (TextView) findViewById(2131362021);
this.bep20dec = (TextView) findViewById(2131362024);
this.trontimer = (TextView) findViewById(2131362026);
this.bep20amountdata = (TextView) findViewById(2131362022);
this.bep20copy = findViewById(2131362023);
ImageView imageView = (ImageView) findViewById(2131361975);
this.back = imageView;
imageView.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
bep20Activity.this.m233lambda$onCreate$0$comclashlegendsuiactivitiesbep20Activity(view);
}
});
new CountDownTimer(900000L, 1000L) {
@Override
public void onTick(long millisUntilFinished) {
NumberFormat f = new DecimalFormat("00");
long min = (millisUntilFinished / 60000) % 60;
long sec = (millisUntilFinished / 1000) % 60;
bep20Activity.this.trontimer.setText(f.format(min) + ":" + f.format(sec));
}
@Override
public void onFinish() {
bep20Activity.this.trontimer.setText("00:00:00");
}
}.start();
Intent intent = getIntent();
final String tronaddress = intent.getStringExtra("address");
String amount = intent.getStringExtra("bep20amount");
this.bep20amountdata.setText(String.valueOf(Double.valueOf(amount)) + " TRX");
WindowManager manager = (WindowManager) getSystemService("window");
Display display = manager.getDefaultDisplay();
Point point = new Point();
display.getSize(point);
int width = point.x;
int height = point.y;
int dimen = Math.min(width, height);
QRGEncoder qRGEncoder = new QRGEncoder(tronaddress, (Bundle) null, "TEXT_TYPE", (dimen * 8) / 4);
this.qrgEncoder = qRGEncoder;
Bitmap bitmap = qRGEncoder.getBitmap();
this.bitmap = bitmap;
this.qrCodeIV.setImageBitmap(bitmap);
this.dataEdt.setText(tronaddress);
this.bep20copy.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
bep20Activity.this.m234lambda$onCreate$1$comclashlegendsuiactivitiesbep20Activity(tronaddress, view);
}
});
}
void m233lambda$onCreate$0$comclashlegendsuiactivitiesbep20Activity(View view) {
onBackPressed();
}
void m234lambda$onCreate$1$comclashlegendsuiactivitiesbep20Activity(String tronaddress, View v) {
ClipboardManager clipboard = (ClipboardManager) getApplicationContext().getSystemService("clipboard");
ClipData clip = ClipData.newPlainText(this.resources.getString(2131886925), tronaddress);
clipboard.setPrimaryClip(clip);
Toast.makeText(getApplicationContext(), this.resources.getString(2131886397), 0).show();
}
}