云游合成大猫咪 v1.0.0.9版本的 MD5 值为:2c57f1e5967950f3f726f306bf82eb8e

以下内容为反编译后的 ProxyDialog.java 源代码,内容仅作参考


package com.game.run;

import android.app.AlertDialog;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.core.view.ViewCompat;
import com.money.gamehelp.UIUtils;

public class ProxyDialog extends AlertDialog {
    private ProxyCallBack callBack;

    interface ProxyCallBack {
        void onAgree();

        void onDisagree();
    }

    @Override
    public void onBackPressed() {
    }

    public ProxyDialog(Context context) {
        super(context);
        this.callBack = null;
    }

    public void setCallBack(ProxyCallBack proxyCallBack) {
        this.callBack = proxyCallBack;
    }

    private class MyWebViewClient extends WebViewClient {
        private MyWebViewClient() {
        }

        @Override
        public boolean shouldOverrideUrlLoading(WebView webView, String str) {
            Intent intent = new Intent("android.intent.action.VIEW", Uri.parse(str));
            intent.setFlags(805306368);
            ProxyDialog.this.getContext().startActivity(intent);
            return true;
        }
    }

    void openUrl() {
        getContext().startActivity(new Intent("android.intent.action.VIEW", Uri.parse(getContext().getResources().getString(getContext().getResources().getIdentifier("user_url", "string", getContext().getPackageName())))));
    }

    @Override
    protected void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        LinearLayout linearLayout = new LinearLayout(getContext());
        linearLayout.setLayoutParams(new ViewGroup.LayoutParams(-1, -2));
        linearLayout.setOrientation(1);
        linearLayout.setBackgroundColor(ViewCompat.MEASURED_STATE_MASK);
        TextView textView = new TextView(getContext());
        textView.setText("服务协议与隐私政策");
        textView.setTextSize(20.0f);
        textView.setPadding(0, 0, 0, 20);
        linearLayout.addView(textView);
        WebView webView = new WebView(getContext());
        webView.setLayoutParams(new ViewGroup.LayoutParams((int) (UIUtils.getScreenWidthInPx(getContext()) * 0.8d), (int) (UIUtils.getScreenHeightInPx(getContext()) * 0.6d)));
        webView.getSettings().setJavaScriptEnabled(true);
        webView.setWebViewClient(new MyWebViewClient());
        webView.loadUrl("https://tcb-5eaasfnetb4ytx3-6co0237aaa63-1252168680.tcloudbaseapp.com/xieyi/common.html");
        linearLayout.addView(webView);
        LinearLayout linearLayout2 = new LinearLayout(getContext());
        linearLayout2.setLayoutParams(new ViewGroup.LayoutParams(-1, -2));
        linearLayout2.setOrientation(0);
        linearLayout2.setWeightSum(3.0f);
        linearLayout2.setBackgroundColor(-12303292);
        LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(0, -2, 1.0f);
        layoutParams.gravity = 17;
        LinearLayout.LayoutParams layoutParams2 = new LinearLayout.LayoutParams(0, -2, 1.0f);
        layoutParams2.gravity = 17;
        LinearLayout.LayoutParams layoutParams3 = new LinearLayout.LayoutParams(0, -2, 1.0f);
        layoutParams3.gravity = 17;
        Button button = new Button(getContext());
        button.setText("同意并继续");
        button.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                if (ProxyDialog.this.callBack != null) {
                    ProxyDialog.this.callBack.onAgree();
                }
                ProxyDialog.this.dismiss();
            }
        });
        button.setLayoutParams(layoutParams);
        Button button2 = new Button(getContext());
        button2.setText("查看协议");
        button2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                ProxyDialog.this.openUrl();
            }
        });
        button2.setLayoutParams(layoutParams2);
        Button button3 = new Button(getContext());
        button3.setText("退出");
        button3.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                if (ProxyDialog.this.callBack != null) {
                    ProxyDialog.this.callBack.onDisagree();
                }
                ProxyDialog.this.dismiss();
            }
        });
        button3.setLayoutParams(layoutParams3);
        linearLayout2.addView(button);
        linearLayout2.addView(button2);
        linearLayout2.addView(button3);
        linearLayout.addView(linearLayout2);
        setContentView(linearLayout);
    }
}