SKM TOURNAMENT v1.0版本的 MD5 值为:3f4f4ff9cf9de96fafbfe80869223ebf
以下内容为反编译后的 TransferActivity.java 源代码,内容仅作参考
package com.skm.tournament;
import android.app.ProgressDialog;
import android.content.res.ColorStateList;
import android.graphics.Color;
import android.graphics.drawable.GradientDrawable;
import android.graphics.drawable.RippleDrawable;
import android.os.Bundle;
import android.util.SparseBooleanArray;
import android.util.TypedValue;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.view.ViewCompat;
import androidx.exifinterface.media.ExifInterface;
import com.airbnb.lottie.LottieAnimationView;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.Task;
import com.google.firebase.FirebaseApp;
import com.google.firebase.auth.AuthResult;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.database.ChildEventListener;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.GenericTypeIndicator;
import com.skm.tournament.RequestNetwork;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Random;
import java.util.Timer;
import java.util.TimerTask;
public class TransferActivity extends AppCompatActivity {
private FirebaseAuth Auth;
private OnCompleteListener<Void> Auth_deleteUserListener;
private OnCompleteListener<Void> Auth_emailVerificationSentListener;
private OnCompleteListener<AuthResult> Auth_googleSignInListener;
private OnCompleteListener<AuthResult> Auth_phoneAuthListener;
private OnCompleteListener<Void> Auth_updateEmailListener;
private OnCompleteListener<Void> Auth_updatePasswordListener;
private OnCompleteListener<Void> Auth_updateProfileListener;
private LinearLayout BG1;
private LinearLayout BG2;
private LinearLayout BG3;
private LinearLayout BG4;
private LinearLayout BG5;
private LinearLayout BG6;
private LinearLayout BG7;
private TextView Balance;
private LottieAnimationView Lottie;
private EditText Money;
private Button Send;
private TimerTask Time;
private TextView Tv1;
private TextView Tv2;
private TextView Tv3;
private RequestNetwork WiFi;
private TextView Winning;
private OnCompleteListener<AuthResult> _Auth_create_user_listener;
private OnCompleteListener<Void> _Auth_reset_password_listener;
private OnCompleteListener<AuthResult> _Auth_sign_in_listener;
private ChildEventListener _Users_child_listener;
private RequestNetwork.RequestListener _WiFi_request_listener;
private ProgressDialog prog;
private Timer _timer = new Timer();
private FirebaseDatabase _firebase = FirebaseDatabase.getInstance();
private HashMap<String, Object> Create = new HashMap<>();
private DatabaseReference Users = this._firebase.getReference("Users");
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
setContentView(R.layout.transfer);
initialize(bundle);
FirebaseApp.initializeApp(this);
initializeLogic();
}
private void initialize(Bundle bundle) {
this.BG1 = (LinearLayout) findViewById(R.id.BG1);
this.BG2 = (LinearLayout) findViewById(R.id.BG2);
this.BG3 = (LinearLayout) findViewById(R.id.BG3);
this.BG4 = (LinearLayout) findViewById(R.id.BG4);
this.Lottie = (LottieAnimationView) findViewById(R.id.Lottie);
this.Tv1 = (TextView) findViewById(R.id.Tv1);
this.BG5 = (LinearLayout) findViewById(R.id.BG5);
this.BG6 = (LinearLayout) findViewById(R.id.BG6);
this.BG7 = (LinearLayout) findViewById(R.id.BG7);
this.Send = (Button) findViewById(R.id.Send);
this.Tv2 = (TextView) findViewById(R.id.Tv2);
this.Balance = (TextView) findViewById(R.id.Balance);
this.Tv3 = (TextView) findViewById(R.id.Tv3);
this.Winning = (TextView) findViewById(R.id.Winning);
this.Money = (EditText) findViewById(R.id.Money);
this.Auth = FirebaseAuth.getInstance();
this.WiFi = new RequestNetwork(this);
this.Send.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (!TransferActivity.this.Money.getText().toString().equals("") && Double.parseDouble(TransferActivity.this.Winning.getText().toString()) > Double.parseDouble(TransferActivity.this.Money.getText().toString()) - 1.0d) {
TransferActivity.this.Create = new HashMap();
TransferActivity.this.Create.put("Winning", String.valueOf((long) (Double.parseDouble(TransferActivity.this.Winning.getText().toString()) - Double.parseDouble(TransferActivity.this.Money.getText().toString()))));
TransferActivity.this.Create.put("Balance", String.valueOf((long) (Double.parseDouble(TransferActivity.this.Balance.getText().toString()) + Double.parseDouble(TransferActivity.this.Money.getText().toString()))));
TransferActivity.this.Users.child(FirebaseAuth.getInstance().getCurrentUser().getUid()).updateChildren(TransferActivity.this.Create);
TransferActivity.this.Create.clear();
}
}
});
this._Users_child_listener = new ChildEventListener() {
@Override
public void onChildAdded(DataSnapshot dataSnapshot, String str) {
GenericTypeIndicator<HashMap<String, Object>> genericTypeIndicator = new GenericTypeIndicator<HashMap<String, Object>>() {
};
String key = dataSnapshot.getKey();
HashMap hashMap = (HashMap) dataSnapshot.getValue(genericTypeIndicator);
if (key.equals(FirebaseAuth.getInstance().getCurrentUser().getUid())) {
TransferActivity.this.Balance.setText(hashMap.get("Balance").toString());
TransferActivity.this.Winning.setText(hashMap.get("Winning").toString());
}
}
@Override
public void onChildChanged(DataSnapshot dataSnapshot, String str) {
GenericTypeIndicator<HashMap<String, Object>> genericTypeIndicator = new GenericTypeIndicator<HashMap<String, Object>>() {
};
String key = dataSnapshot.getKey();
HashMap hashMap = (HashMap) dataSnapshot.getValue(genericTypeIndicator);
if (key.equals(FirebaseAuth.getInstance().getCurrentUser().getUid())) {
TransferActivity.this.Balance.setText(hashMap.get("Balance").toString());
TransferActivity.this.Winning.setText(hashMap.get("Winning").toString());
}
}
@Override
public void onChildMoved(DataSnapshot dataSnapshot, String str) {
}
@Override
public void onChildRemoved(DataSnapshot dataSnapshot) {
GenericTypeIndicator<HashMap<String, Object>> genericTypeIndicator = new GenericTypeIndicator<HashMap<String, Object>>() {
};
String key = dataSnapshot.getKey();
HashMap hashMap = (HashMap) dataSnapshot.getValue(genericTypeIndicator);
if (key.equals(FirebaseAuth.getInstance().getCurrentUser().getUid())) {
TransferActivity.this.Balance.setText(hashMap.get("Balance").toString());
TransferActivity.this.Winning.setText(hashMap.get("Winning").toString());
}
}
@Override
public void onCancelled(DatabaseError databaseError) {
databaseError.getCode();
databaseError.getMessage();
}
};
this.Users.addChildEventListener(this._Users_child_listener);
this._WiFi_request_listener = new RequestNetwork.RequestListener() {
@Override
public void onResponse(String str, String str2, HashMap<String, Object> hashMap) {
TransferActivity.this._Loading(false, "Loading...");
}
@Override
public void onErrorResponse(String str, String str2) {
TransferActivity.this._Loading(true, "Loading...");
}
};
this.Auth_updateEmailListener = new OnCompleteListener<Void>() {
@Override
public void onComplete(Task<Void> task) {
task.isSuccessful();
if (task.getException() != null) {
task.getException().getMessage();
}
}
};
this.Auth_updatePasswordListener = new OnCompleteListener<Void>() {
@Override
public void onComplete(Task<Void> task) {
task.isSuccessful();
if (task.getException() != null) {
task.getException().getMessage();
}
}
};
this.Auth_emailVerificationSentListener = new OnCompleteListener<Void>() {
@Override
public void onComplete(Task<Void> task) {
task.isSuccessful();
if (task.getException() != null) {
task.getException().getMessage();
}
}
};
this.Auth_deleteUserListener = new OnCompleteListener<Void>() {
@Override
public void onComplete(Task<Void> task) {
task.isSuccessful();
if (task.getException() != null) {
task.getException().getMessage();
}
}
};
this.Auth_phoneAuthListener = new OnCompleteListener<AuthResult>() {
@Override
public void onComplete(Task<AuthResult> task) {
task.isSuccessful();
if (task.getException() != null) {
task.getException().getMessage();
}
}
};
this.Auth_updateProfileListener = new OnCompleteListener<Void>() {
@Override
public void onComplete(Task<Void> task) {
task.isSuccessful();
if (task.getException() != null) {
task.getException().getMessage();
}
}
};
this.Auth_googleSignInListener = new OnCompleteListener<AuthResult>() {
@Override
public void onComplete(Task<AuthResult> task) {
task.isSuccessful();
if (task.getException() != null) {
task.getException().getMessage();
}
}
};
this._Auth_create_user_listener = new OnCompleteListener<AuthResult>() {
@Override
public void onComplete(Task<AuthResult> task) {
task.isSuccessful();
if (task.getException() != null) {
task.getException().getMessage();
}
}
};
this._Auth_sign_in_listener = new OnCompleteListener<AuthResult>() {
@Override
public void onComplete(Task<AuthResult> task) {
task.isSuccessful();
if (task.getException() != null) {
task.getException().getMessage();
}
}
};
this._Auth_reset_password_listener = new OnCompleteListener<Void>() {
@Override
public void onComplete(Task<Void> task) {
task.isSuccessful();
}
};
}
private void initializeLogic() {
_Loading(true, "Loading...");
this.BG2.setElevation(5.0f);
this.BG2.setBackground(new GradientDrawable() {
public GradientDrawable getIns(int i, int i2) {
setCornerRadius(i);
setColor(i2);
return this;
}
}.getIns(5, -1));
this.BG3.setElevation(5.0f);
this.BG3.setBackground(new GradientDrawable() {
public GradientDrawable getIns(int i, int i2) {
setCornerRadius(i);
setColor(i2);
return this;
}
}.getIns(5, -1));
this.BG4.setElevation(5.0f);
this.BG4.setBackground(new GradientDrawable() {
public GradientDrawable getIns(int i, int i2) {
setCornerRadius(i);
setColor(i2);
return this;
}
}.getIns(5, -1));
this.Money.setBackground(new GradientDrawable() {
public GradientDrawable getIns(int i, int i2, int i3, int i4) {
setCornerRadius(i);
setStroke(i2, i3);
setColor(i4);
return this;
}
}.getIns(8, 2, ViewCompat.MEASURED_STATE_MASK, -1118482));
_rippleRoundStroke(this.Send, "#2196F3", "#FFFFFF", 40.0d, 0.0d, "#FFFFFF");
}
@Override
public void onStart() {
super.onStart();
this.WiFi.startRequestNetwork("GET", "https://www.google.com", ExifInterface.GPS_MEASUREMENT_IN_PROGRESS, this._WiFi_request_listener);
}
public void _Loading(boolean z, String str) {
if (z) {
if (this.prog == null) {
this.prog = new ProgressDialog(this);
this.prog.setMax(100);
this.prog.setIndeterminate(true);
this.prog.setCancelable(false);
this.prog.setCanceledOnTouchOutside(false);
}
this.prog.setMessage(str);
this.prog.show();
return;
}
if (this.prog != null) {
this.prog.dismiss();
}
}
public void _rippleRoundStroke(View view, String str, String str2, double d, double d2, String str3) {
GradientDrawable gradientDrawable = new GradientDrawable();
gradientDrawable.setColor(Color.parseColor(str));
gradientDrawable.setCornerRadius((float) d);
gradientDrawable.setStroke((int) d2, Color.parseColor("#" + str3.replace("#", "")));
view.setBackground(new RippleDrawable(new ColorStateList(new int[][]{new int[0]}, new int[]{Color.parseColor(str2)}), gradientDrawable, null));
}
@Deprecated
public void showMessage(String str) {
Toast.makeText(getApplicationContext(), str, 0).show();
}
@Deprecated
public int getLocationX(View view) {
int[] iArr = new int[2];
view.getLocationInWindow(iArr);
return iArr[0];
}
@Deprecated
public int getLocationY(View view) {
int[] iArr = new int[2];
view.getLocationInWindow(iArr);
return iArr[1];
}
@Deprecated
public int getRandom(int i, int i2) {
return new Random().nextInt((i2 - i) + 1) + i;
}
@Deprecated
public ArrayList<Double> getCheckedItemPositionsToArray(ListView listView) {
ArrayList<Double> arrayList = new ArrayList<>();
SparseBooleanArray checkedItemPositions = listView.getCheckedItemPositions();
for (int i = 0; i < checkedItemPositions.size(); i++) {
if (checkedItemPositions.valueAt(i)) {
arrayList.add(Double.valueOf(checkedItemPositions.keyAt(i)));
}
}
return arrayList;
}
@Deprecated
public float getDip(int i) {
return TypedValue.applyDimension(1, i, getResources().getDisplayMetrics());
}
@Deprecated
public int getDisplayWidthPixels() {
return getResources().getDisplayMetrics().widthPixels;
}
@Deprecated
public int getDisplayHeightPixels() {
return getResources().getDisplayMetrics().heightPixels;
}
}