888casino v5.2.6版本的 MD5 值为:85651b991f46be2116f06a6c09984c51
以下内容为反编译后的 Alerts.java 源代码,内容仅作参考
package com.hamzanapps.luckyslot777.utils;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.ActivityNotFoundException;
import android.content.DialogInterface;
import android.content.Intent;
import android.net.Uri;
import android.widget.TextView;
import com.pg.casino888.R;
public class Alerts {
private Activity mActivity;
public Alerts(Activity activity) {
this.mActivity = activity;
}
public void showRateAlert(String message) {
AlertDialog.Builder builder = new AlertDialog.Builder(this.mActivity);
builder.setTitle(R.string.app_name);
builder.setMessage(message);
builder.setCancelable(false);
builder.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
try {
Alerts.this.mActivity.startActivity(new Intent("android.intent.action.VIEW", Uri.parse("market://details?id=" + Alerts.this.mActivity.getPackageName())));
} catch (ActivityNotFoundException e) {
Alerts.this.mActivity.startActivity(new Intent("android.intent.action.VIEW", Uri.parse("http://play.google.com/store/apps/details?id=" + Alerts.this.mActivity.getPackageName())));
}
}
});
builder.setNegativeButton("More Apps", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Alerts.this.mActivity.startActivity(new Intent("android.intent.action.VIEW", Uri.parse(Alerts.this.mActivity.getString(R.string.more_apps))));
}
});
AlertDialog dialog = builder.show();
TextView txtMessage = (TextView) dialog.findViewById(android.R.id.message);
if (txtMessage != null) {
txtMessage.setGravity(17);
}
dialog.show();
}
public void showAlert(String message) {
AlertDialog.Builder builder = new AlertDialog.Builder(this.mActivity);
builder.setTitle(R.string.app_name);
builder.setMessage(message);
builder.setCancelable(false);
builder.setPositiveButton("Ok", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
}
});
builder.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
}
});
AlertDialog dialog = builder.show();
TextView txtMessage = (TextView) dialog.findViewById(android.R.id.message);
if (txtMessage != null) {
txtMessage.setGravity(17);
}
dialog.show();
}
}