Notify v1.3版本的 MD5 值为:895e81227cabff93166e4db568124d5d

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


package com.notify.app;

import android.app.AlertDialog;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.res.ColorStateList;
import android.graphics.Color;
import android.graphics.PorterDuff;
import android.graphics.Typeface;
import android.graphics.drawable.GradientDrawable;
import android.graphics.drawable.RippleDrawable;
import android.os.Bundle;
import android.text.util.Linkify;
import android.util.SparseBooleanArray;
import android.util.TypedValue;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListAdapter;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import androidx.cardview.widget.CardView;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.sketchify.util.connection;
import de.hdodenhof.circleimageview.CircleImageView;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.Random;
import org.apache.http.protocol.HTTP;
public class ProjectActivity extends AppCompatActivity {
    private CardView cardview1;
    private SharedPreferences data;
    private LinearLayout header;
    private ImageView imageview1;
    private ImageView imageview3;
    private ImageView imageview4;
    private ImageView imageview5;
    private ImageView imageview6;
    private LinearLayout linear15;
    private LinearLayout linear16;
    private LinearLayout linear17;
    private LinearLayout linear18;
    private LinearLayout linear19;
    private LinearLayout linear20;
    private LinearLayout linear21;
    private LinearLayout linear3;
    private LinearLayout linear4;
    private ListView listview1;
    private TextView textview1;
    private TextView textview2;
    private TextView textview5;
    private ArrayList<HashMap<String, Object>> listmap = new ArrayList<>();
    private Intent go = new Intent();

    @Override
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setContentView(R.layout.project);
        initialize(bundle);
        initializeLogic();
    }

    private void initialize(Bundle bundle) {
        this.linear17 = (LinearLayout) findViewById(R.id.linear17);
        this.header = (LinearLayout) findViewById(R.id.header);
        this.linear15 = (LinearLayout) findViewById(R.id.linear15);
        this.linear16 = (LinearLayout) findViewById(R.id.linear16);
        this.cardview1 = (CardView) findViewById(R.id.cardview1);
        this.linear3 = (LinearLayout) findViewById(R.id.linear3);
        this.linear4 = (LinearLayout) findViewById(R.id.linear4);
        this.linear20 = (LinearLayout) findViewById(R.id.linear20);
        this.linear19 = (LinearLayout) findViewById(R.id.linear19);
        this.imageview1 = (ImageView) findViewById(R.id.imageview1);
        this.textview1 = (TextView) findViewById(R.id.textview1);
        this.textview2 = (TextView) findViewById(R.id.textview2);
        this.imageview5 = (ImageView) findViewById(R.id.imageview5);
        this.imageview4 = (ImageView) findViewById(R.id.imageview4);
        this.linear18 = (LinearLayout) findViewById(R.id.linear18);
        this.textview5 = (TextView) findViewById(R.id.textview5);
        this.imageview3 = (ImageView) findViewById(R.id.imageview3);
        this.listview1 = (ListView) findViewById(R.id.listview1);
        this.linear21 = (LinearLayout) findViewById(R.id.linear21);
        this.imageview6 = (ImageView) findViewById(R.id.imageview6);
        this.data = getSharedPreferences("data", 0);
        this.linear15.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                ProjectActivity.this.startActivity(new Intent(ProjectActivity.this, HomeActivity.class));
            }
        });
        this.linear20.setOnLongClickListener(new View.OnLongClickListener() {
            @Override
            public boolean onLongClick(View view) {
                SketchwareUtil.showMessage(ProjectActivity.this.getApplicationContext(), "Notification History ");
                return true;
            }
        });
        this.linear20.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                ProjectActivity.this.startActivity(new Intent(ProjectActivity.this, NotificationHistoryActivity.class));
            }
        });
        this.linear19.setOnLongClickListener(new View.OnLongClickListener() {
            @Override
            public boolean onLongClick(View view) {
                SketchwareUtil.showMessage(ProjectActivity.this.getApplicationContext(), "Logs");
                return true;
            }
        });
        this.linear19.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                ProjectActivity.this._MaterialDialog("Logs", "Version 1.3 \n•Now You are able to see your notification history.\n•Error Solved\n•Donation Added ( for support )\n• UI of this application is completely Changed\n• Now You Can Work On Unlimited Projects At same Time\n• New Section Is Added\n• Completely Disconnected With Database ( i.e we didn't store your any activity or Data in our server because we doesn't have any server yet )\n\nHow To Use This Application\n\n• Here is The Link Of YouTube Video\nhttps://youtu.be/4EBVmhxRSps?si=VoIBwecCmer3Xiie\n\n•All Blocks Link Here \nhttps://t.me/notify_apk/5\n\n•Example Project\nhttps://web.sketchub.in/p/24917\n\n•Join Our Telegram Community\nhttps://t.me/notify_apk/", "Cancel", "Done");
            }
        });
        this.imageview4.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
            }
        });
        this.listview1.setOnItemClickListener(new AdapterView.OnItemClickListener() {
            @Override
            public void onItemClick(AdapterView<?> adapterView, View view, int i, long j) {
                ProjectActivity.this.go.putExtra("app", ((HashMap) ProjectActivity.this.listmap.get(i)).get("app").toString());
                ProjectActivity.this.go.putExtra("package", ((HashMap) ProjectActivity.this.listmap.get(i)).get("package").toString());
                ProjectActivity.this.go.putExtra("key", ((HashMap) ProjectActivity.this.listmap.get(i)).get("key").toString());
                ProjectActivity.this.go.setClass(ProjectActivity.this.getApplicationContext(), SendNotificationActivity.class);
                ProjectActivity.this.startActivity(ProjectActivity.this.go);
            }
        });
        this.imageview6.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                ProjectActivity.this.startActivity(new Intent(ProjectActivity.this, AmountActivity.class));
            }
        });
    }

    private void initializeLogic() {
        connection.Sketchify(this, "pub-sketchify-1853963285", this);
        getWindow().getDecorView().setSystemUiVisibility(8192);
        getWindow().setStatusBarColor(-1);
        GradientDrawable gradientDrawable = new GradientDrawable();
        gradientDrawable.setColor(-1);
        gradientDrawable.setCornerRadius(getDip(0));
        this.header.setElevation(getDip(0));
        this.header.setBackground(new RippleDrawable(new ColorStateList(new int[][]{new int[0]}, new int[]{-1}), gradientDrawable, null));
        GradientDrawable gradientDrawable2 = new GradientDrawable();
        gradientDrawable2.setColor(-1118482);
        gradientDrawable2.setCornerRadius(getDip(360));
        gradientDrawable2.setStroke((int) getDip(0), -14575885);
        this.linear18.setElevation(getDip(0));
        this.linear18.setBackground(new RippleDrawable(new ColorStateList(new int[][]{new int[0]}, new int[]{-1}), gradientDrawable2, null));
        this.textview5.setTypeface(Typeface.createFromAsset(getAssets(), "fonts/google_sans.ttf"), 1);
        this.textview1.setTypeface(Typeface.createFromAsset(getAssets(), "fonts/productsansbold.ttf"), 0);
        this.textview2.setTypeface(Typeface.createFromAsset(getAssets(), "fonts/google_sans.ttf"), 0);
        this.imageview3.setColorFilter(-14575885, PorterDuff.Mode.MULTIPLY);
        if (!this.data.getString("project", "").equals("")) {
            this.listmap = (ArrayList) new Gson().fromJson(this.data.getString("project", ""), new TypeToken<ArrayList<HashMap<String, Object>>>() {
            }.getType());
            Collections.reverse(this.listmap);
            this.listview1.setAdapter((ListAdapter) new Listview1Adapter(this.listmap));
            ((BaseAdapter) this.listview1.getAdapter()).notifyDataSetChanged();
        }
        this.cardview1.setCardBackgroundColor(-1);
        this.cardview1.setRadius(30.0f);
        this.cardview1.setCardElevation(0.0f);
    }

    @Override
    public void onResume() {
        super.onResume();
        if (!this.data.getString("project", "").equals("")) {
            this.listmap.clear();
            this.listmap = (ArrayList) new Gson().fromJson(this.data.getString("project", ""), new TypeToken<ArrayList<HashMap<String, Object>>>() {
            }.getType());
            Collections.reverse(this.listmap);
            this.listview1.setAdapter((ListAdapter) new Listview1Adapter(this.listmap));
            ((BaseAdapter) this.listview1.getAdapter()).notifyDataSetChanged();
        }
    }

    public void _MaterialDialog(String str, String str2, String str3, String str4) {
        final AlertDialog create = new AlertDialog.Builder(this).create();
        View inflate = getLayoutInflater().inflate(R.layout.material_dialog, (ViewGroup) null);
        create.getWindow().setBackgroundDrawableResource(17170445);
        create.setView(inflate);
        TextView textView = (TextView) inflate.findViewById(R.id.t1);
        TextView textView2 = (TextView) inflate.findViewById(R.id.t2);
        TextView textView3 = (TextView) inflate.findViewById(R.id.b1);
        TextView textView4 = (TextView) inflate.findViewById(R.id.b2);
        LinearLayout linearLayout = (LinearLayout) inflate.findViewById(R.id.linear3);
        textView.setTypeface(Typeface.createFromAsset(getAssets(), "fonts/google_sans.ttf"), 1);
        textView2.setTypeface(Typeface.createFromAsset(getAssets(), "fonts/google_sans.ttf"), 0);
        textView3.setTypeface(Typeface.createFromAsset(getAssets(), "fonts/google_sans.ttf"), 1);
        textView4.setTypeface(Typeface.createFromAsset(getAssets(), "fonts/google_sans.ttf"), 1);
        textView.setText(str);
        textView2.setClickable(true);
        Linkify.addLinks(textView2, 15);
        textView2.setLinkTextColor(Color.parseColor("#FF2196F3"));
        textView2.setLinksClickable(true);
        textView2.setText(str2);
        textView3.setText(str3);
        textView4.setText(str4);
        _rippleRoundStroke((LinearLayout) inflate.findViewById(R.id.bg), "#FFFFFF", "#000000", 15.0d, 0.0d, "#000000");
        textView3.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                create.dismiss();
            }
        });
        textView4.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                create.dismiss();
            }
        });
        create.setCancelable(true);
        create.show();
    }

    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));
    }

    public class Listview1Adapter extends BaseAdapter {
        ArrayList<HashMap<String, Object>> _data;

        public Listview1Adapter(ArrayList<HashMap<String, Object>> arrayList) {
            this._data = arrayList;
        }

        @Override
        public int getCount() {
            return this._data.size();
        }

        @Override
        public HashMap<String, Object> getItem(int i) {
            return this._data.get(i);
        }

        @Override
        public long getItemId(int i) {
            return i;
        }

        @Override
        public View getView(final int i, View view, ViewGroup viewGroup) {
            LayoutInflater layoutInflater = ProjectActivity.this.getLayoutInflater();
            if (view == null) {
                view = layoutInflater.inflate(R.layout.project_list, (ViewGroup) null);
            }
            LinearLayout linearLayout = (LinearLayout) view.findViewById(R.id.linear5);
            LinearLayout linearLayout2 = (LinearLayout) view.findViewById(R.id.header);
            LinearLayout linearLayout3 = (LinearLayout) view.findViewById(R.id.linear3);
            LinearLayout linearLayout4 = (LinearLayout) view.findViewById(R.id.linear4);
            CircleImageView circleImageView = (CircleImageView) view.findViewById(R.id.circleimageview1);
            TextView textView = (TextView) view.findViewById(R.id.apk_name);
            TextView textView2 = (TextView) view.findViewById(R.id.package_name);
            ImageView imageView = (ImageView) view.findViewById(R.id.imageview1);
            textView.setText(this._data.get(i).get("app").toString());
            textView2.setText(this._data.get(i).get("package").toString());
            textView.setTypeface(Typeface.createFromAsset(ProjectActivity.this.getAssets(), "fonts/google_sans.ttf"), 0);
            textView2.setTypeface(Typeface.createFromAsset(ProjectActivity.this.getAssets(), "fonts/google_sans.ttf"), 0);
            ((LinearLayout) view.findViewById(R.id.linear6)).setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View view2) {
                    ProjectActivity.this._MaterialDialog("Project Details ", "• App Name\n".concat(Listview1Adapter.this._data.get(i).get("app").toString().concat("\n• Project Package\n".concat(Listview1Adapter.this._data.get(i).get("package").toString().concat("\n• Server Key\n".concat(Listview1Adapter.this._data.get(i).get("key").toString()))))), HTTP.CONN_CLOSE, "Done");
                }
            });
            return view;
        }
    }

    @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;
    }
}