ZStore v1.7版本的 MD5 值为:ca9bb200afd8d690876bd39318f8215c
以下内容为反编译后的 EditorActivity.java 源代码,内容仅作参考
package com.zackiestudios.zstore;
import android.animation.TimeInterpolator;
import android.app.AlertDialog;
import android.app.DownloadManager;
import android.app.ProgressDialog;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.res.ColorStateList;
import android.graphics.Color;
import android.graphics.Typeface;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.GradientDrawable;
import android.graphics.drawable.RippleDrawable;
import android.net.Uri;
import android.os.Bundle;
import android.os.Environment;
import android.text.TextUtils;
import android.text.util.Linkify;
import android.transition.AutoTransition;
import android.transition.TransitionManager;
import android.util.SparseBooleanArray;
import android.util.TypedValue;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.DecelerateInterpolator;
import android.webkit.MimeTypeMap;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.EditText;
import android.widget.HorizontalScrollView;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.PopupMenu;
import android.widget.ScrollView;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import androidx.cardview.widget.CardView;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import com.applovin.mediation.MaxAd;
import com.applovin.mediation.MaxError;
import com.applovin.mediation.MaxReward;
import com.applovin.mediation.MaxRewardedAdListener;
import com.applovin.mediation.ads.MaxRewardedAd;
import com.bumptech.glide.Glide;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.OnFailureListener;
import com.google.android.gms.tasks.OnSuccessListener;
import com.google.android.gms.tasks.Task;
import com.google.android.material.bottomsheet.BottomSheetDialog;
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.google.firebase.storage.FileDownloadTask;
import com.google.firebase.storage.FirebaseStorage;
import com.google.firebase.storage.OnProgressListener;
import com.google.firebase.storage.StorageReference;
import com.google.firebase.storage.UploadTask;
import com.zackiestudios.zstore.RequestNetwork;
import java.io.File;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.HashMap;
import java.util.Random;
import java.util.Timer;
import java.util.TimerTask;
public class EditorActivity extends AppCompatActivity {
private EditText Bana;
private EditText Rewarded1;
private ChildEventListener _Ads_child_listener;
private ChildEventListener _Contact_child_listener;
private ChildEventListener _Users_child_listener;
private OnCompleteListener<AuthResult> _auth_create_user_listener;
private OnCompleteListener<Void> _auth_reset_password_listener;
private OnCompleteListener<AuthResult> _auth_sign_in_listener;
private ChildEventListener _comment_child_listener;
private OnSuccessListener _icons_delete_success_listener;
private OnProgressListener _icons_download_progress_listener;
private OnSuccessListener<FileDownloadTask.TaskSnapshot> _icons_download_success_listener;
private OnFailureListener _icons_failure_listener;
private OnProgressListener _icons_upload_progress_listener;
private OnCompleteListener<Uri> _icons_upload_success_listener;
private ChildEventListener _like_child_listener;
private RequestNetwork.RequestListener _network_request_listener;
private ChildEventListener _project_child_listener;
private OnSuccessListener _projects_delete_success_listener;
private OnProgressListener _projects_download_progress_listener;
private OnSuccessListener<FileDownloadTask.TaskSnapshot> _projects_download_success_listener;
private OnFailureListener _projects_failure_listener;
private OnProgressListener _projects_upload_progress_listener;
private OnCompleteListener<Uri> _projects_upload_success_listener;
private OnSuccessListener _screenshot1_delete_success_listener;
private OnProgressListener _screenshot1_download_progress_listener;
private OnSuccessListener<FileDownloadTask.TaskSnapshot> _screenshot1_download_success_listener;
private OnFailureListener _screenshot1_failure_listener;
private OnProgressListener _screenshot1_upload_progress_listener;
private OnCompleteListener<Uri> _screenshot1_upload_success_listener;
private OnSuccessListener _screenshot2_delete_success_listener;
private OnProgressListener _screenshot2_download_progress_listener;
private OnSuccessListener<FileDownloadTask.TaskSnapshot> _screenshot2_download_success_listener;
private OnFailureListener _screenshot2_failure_listener;
private OnProgressListener _screenshot2_upload_progress_listener;
private OnCompleteListener<Uri> _screenshot2_upload_success_listener;
private OnSuccessListener _screenshot3_delete_success_listener;
private OnProgressListener _screenshot3_download_progress_listener;
private OnSuccessListener<FileDownloadTask.TaskSnapshot> _screenshot3_download_success_listener;
private OnFailureListener _screenshot3_failure_listener;
private OnProgressListener _screenshot3_upload_progress_listener;
private OnCompleteListener<Uri> _screenshot3_upload_success_listener;
private OnSuccessListener _screenshot4_delete_success_listener;
private OnProgressListener _screenshot4_download_progress_listener;
private OnSuccessListener<FileDownloadTask.TaskSnapshot> _screenshot4_download_success_listener;
private OnFailureListener _screenshot4_failure_listener;
private OnProgressListener _screenshot4_upload_progress_listener;
private OnCompleteListener<Uri> _screenshot4_upload_success_listener;
private OnSuccessListener _screenshot5_delete_success_listener;
private OnProgressListener _screenshot5_download_progress_listener;
private OnSuccessListener<FileDownloadTask.TaskSnapshot> _screenshot5_download_success_listener;
private OnFailureListener _screenshot5_failure_listener;
private OnProgressListener _screenshot5_upload_progress_listener;
private OnCompleteListener<Uri> _screenshot5_upload_success_listener;
private OnSuccessListener _screenshot6_delete_success_listener;
private OnProgressListener _screenshot6_download_progress_listener;
private OnSuccessListener<FileDownloadTask.TaskSnapshot> _screenshot6_download_success_listener;
private OnFailureListener _screenshot6_failure_listener;
private OnProgressListener _screenshot6_upload_progress_listener;
private OnCompleteListener<Uri> _screenshot6_upload_success_listener;
private ChildEventListener _suggestion_child_listener;
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 Button button2;
private Button button3;
private Button button4;
private Button button5;
private Button button6;
private Button button7;
private Button button9;
private CardView cardview3;
private CardView cardview4;
private CardView cardview5;
private CardView cardview6;
private CardView cardview7;
private CardView cardview8;
private CardView cardview_icon;
private EditText category_edit;
private CheckBox checkbox_comment_disable;
private LinearLayout comment_layout;
private TextView comments;
private ProgressDialog coreprog;
private TextView date;
private TextView description;
private EditText description_edit;
private SharedPreferences developer;
private TextView developer_names;
private EditText download_edit;
private TextView downloads;
private HorizontalScrollView hscroll1;
private HorizontalScrollView hscroll2;
private ImageView icon;
private EditText icon_edit;
private ImageView imageview18;
private ImageView imageview20;
private ImageView imageview21;
private ImageView imageview22;
private ImageView imageview_like;
private ImageView img_back;
private ImageView img_option;
private LinearLayout leniar_verified;
private TextView likes;
private LinearLayout linear1;
private LinearLayout linear10;
private LinearLayout linear11;
private LinearLayout linear12;
private LinearLayout linear13;
private LinearLayout linear14;
private LinearLayout linear2;
private LinearLayout linear3;
private LinearLayout linear4;
private LinearLayout linear5;
private LinearLayout linear59;
private LinearLayout linear6;
private LinearLayout linear61;
private LinearLayout linear7;
private LinearLayout linear8;
private LinearLayout linear9;
private LinearLayout linear_box_1;
private LinearLayout linear_box_3;
private LinearLayout linear_box_4;
private LinearLayout linear_box_5;
private LinearLayout linear_box_6;
private LinearLayout linear_box_7;
private LinearLayout linear_box_8;
private LinearLayout linear_category;
private LinearLayout linear_dash;
private LinearLayout linear_description;
private LinearLayout linear_download;
private LinearLayout linear_editor;
private LinearLayout linear_icon;
private LinearLayout linear_likes;
private LinearLayout linear_screenshot;
private LinearLayout linear_video;
private RequestNetwork network;
MaxRewardedAd rewarded;
private ImageView screen1;
private ImageView screen2;
private ImageView screen3;
private ImageView screen4;
private ImageView screen5;
private ImageView screen6;
private EditText size_edit;
private LinearLayout sketchware;
private TextView textview10;
private TextView textview12;
private TextView textview28;
private TextView textview3;
private TextView textview39;
private TextView textview4;
private TextView textview45;
private TextView textview47;
private TextView textview48;
private TextView textview5;
private TextView textview6;
private TextView textview_category;
private TextView textview_download;
private TextView textview_username;
private TextView textview_verified;
private TimerTask timer;
private TextView title;
private EditText title_edit;
private LinearLayout toolbar;
private SharedPreferences users;
private ScrollView vscroll1;
private EditText yt_edit;
private Timer _timer = new Timer();
private FirebaseDatabase _firebase = FirebaseDatabase.getInstance();
private FirebaseStorage _firebase_storage = FirebaseStorage.getInstance();
private String key = "";
private String uid = "";
private double like_num = 0.0d;
private boolean liked = false;
private String like_key = "";
private double comment_num = 0.0d;
private String icon_url = "";
private String download_url = "";
private String yt_url = "";
private String ss1 = "";
private String ss2 = "";
private String ss3 = "";
private String ss4 = "";
private String ss5 = "";
private String ss6 = "";
private String comments_type = "";
private HashMap<String, Object> like_map = new HashMap<>();
private HashMap<String, Object> comment_map = new HashMap<>();
private String total_projects = "";
private HashMap<String, Object> all = new HashMap<>();
private HashMap<String, Object> report_map = new HashMap<>();
private double total_downloads = 0.0d;
private HashMap<String, Object> map = new HashMap<>();
private String share = "";
private String Contacts = "";
private String Reward = "";
private String Interstitial = "";
private String Banner = "";
private DatabaseReference project = this._firebase.getReference("projects/normal");
private DatabaseReference like = this._firebase.getReference("likes");
private DatabaseReference comment = this._firebase.getReference("comments");
private DatabaseReference Users = this._firebase.getReference("Users");
private DatabaseReference suggestion = this._firebase.getReference("other/suggestion");
private Calendar Cal = Calendar.getInstance();
private Intent intent = new Intent();
private Intent view = new Intent();
private StorageReference screenshot1 = this._firebase_storage.getReference("screenshots/screenshot1");
private StorageReference screenshot2 = this._firebase_storage.getReference("screenshots/screenshot2");
private StorageReference screenshot3 = this._firebase_storage.getReference("screenshots/screenshot3");
private StorageReference screenshot4 = this._firebase_storage.getReference("screenshots/screenshot4");
private StorageReference screenshot5 = this._firebase_storage.getReference("screenshots/screenshot5");
private StorageReference screenshot6 = this._firebase_storage.getReference("screenshots/screenshot6");
private StorageReference icons = this._firebase_storage.getReference("icon");
private StorageReference projects = this._firebase_storage.getReference("projects");
private DatabaseReference Contact = this._firebase.getReference("CT");
private DatabaseReference Ads = this._firebase.getReference("Net");
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
setContentView(R.layout.editor);
initialize(bundle);
FirebaseApp.initializeApp(this);
if (ContextCompat.checkSelfPermission(this, "android.permission.READ_EXTERNAL_STORAGE") == -1 || ContextCompat.checkSelfPermission(this, "android.permission.WRITE_EXTERNAL_STORAGE") == -1) {
ActivityCompat.requestPermissions(this, new String[]{"android.permission.READ_EXTERNAL_STORAGE", "android.permission.WRITE_EXTERNAL_STORAGE"}, 1000);
} else {
initializeLogic();
}
}
@Override
public void onRequestPermissionsResult(int i, String[] strArr, int[] iArr) {
super.onRequestPermissionsResult(i, strArr, iArr);
if (i == 1000) {
initializeLogic();
}
}
private void initialize(Bundle bundle) {
this.vscroll1 = (ScrollView) findViewById(R.id.vscroll1);
this.linear1 = (LinearLayout) findViewById(R.id.linear1);
this.toolbar = (LinearLayout) findViewById(R.id.toolbar);
this.linear2 = (LinearLayout) findViewById(R.id.linear2);
this.hscroll2 = (HorizontalScrollView) findViewById(R.id.hscroll2);
this.linear4 = (LinearLayout) findViewById(R.id.linear4);
this.linear61 = (LinearLayout) findViewById(R.id.linear61);
this.linear3 = (LinearLayout) findViewById(R.id.linear3);
this.linear_screenshot = (LinearLayout) findViewById(R.id.linear_screenshot);
this.linear_description = (LinearLayout) findViewById(R.id.linear_description);
this.linear_dash = (LinearLayout) findViewById(R.id.linear_dash);
this.textview3 = (TextView) findViewById(R.id.textview3);
this.linear5 = (LinearLayout) findViewById(R.id.linear5);
this.linear6 = (LinearLayout) findViewById(R.id.linear6);
this.linear8 = (LinearLayout) findViewById(R.id.linear8);
this.linear59 = (LinearLayout) findViewById(R.id.linear59);
this.img_back = (ImageView) findViewById(R.id.img_back);
this.Rewarded1 = (EditText) findViewById(R.id.Rewarded1);
this.Bana = (EditText) findViewById(R.id.Bana);
this.textview10 = (TextView) findViewById(R.id.textview10);
this.imageview_like = (ImageView) findViewById(R.id.imageview_like);
this.img_option = (ImageView) findViewById(R.id.img_option);
this.linear_icon = (LinearLayout) findViewById(R.id.linear_icon);
this.linear7 = (LinearLayout) findViewById(R.id.linear7);
this.cardview_icon = (CardView) findViewById(R.id.cardview_icon);
this.icon = (ImageView) findViewById(R.id.icon);
this.linear9 = (LinearLayout) findViewById(R.id.linear9);
this.textview_username = (TextView) findViewById(R.id.textview_username);
this.linear11 = (LinearLayout) findViewById(R.id.linear11);
this.linear12 = (LinearLayout) findViewById(R.id.linear12);
this.title = (TextView) findViewById(R.id.title);
this.linear13 = (LinearLayout) findViewById(R.id.linear13);
this.linear_likes = (LinearLayout) findViewById(R.id.linear_likes);
this.linear_editor = (LinearLayout) findViewById(R.id.linear_editor);
this.leniar_verified = (LinearLayout) findViewById(R.id.leniar_verified);
this.linear_category = (LinearLayout) findViewById(R.id.linear_category);
this.sketchware = (LinearLayout) findViewById(R.id.sketchware);
this.likes = (TextView) findViewById(R.id.likes);
this.imageview21 = (ImageView) findViewById(R.id.imageview21);
this.textview39 = (TextView) findViewById(R.id.textview39);
this.imageview22 = (ImageView) findViewById(R.id.imageview22);
this.textview_verified = (TextView) findViewById(R.id.textview_verified);
this.textview_category = (TextView) findViewById(R.id.textview_category);
this.textview28 = (TextView) findViewById(R.id.textview28);
this.linear14 = (LinearLayout) findViewById(R.id.linear14);
this.linear_download = (LinearLayout) findViewById(R.id.linear_download);
this.linear_video = (LinearLayout) findViewById(R.id.linear_video);
this.textview_download = (TextView) findViewById(R.id.textview_download);
this.imageview20 = (ImageView) findViewById(R.id.imageview20);
this.textview45 = (TextView) findViewById(R.id.textview45);
this.comments = (TextView) findViewById(R.id.comments);
this.imageview18 = (ImageView) findViewById(R.id.imageview18);
this.hscroll1 = (HorizontalScrollView) findViewById(R.id.hscroll1);
this.linear10 = (LinearLayout) findViewById(R.id.linear10);
this.cardview3 = (CardView) findViewById(R.id.cardview3);
this.cardview4 = (CardView) findViewById(R.id.cardview4);
this.cardview5 = (CardView) findViewById(R.id.cardview5);
this.cardview6 = (CardView) findViewById(R.id.cardview6);
this.cardview7 = (CardView) findViewById(R.id.cardview7);
this.cardview8 = (CardView) findViewById(R.id.cardview8);
this.screen1 = (ImageView) findViewById(R.id.screen1);
this.screen2 = (ImageView) findViewById(R.id.screen2);
this.screen3 = (ImageView) findViewById(R.id.screen3);
this.screen4 = (ImageView) findViewById(R.id.screen4);
this.screen5 = (ImageView) findViewById(R.id.screen5);
this.screen6 = (ImageView) findViewById(R.id.screen6);
this.textview12 = (TextView) findViewById(R.id.textview12);
this.description = (TextView) findViewById(R.id.description);
this.textview4 = (TextView) findViewById(R.id.textview4);
this.date = (TextView) findViewById(R.id.date);
this.textview5 = (TextView) findViewById(R.id.textview5);
this.developer_names = (TextView) findViewById(R.id.developer_names);
this.textview6 = (TextView) findViewById(R.id.textview6);
this.downloads = (TextView) findViewById(R.id.downloads);
this.textview48 = (TextView) findViewById(R.id.textview48);
this.comment_layout = (LinearLayout) findViewById(R.id.comment_layout);
this.linear_box_3 = (LinearLayout) findViewById(R.id.linear_box_3);
this.linear_box_8 = (LinearLayout) findViewById(R.id.linear_box_8);
this.linear_box_4 = (LinearLayout) findViewById(R.id.linear_box_4);
this.linear_box_5 = (LinearLayout) findViewById(R.id.linear_box_5);
this.linear_box_1 = (LinearLayout) findViewById(R.id.linear_box_1);
this.linear_box_6 = (LinearLayout) findViewById(R.id.linear_box_6);
this.linear_box_7 = (LinearLayout) findViewById(R.id.linear_box_7);
this.textview47 = (TextView) findViewById(R.id.textview47);
this.checkbox_comment_disable = (CheckBox) findViewById(R.id.checkbox_comment_disable);
this.title_edit = (EditText) findViewById(R.id.title_edit);
this.button2 = (Button) findViewById(R.id.button2);
this.download_edit = (EditText) findViewById(R.id.download_edit);
this.button9 = (Button) findViewById(R.id.button9);
this.yt_edit = (EditText) findViewById(R.id.yt_edit);
this.button4 = (Button) findViewById(R.id.button4);
this.description_edit = (EditText) findViewById(R.id.description_edit);
this.button6 = (Button) findViewById(R.id.button6);
this.size_edit = (EditText) findViewById(R.id.size_edit);
this.button7 = (Button) findViewById(R.id.button7);
this.category_edit = (EditText) findViewById(R.id.category_edit);
this.button5 = (Button) findViewById(R.id.button5);
this.icon_edit = (EditText) findViewById(R.id.icon_edit);
this.button3 = (Button) findViewById(R.id.button3);
this.auth = FirebaseAuth.getInstance();
this.users = getSharedPreferences("users", 0);
this.developer = getSharedPreferences("developer", 0);
this.network = new RequestNetwork(this);
this.linear3.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
EditorActivity.this.intent.setClass(EditorActivity.this.getApplicationContext(), CommentsActivity.class);
EditorActivity.this.intent.putExtra("title", EditorActivity.this.title.getText().toString());
EditorActivity.this.intent.putExtra("key", EditorActivity.this.key);
EditorActivity.this.intent.putExtra("uid", EditorActivity.this.uid);
EditorActivity editorActivity = EditorActivity.this;
editorActivity.startActivity(editorActivity.intent);
EditorActivity.this.overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
}
});
this.img_back.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
EditorActivity.this.finish();
}
});
this.imageview_like.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (SketchwareUtil.isConnected(EditorActivity.this.getApplicationContext())) {
if (EditorActivity.this.liked) {
EditorActivity.this.like_map = new HashMap();
EditorActivity.this.like_map.put("value", "false");
EditorActivity.this.like_map.put("key", EditorActivity.this.key);
EditorActivity.this.like_map.put("like_key", EditorActivity.this.like_key);
EditorActivity.this.like_map.put("uid", FirebaseAuth.getInstance().getCurrentUser().getUid());
EditorActivity.this.like.child(EditorActivity.this.like_key).updateChildren(EditorActivity.this.like_map);
return;
}
EditorActivity.this.like_map = new HashMap();
EditorActivity.this.like_map.put("value", "true");
EditorActivity.this.like_map.put("key", EditorActivity.this.key);
EditorActivity.this.like_map.put("like_key", EditorActivity.this.like_key);
EditorActivity.this.like_map.put("uid", FirebaseAuth.getInstance().getCurrentUser().getUid());
EditorActivity.this.like.child(EditorActivity.this.like_key).updateChildren(EditorActivity.this.like_map);
return;
}
SketchwareUtil.showMessage(EditorActivity.this.getApplicationContext(), "Sem Conexão com a Internet");
}
});
this.img_option.setOnClickListener(new AnonymousClass4());
this.textview_username.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (SketchwareUtil.isConnected(EditorActivity.this.getApplicationContext())) {
if (!EditorActivity.this.uid.equals("")) {
EditorActivity.this.intent.setClass(EditorActivity.this.getApplicationContext(), AccountActivity.class);
EditorActivity.this.developer.edit().putString("uid", EditorActivity.this.uid).commit();
EditorActivity editorActivity = EditorActivity.this;
editorActivity.startActivity(editorActivity.intent);
EditorActivity.this.overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
return;
}
SketchwareUtil.showMessage(EditorActivity.this.getApplicationContext(), "Ocorreu um erro");
return;
}
SketchwareUtil.showMessage(EditorActivity.this.getApplicationContext(), "Sem Internet");
}
});
this.linear_download.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (EditorActivity.this.developer.getString("type", "").equals("Free")) {
EditorActivity.this.rewarded.showAd();
EditorActivity.this._Rewarded_Android_By_HarshTek();
EditorActivity editorActivity = EditorActivity.this;
editorActivity._downloadFileToFolder(editorActivity.title.getText().toString(), "/ZStore/Baixados/", EditorActivity.this.download_url);
EditorActivity.this.report_map = new HashMap();
EditorActivity.this.report_map.put("downloads", String.valueOf((long) (EditorActivity.this.total_downloads + 1.0d)));
EditorActivity.this.project.child(EditorActivity.this.key).updateChildren(EditorActivity.this.report_map);
EditorActivity.this.report_map.clear();
}
}
});
this.linear_video.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
EditorActivity.this.view.setAction("android.intent.action.VIEW");
EditorActivity.this.view.setData(Uri.parse("https://youtu.be/".concat(EditorActivity.this.yt_url)));
EditorActivity editorActivity = EditorActivity.this;
editorActivity.startActivity(editorActivity.view);
EditorActivity.this.overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
}
});
this.screen1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (SketchwareUtil.isConnected(EditorActivity.this.getApplicationContext())) {
EditorActivity.this.view.setClass(EditorActivity.this.getApplicationContext(), ImagesActivity.class);
EditorActivity.this.view.putExtra("img", EditorActivity.this.ss1);
EditorActivity editorActivity = EditorActivity.this;
editorActivity.startActivity(editorActivity.view);
return;
}
SketchwareUtil.showMessage(EditorActivity.this.getApplicationContext(), "Sem Conexão com a Internet");
}
});
this.screen2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (SketchwareUtil.isConnected(EditorActivity.this.getApplicationContext())) {
EditorActivity.this.view.setClass(EditorActivity.this.getApplicationContext(), ImagesActivity.class);
EditorActivity.this.view.putExtra("img", EditorActivity.this.ss2);
EditorActivity editorActivity = EditorActivity.this;
editorActivity.startActivity(editorActivity.view);
return;
}
SketchwareUtil.showMessage(EditorActivity.this.getApplicationContext(), "Sem Conexão com a Internet");
}
});
this.screen3.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (SketchwareUtil.isConnected(EditorActivity.this.getApplicationContext())) {
EditorActivity.this.view.setClass(EditorActivity.this.getApplicationContext(), ImagesActivity.class);
EditorActivity.this.view.putExtra("img", EditorActivity.this.ss3);
EditorActivity editorActivity = EditorActivity.this;
editorActivity.startActivity(editorActivity.view);
return;
}
SketchwareUtil.showMessage(EditorActivity.this.getApplicationContext(), "Sem Conexão com a Internet");
}
});
this.screen4.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (SketchwareUtil.isConnected(EditorActivity.this.getApplicationContext())) {
EditorActivity.this.view.setClass(EditorActivity.this.getApplicationContext(), ImagesActivity.class);
EditorActivity.this.view.putExtra("img", EditorActivity.this.ss4);
EditorActivity editorActivity = EditorActivity.this;
editorActivity.startActivity(editorActivity.view);
return;
}
SketchwareUtil.showMessage(EditorActivity.this.getApplicationContext(), "Sem Conexão com a Internet");
}
});
this.screen5.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (SketchwareUtil.isConnected(EditorActivity.this.getApplicationContext())) {
EditorActivity.this.view.setClass(EditorActivity.this.getApplicationContext(), ImagesActivity.class);
EditorActivity.this.view.putExtra("img", EditorActivity.this.ss5);
EditorActivity editorActivity = EditorActivity.this;
editorActivity.startActivity(editorActivity.view);
return;
}
SketchwareUtil.showMessage(EditorActivity.this.getApplicationContext(), "Sem Conexão com a Internet");
}
});
this.screen6.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (SketchwareUtil.isConnected(EditorActivity.this.getApplicationContext())) {
EditorActivity.this.view.setClass(EditorActivity.this.getApplicationContext(), ImagesActivity.class);
EditorActivity.this.view.putExtra("img", EditorActivity.this.ss6);
EditorActivity editorActivity = EditorActivity.this;
editorActivity.startActivity(editorActivity.view);
return;
}
SketchwareUtil.showMessage(EditorActivity.this.getApplicationContext(), "Sem Conexão com a Internet");
}
});
this.checkbox_comment_disable.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean z) {
if (EditorActivity.this.developer.getString("type", "").equals("Free")) {
if (z) {
EditorActivity.this.all = new HashMap();
EditorActivity.this.all.put("comments_disable", "true");
EditorActivity.this.project.child(EditorActivity.this.key).updateChildren(EditorActivity.this.all);
EditorActivity.this.all.clear();
return;
}
EditorActivity.this.all = new HashMap();
EditorActivity.this.all.put("comments_disable", "false");
EditorActivity.this.project.child(EditorActivity.this.key).updateChildren(EditorActivity.this.all);
EditorActivity.this.all.clear();
}
}
});
this.button2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (EditorActivity.this.developer.getString("type", "").equals("Free")) {
EditorActivity.this.all = new HashMap();
EditorActivity.this.all.put("title", EditorActivity.this.title_edit.getText().toString());
EditorActivity.this.project.child(EditorActivity.this.key).updateChildren(EditorActivity.this.all);
EditorActivity.this.all.clear();
}
SketchwareUtil.showMessage(EditorActivity.this.getApplicationContext(), "Salvo com Sucesso!");
}
});
this.button9.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (EditorActivity.this.developer.getString("type", "").equals("Free")) {
EditorActivity.this.all = new HashMap();
EditorActivity.this.all.put("project", EditorActivity.this.download_edit.getText().toString());
EditorActivity.this.project.child(EditorActivity.this.key).updateChildren(EditorActivity.this.all);
EditorActivity.this.all.clear();
}
SketchwareUtil.showMessage(EditorActivity.this.getApplicationContext(), "Salvo com Sucesso!");
}
});
this.button4.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (EditorActivity.this.developer.getString("type", "").equals("Free")) {
EditorActivity.this.all = new HashMap();
EditorActivity.this.all.put("video", EditorActivity.this.yt_edit.getText().toString());
EditorActivity.this.project.child(EditorActivity.this.key).updateChildren(EditorActivity.this.all);
EditorActivity.this.all.clear();
}
SketchwareUtil.showMessage(EditorActivity.this.getApplicationContext(), "Salvo com Sucesso!");
}
});
this.button6.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (EditorActivity.this.developer.getString("type", "").equals("Free")) {
EditorActivity.this.all = new HashMap();
EditorActivity.this.all.put("description", EditorActivity.this.description_edit.getText().toString());
EditorActivity.this.project.child(EditorActivity.this.key).updateChildren(EditorActivity.this.all);
EditorActivity.this.all.clear();
}
SketchwareUtil.showMessage(EditorActivity.this.getApplicationContext(), "Salvo com Sucesso!");
}
});
this.button7.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (EditorActivity.this.developer.getString("type", "").equals("Free")) {
EditorActivity.this.all = new HashMap();
EditorActivity.this.all.put("size", EditorActivity.this.size_edit.getText().toString());
EditorActivity.this.project.child(EditorActivity.this.key).updateChildren(EditorActivity.this.all);
EditorActivity.this.all.clear();
}
SketchwareUtil.showMessage(EditorActivity.this.getApplicationContext(), "Salvo com Sucesso!");
}
});
this.button5.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (EditorActivity.this.developer.getString("type", "").equals("Free")) {
EditorActivity.this.all = new HashMap();
EditorActivity.this.all.put("category", EditorActivity.this.category_edit.getText().toString());
EditorActivity.this.project.child(EditorActivity.this.key).updateChildren(EditorActivity.this.all);
EditorActivity.this.all.clear();
}
SketchwareUtil.showMessage(EditorActivity.this.getApplicationContext(), "Salvo com Sucesso!");
}
});
this.button3.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (EditorActivity.this.developer.getString("type", "").equals("Free")) {
EditorActivity.this.all = new HashMap();
EditorActivity.this.all.put("icon", EditorActivity.this.icon_edit.getText().toString());
EditorActivity.this.project.child(EditorActivity.this.key).updateChildren(EditorActivity.this.all);
EditorActivity.this.all.clear();
}
SketchwareUtil.showMessage(EditorActivity.this.getApplicationContext(), "Salvo com Sucesso!");
}
});
AnonymousClass22 anonymousClass22 = new AnonymousClass22();
this._project_child_listener = anonymousClass22;
this.project.addChildEventListener(anonymousClass22);
ChildEventListener childEventListener = new ChildEventListener() {
@Override
public void onChildMoved(DataSnapshot dataSnapshot, String str) {
}
@Override
public void onChildAdded(DataSnapshot dataSnapshot, String str) {
GenericTypeIndicator<HashMap<String, Object>> genericTypeIndicator = new GenericTypeIndicator<HashMap<String, Object>>() {
};
dataSnapshot.getKey();
HashMap hashMap = (HashMap) dataSnapshot.getValue(genericTypeIndicator);
if (hashMap.containsKey("key") && hashMap.containsKey("value") && hashMap.containsKey("uid") && EditorActivity.this.developer.getString("type", "").equals("Free")) {
if (EditorActivity.this.key.equals(hashMap.get("key").toString()) && hashMap.get("value").toString().equals("true")) {
EditorActivity.this.like_num += 1.0d;
EditorActivity.this.like_map = new HashMap();
EditorActivity.this.like_map.put("likes", String.valueOf((long) EditorActivity.this.like_num));
EditorActivity.this.project.child(EditorActivity.this.key).updateChildren(EditorActivity.this.like_map);
EditorActivity.this.like_map.clear();
}
if (EditorActivity.this.key.equals(hashMap.get("key").toString()) && hashMap.get("uid").toString().equals(FirebaseAuth.getInstance().getCurrentUser().getUid())) {
if (hashMap.get("value").toString().equals("true")) {
EditorActivity.this.imageview_like.setImageResource(R.drawable.icons);
EditorActivity.this.liked = true;
} else {
EditorActivity.this.imageview_like.setImageResource(R.drawable.ic_favorite_outline_black);
EditorActivity.this.liked = false;
}
}
}
}
@Override
public void onChildChanged(DataSnapshot dataSnapshot, String str) {
GenericTypeIndicator<HashMap<String, Object>> genericTypeIndicator = new GenericTypeIndicator<HashMap<String, Object>>() {
};
dataSnapshot.getKey();
HashMap hashMap = (HashMap) dataSnapshot.getValue(genericTypeIndicator);
if (hashMap.containsKey("key") && hashMap.containsKey("value") && hashMap.containsKey("uid") && EditorActivity.this.developer.getString("type", "").equals("Free")) {
if (EditorActivity.this.key.equals(hashMap.get("key").toString()) && hashMap.get("value").toString().equals("true")) {
EditorActivity.this.like_num += 1.0d;
EditorActivity.this.like_map = new HashMap();
EditorActivity.this.like_map.put("likes", String.valueOf((long) EditorActivity.this.like_num));
EditorActivity.this.project.child(EditorActivity.this.key).updateChildren(EditorActivity.this.like_map);
EditorActivity.this.like_map.clear();
}
if (EditorActivity.this.key.equals(hashMap.get("key").toString()) && hashMap.get("uid").toString().equals(FirebaseAuth.getInstance().getCurrentUser().getUid())) {
if (hashMap.get("value").toString().equals("true")) {
EditorActivity.this.imageview_like.setImageResource(R.drawable.icons);
EditorActivity.this.liked = true;
} else {
EditorActivity.this.imageview_like.setImageResource(R.drawable.ic_favorite_outline_black);
EditorActivity.this.liked = false;
}
}
}
}
@Override
public void onChildRemoved(DataSnapshot dataSnapshot) {
GenericTypeIndicator<HashMap<String, Object>> genericTypeIndicator = new GenericTypeIndicator<HashMap<String, Object>>() {
};
dataSnapshot.getKey();
}
@Override
public void onCancelled(DatabaseError databaseError) {
databaseError.getCode();
databaseError.getMessage();
}
};
this._like_child_listener = childEventListener;
this.like.addChildEventListener(childEventListener);
ChildEventListener childEventListener2 = new ChildEventListener() {
@Override
public void onChildMoved(DataSnapshot dataSnapshot, String str) {
}
@Override
public void onChildAdded(DataSnapshot dataSnapshot, String str) {
GenericTypeIndicator<HashMap<String, Object>> genericTypeIndicator = new GenericTypeIndicator<HashMap<String, Object>>() {
};
dataSnapshot.getKey();
HashMap hashMap = (HashMap) dataSnapshot.getValue(genericTypeIndicator);
if (hashMap.containsKey("post_key") && EditorActivity.this.developer.getString("type", "").equals("Free") && EditorActivity.this.key.equals(hashMap.get("post_key").toString())) {
EditorActivity.this.comment_num += 1.0d;
EditorActivity.this.comment_map = new HashMap();
EditorActivity.this.comment_map.put("comments", String.valueOf((long) EditorActivity.this.comment_num));
EditorActivity.this.project.child(EditorActivity.this.key).updateChildren(EditorActivity.this.comment_map);
EditorActivity.this.comment_map.clear();
}
}
@Override
public void onChildChanged(DataSnapshot dataSnapshot, String str) {
GenericTypeIndicator<HashMap<String, Object>> genericTypeIndicator = new GenericTypeIndicator<HashMap<String, Object>>() {
};
dataSnapshot.getKey();
}
@Override
public void onChildRemoved(DataSnapshot dataSnapshot) {
GenericTypeIndicator<HashMap<String, Object>> genericTypeIndicator = new GenericTypeIndicator<HashMap<String, Object>>() {
};
dataSnapshot.getKey();
HashMap hashMap = (HashMap) dataSnapshot.getValue(genericTypeIndicator);
if (hashMap.containsKey("post_key") && EditorActivity.this.developer.getString("type", "").equals("Free") && EditorActivity.this.key.equals(hashMap.get("post_key").toString())) {
EditorActivity.this.comment_num += 1.0d;
EditorActivity.this.comment_map = new HashMap();
EditorActivity.this.comment_map.put("comments", String.valueOf((long) EditorActivity.this.comment_num));
EditorActivity.this.project.child(EditorActivity.this.key).updateChildren(EditorActivity.this.comment_map);
EditorActivity.this.comment_map.clear();
}
}
@Override
public void onCancelled(DatabaseError databaseError) {
databaseError.getCode();
databaseError.getMessage();
}
};
this._comment_child_listener = childEventListener2;
this.comment.addChildEventListener(childEventListener2);
ChildEventListener childEventListener3 = new ChildEventListener() {
@Override
public void onChildMoved(DataSnapshot dataSnapshot, String str) {
}
@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(EditorActivity.this.uid)) {
if (hashMap.containsKey("name")) {
EditorActivity.this.textview_username.setText(hashMap.get("name").toString());
}
if (hashMap.containsKey("projects")) {
EditorActivity.this.total_projects = hashMap.get("projects").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(EditorActivity.this.uid) && hashMap.containsKey("name")) {
EditorActivity.this.textview_username.setText(hashMap.get("name").toString());
}
}
@Override
public void onChildRemoved(DataSnapshot dataSnapshot) {
GenericTypeIndicator<HashMap<String, Object>> genericTypeIndicator = new GenericTypeIndicator<HashMap<String, Object>>() {
};
dataSnapshot.getKey();
}
@Override
public void onCancelled(DatabaseError databaseError) {
databaseError.getCode();
databaseError.getMessage();
}
};
this._Users_child_listener = childEventListener3;
this.Users.addChildEventListener(childEventListener3);
ChildEventListener childEventListener4 = new ChildEventListener() {
@Override
public void onChildMoved(DataSnapshot dataSnapshot, String str) {
}
@Override
public void onChildAdded(DataSnapshot dataSnapshot, String str) {
GenericTypeIndicator<HashMap<String, Object>> genericTypeIndicator = new GenericTypeIndicator<HashMap<String, Object>>() {
};
dataSnapshot.getKey();
}
@Override
public void onChildChanged(DataSnapshot dataSnapshot, String str) {
GenericTypeIndicator<HashMap<String, Object>> genericTypeIndicator = new GenericTypeIndicator<HashMap<String, Object>>() {
};
dataSnapshot.getKey();
}
@Override
public void onChildRemoved(DataSnapshot dataSnapshot) {
GenericTypeIndicator<HashMap<String, Object>> genericTypeIndicator = new GenericTypeIndicator<HashMap<String, Object>>() {
};
dataSnapshot.getKey();
}
@Override
public void onCancelled(DatabaseError databaseError) {
databaseError.getCode();
databaseError.getMessage();
}
};
this._suggestion_child_listener = childEventListener4;
this.suggestion.addChildEventListener(childEventListener4);
this._network_request_listener = new RequestNetwork.RequestListener() {
@Override
public void onErrorResponse(String str, String str2) {
}
@Override
public void onResponse(String str, String str2, HashMap<String, Object> hashMap) {
}
};
this._screenshot1_upload_progress_listener = new OnProgressListener<UploadTask.TaskSnapshot>() {
@Override
public void onProgress(UploadTask.TaskSnapshot taskSnapshot) {
taskSnapshot.getBytesTransferred();
taskSnapshot.getTotalByteCount();
}
};
this._screenshot1_download_progress_listener = new OnProgressListener<FileDownloadTask.TaskSnapshot>() {
@Override
public void onProgress(FileDownloadTask.TaskSnapshot taskSnapshot) {
taskSnapshot.getBytesTransferred();
taskSnapshot.getTotalByteCount();
}
};
this._screenshot1_upload_success_listener = new OnCompleteListener<Uri>() {
@Override
public void onComplete(Task<Uri> task) {
task.getResult().toString();
}
};
this._screenshot1_download_success_listener = new OnSuccessListener<FileDownloadTask.TaskSnapshot>() {
@Override
public void onSuccess(FileDownloadTask.TaskSnapshot taskSnapshot) {
taskSnapshot.getTotalByteCount();
}
};
this._screenshot1_delete_success_listener = new OnSuccessListener() {
@Override
public void onSuccess(Object obj) {
}
};
this._screenshot1_failure_listener = new OnFailureListener() {
@Override
public void onFailure(Exception exc) {
exc.getMessage();
}
};
this._screenshot2_upload_progress_listener = new OnProgressListener<UploadTask.TaskSnapshot>() {
@Override
public void onProgress(UploadTask.TaskSnapshot taskSnapshot) {
taskSnapshot.getBytesTransferred();
taskSnapshot.getTotalByteCount();
}
};
this._screenshot2_download_progress_listener = new OnProgressListener<FileDownloadTask.TaskSnapshot>() {
@Override
public void onProgress(FileDownloadTask.TaskSnapshot taskSnapshot) {
taskSnapshot.getBytesTransferred();
taskSnapshot.getTotalByteCount();
}
};
this._screenshot2_upload_success_listener = new OnCompleteListener<Uri>() {
@Override
public void onComplete(Task<Uri> task) {
task.getResult().toString();
}
};
this._screenshot2_download_success_listener = new OnSuccessListener<FileDownloadTask.TaskSnapshot>() {
@Override
public void onSuccess(FileDownloadTask.TaskSnapshot taskSnapshot) {
taskSnapshot.getTotalByteCount();
}
};
this._screenshot2_delete_success_listener = new OnSuccessListener() {
@Override
public void onSuccess(Object obj) {
}
};
this._screenshot2_failure_listener = new OnFailureListener() {
@Override
public void onFailure(Exception exc) {
exc.getMessage();
}
};
this._screenshot3_upload_progress_listener = new OnProgressListener<UploadTask.TaskSnapshot>() {
@Override
public void onProgress(UploadTask.TaskSnapshot taskSnapshot) {
taskSnapshot.getBytesTransferred();
taskSnapshot.getTotalByteCount();
}
};
this._screenshot3_download_progress_listener = new OnProgressListener<FileDownloadTask.TaskSnapshot>() {
@Override
public void onProgress(FileDownloadTask.TaskSnapshot taskSnapshot) {
taskSnapshot.getBytesTransferred();
taskSnapshot.getTotalByteCount();
}
};
this._screenshot3_upload_success_listener = new OnCompleteListener<Uri>() {
@Override
public void onComplete(Task<Uri> task) {
task.getResult().toString();
}
};
this._screenshot3_download_success_listener = new OnSuccessListener<FileDownloadTask.TaskSnapshot>() {
@Override
public void onSuccess(FileDownloadTask.TaskSnapshot taskSnapshot) {
taskSnapshot.getTotalByteCount();
}
};
this._screenshot3_delete_success_listener = new OnSuccessListener() {
@Override
public void onSuccess(Object obj) {
}
};
this._screenshot3_failure_listener = new OnFailureListener() {
@Override
public void onFailure(Exception exc) {
exc.getMessage();
}
};
this._screenshot4_upload_progress_listener = new OnProgressListener<UploadTask.TaskSnapshot>() {
@Override
public void onProgress(UploadTask.TaskSnapshot taskSnapshot) {
taskSnapshot.getBytesTransferred();
taskSnapshot.getTotalByteCount();
}
};
this._screenshot4_download_progress_listener = new OnProgressListener<FileDownloadTask.TaskSnapshot>() {
@Override
public void onProgress(FileDownloadTask.TaskSnapshot taskSnapshot) {
taskSnapshot.getBytesTransferred();
taskSnapshot.getTotalByteCount();
}
};
this._screenshot4_upload_success_listener = new OnCompleteListener<Uri>() {
@Override
public void onComplete(Task<Uri> task) {
task.getResult().toString();
}
};
this._screenshot4_download_success_listener = new OnSuccessListener<FileDownloadTask.TaskSnapshot>() {
@Override
public void onSuccess(FileDownloadTask.TaskSnapshot taskSnapshot) {
taskSnapshot.getTotalByteCount();
}
};
this._screenshot4_delete_success_listener = new OnSuccessListener() {
@Override
public void onSuccess(Object obj) {
}
};
this._screenshot4_failure_listener = new OnFailureListener() {
@Override
public void onFailure(Exception exc) {
exc.getMessage();
}
};
this._screenshot5_upload_progress_listener = new OnProgressListener<UploadTask.TaskSnapshot>() {
@Override
public void onProgress(UploadTask.TaskSnapshot taskSnapshot) {
taskSnapshot.getBytesTransferred();
taskSnapshot.getTotalByteCount();
}
};
this._screenshot5_download_progress_listener = new OnProgressListener<FileDownloadTask.TaskSnapshot>() {
@Override
public void onProgress(FileDownloadTask.TaskSnapshot taskSnapshot) {
taskSnapshot.getBytesTransferred();
taskSnapshot.getTotalByteCount();
}
};
this._screenshot5_upload_success_listener = new OnCompleteListener<Uri>() {
@Override
public void onComplete(Task<Uri> task) {
task.getResult().toString();
}
};
this._screenshot5_download_success_listener = new OnSuccessListener<FileDownloadTask.TaskSnapshot>() {
@Override
public void onSuccess(FileDownloadTask.TaskSnapshot taskSnapshot) {
taskSnapshot.getTotalByteCount();
}
};
this._screenshot5_delete_success_listener = new OnSuccessListener() {
@Override
public void onSuccess(Object obj) {
}
};
this._screenshot5_failure_listener = new OnFailureListener() {
@Override
public void onFailure(Exception exc) {
exc.getMessage();
}
};
this._screenshot6_upload_progress_listener = new OnProgressListener<UploadTask.TaskSnapshot>() {
@Override
public void onProgress(UploadTask.TaskSnapshot taskSnapshot) {
taskSnapshot.getBytesTransferred();
taskSnapshot.getTotalByteCount();
}
};
this._screenshot6_download_progress_listener = new OnProgressListener<FileDownloadTask.TaskSnapshot>() {
@Override
public void onProgress(FileDownloadTask.TaskSnapshot taskSnapshot) {
taskSnapshot.getBytesTransferred();
taskSnapshot.getTotalByteCount();
}
};
this._screenshot6_upload_success_listener = new OnCompleteListener<Uri>() {
@Override
public void onComplete(Task<Uri> task) {
task.getResult().toString();
}
};
this._screenshot6_download_success_listener = new OnSuccessListener<FileDownloadTask.TaskSnapshot>() {
@Override
public void onSuccess(FileDownloadTask.TaskSnapshot taskSnapshot) {
taskSnapshot.getTotalByteCount();
}
};
this._screenshot6_delete_success_listener = new OnSuccessListener() {
@Override
public void onSuccess(Object obj) {
}
};
this._screenshot6_failure_listener = new OnFailureListener() {
@Override
public void onFailure(Exception exc) {
exc.getMessage();
}
};
this._icons_upload_progress_listener = new OnProgressListener<UploadTask.TaskSnapshot>() {
@Override
public void onProgress(UploadTask.TaskSnapshot taskSnapshot) {
taskSnapshot.getBytesTransferred();
taskSnapshot.getTotalByteCount();
}
};
this._icons_download_progress_listener = new OnProgressListener<FileDownloadTask.TaskSnapshot>() {
@Override
public void onProgress(FileDownloadTask.TaskSnapshot taskSnapshot) {
taskSnapshot.getBytesTransferred();
taskSnapshot.getTotalByteCount();
}
};
this._icons_upload_success_listener = new OnCompleteListener<Uri>() {
@Override
public void onComplete(Task<Uri> task) {
task.getResult().toString();
}
};
this._icons_download_success_listener = new OnSuccessListener<FileDownloadTask.TaskSnapshot>() {
@Override
public void onSuccess(FileDownloadTask.TaskSnapshot taskSnapshot) {
taskSnapshot.getTotalByteCount();
}
};
this._icons_delete_success_listener = new OnSuccessListener() {
@Override
public void onSuccess(Object obj) {
}
};
this._icons_failure_listener = new OnFailureListener() {
@Override
public void onFailure(Exception exc) {
exc.getMessage();
}
};
this._projects_upload_progress_listener = new OnProgressListener<UploadTask.TaskSnapshot>() {
@Override
public void onProgress(UploadTask.TaskSnapshot taskSnapshot) {
taskSnapshot.getBytesTransferred();
taskSnapshot.getTotalByteCount();
}
};
this._projects_download_progress_listener = new OnProgressListener<FileDownloadTask.TaskSnapshot>() {
@Override
public void onProgress(FileDownloadTask.TaskSnapshot taskSnapshot) {
taskSnapshot.getBytesTransferred();
taskSnapshot.getTotalByteCount();
}
};
this._projects_upload_success_listener = new OnCompleteListener<Uri>() {
@Override
public void onComplete(Task<Uri> task) {
task.getResult().toString();
}
};
this._projects_download_success_listener = new OnSuccessListener<FileDownloadTask.TaskSnapshot>() {
@Override
public void onSuccess(FileDownloadTask.TaskSnapshot taskSnapshot) {
taskSnapshot.getTotalByteCount();
}
};
this._projects_delete_success_listener = new OnSuccessListener() {
@Override
public void onSuccess(Object obj) {
}
};
this._projects_failure_listener = new OnFailureListener() {
@Override
public void onFailure(Exception exc) {
exc.getMessage();
}
};
ChildEventListener childEventListener5 = new ChildEventListener() {
@Override
public void onChildMoved(DataSnapshot dataSnapshot, String str) {
}
@Override
public void onChildAdded(DataSnapshot dataSnapshot, String str) {
GenericTypeIndicator<HashMap<String, Object>> genericTypeIndicator = new GenericTypeIndicator<HashMap<String, Object>>() {
};
dataSnapshot.getKey();
HashMap hashMap = (HashMap) dataSnapshot.getValue(genericTypeIndicator);
if (hashMap.containsKey("C")) {
EditorActivity.this.Contacts = hashMap.get("C").toString();
}
}
@Override
public void onChildChanged(DataSnapshot dataSnapshot, String str) {
GenericTypeIndicator<HashMap<String, Object>> genericTypeIndicator = new GenericTypeIndicator<HashMap<String, Object>>() {
};
dataSnapshot.getKey();
}
@Override
public void onChildRemoved(DataSnapshot dataSnapshot) {
GenericTypeIndicator<HashMap<String, Object>> genericTypeIndicator = new GenericTypeIndicator<HashMap<String, Object>>() {
};
dataSnapshot.getKey();
}
@Override
public void onCancelled(DatabaseError databaseError) {
databaseError.getCode();
databaseError.getMessage();
}
};
this._Contact_child_listener = childEventListener5;
this.Contact.addChildEventListener(childEventListener5);
ChildEventListener childEventListener6 = new ChildEventListener() {
@Override
public void onChildMoved(DataSnapshot dataSnapshot, String str) {
}
@Override
public void onChildAdded(DataSnapshot dataSnapshot, String str) {
GenericTypeIndicator<HashMap<String, Object>> genericTypeIndicator = new GenericTypeIndicator<HashMap<String, Object>>() {
};
dataSnapshot.getKey();
HashMap hashMap = (HashMap) dataSnapshot.getValue(genericTypeIndicator);
if (hashMap.containsKey("A1")) {
EditorActivity.this.Bana.setText(hashMap.get("A1").toString());
}
if (hashMap.containsKey("C3")) {
EditorActivity.this.Rewarded1.setText(hashMap.get("C3").toString());
}
}
@Override
public void onChildChanged(DataSnapshot dataSnapshot, String str) {
GenericTypeIndicator<HashMap<String, Object>> genericTypeIndicator = new GenericTypeIndicator<HashMap<String, Object>>() {
};
dataSnapshot.getKey();
}
@Override
public void onChildRemoved(DataSnapshot dataSnapshot) {
GenericTypeIndicator<HashMap<String, Object>> genericTypeIndicator = new GenericTypeIndicator<HashMap<String, Object>>() {
};
dataSnapshot.getKey();
}
@Override
public void onCancelled(DatabaseError databaseError) {
databaseError.getCode();
databaseError.getMessage();
}
};
this._Ads_child_listener = childEventListener6;
this.Ads.addChildEventListener(childEventListener6);
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();
}
};
}
public class AnonymousClass4 implements View.OnClickListener {
AnonymousClass4() {
}
@Override
public void onClick(View view) {
EditorActivity editorActivity = EditorActivity.this;
PopupMenu popupMenu = new PopupMenu(editorActivity, editorActivity.img_option);
Menu menu = popupMenu.getMenu();
menu.add("Compartilhar");
menu.add("Excluir");
menu.add("Contato");
popupMenu.setOnMenuItemClickListener(new AnonymousClass1());
popupMenu.show();
}
class AnonymousClass1 implements PopupMenu.OnMenuItemClickListener {
AnonymousClass1() {
}
@Override
public boolean onMenuItemClick(MenuItem menuItem) {
String charSequence = menuItem.getTitle().toString();
int hashCode = charSequence.hashCode();
if (hashCode == -1678787062) {
if (!charSequence.equals("Contato")) {
return false;
}
if (!EditorActivity.this.Contacts.equals("")) {
EditorActivity.this.intent.setAction("android.intent.action.VIEW");
EditorActivity.this.intent.setData(Uri.parse(EditorActivity.this.Contacts));
EditorActivity.this.startActivity(EditorActivity.this.intent);
} else {
SketchwareUtil.showMessage(EditorActivity.this.getApplicationContext(), "Sem Links!");
}
return true;
}
if (hashCode != 343504482) {
if (hashCode != 715284034 || !charSequence.equals("Compartilhar")) {
return false;
}
EditorActivity.this.share = EditorActivity.this.download_url;
Intent intent = new Intent("android.intent.action.SEND");
intent.setType("text/plain");
intent.putExtra("android.intent.extra.TEXT", EditorActivity.this.share);
EditorActivity.this.startActivity(Intent.createChooser(intent, "Compartilhar usando"));
return true;
}
if (!charSequence.equals("Excluir")) {
return false;
}
BottomSheetDialog bottomSheetDialog = new BottomSheetDialog(EditorActivity.this);
View inflate = EditorActivity.this.getLayoutInflater().inflate(R.layout.delete, (ViewGroup) null);
bottomSheetDialog.setContentView(inflate);
bottomSheetDialog.getWindow().findViewById(R.id.design_bottom_sheet).setBackgroundResource(android.R.color.transparent);
LinearLayout linearLayout = (LinearLayout) inflate.findViewById(R.id.bg);
LinearLayout linearLayout2 = (LinearLayout) inflate.findViewById(R.id.top);
Button button = (Button) bottomSheetDialog.findViewById(R.id.b1);
button.setText("Excluir Aplicativo");
linearLayout.setBackground(new GradientDrawable() {
public GradientDrawable getIns(int i, int i2) {
setCornerRadius(i);
setColor(i2);
return this;
}
}.getIns(30, -1));
linearLayout2.setBackground(new GradientDrawable() {
public GradientDrawable getIns(int i, int i2) {
setCornerRadius(i);
setColor(i2);
return this;
}
}.getIns(360, -2039584));
EditorActivity.this._round_corner_and_ripple(button, 20.0d, 10.0d, "#1361F5", true);
button.setOnClickListener(new AnonymousClass3());
bottomSheetDialog.setCancelable(true);
bottomSheetDialog.show();
return true;
}
class AnonymousClass3 implements View.OnClickListener {
AnonymousClass3() {
}
@Override
public void onClick(View view) {
if (EditorActivity.this.developer.getString("type", "").equals("Free")) {
EditorActivity.this._Custom_Loading(true);
if (!EditorActivity.this.icon_url.equals("")) {
EditorActivity.this._firebase_storage.getReferenceFromUrl(EditorActivity.this.icon_url).delete().addOnSuccessListener(EditorActivity.this._icons_delete_success_listener).addOnFailureListener(EditorActivity.this._icons_failure_listener);
}
if (!EditorActivity.this.ss1.equals("")) {
EditorActivity.this._firebase_storage.getReferenceFromUrl(EditorActivity.this.ss1).delete().addOnSuccessListener(EditorActivity.this._screenshot1_delete_success_listener).addOnFailureListener(EditorActivity.this._screenshot1_failure_listener);
}
if (!EditorActivity.this.ss2.equals("")) {
EditorActivity.this._firebase_storage.getReferenceFromUrl(EditorActivity.this.ss2).delete().addOnSuccessListener(EditorActivity.this._screenshot2_delete_success_listener).addOnFailureListener(EditorActivity.this._screenshot2_failure_listener);
}
if (!EditorActivity.this.ss3.equals("")) {
EditorActivity.this._firebase_storage.getReferenceFromUrl(EditorActivity.this.ss3).delete().addOnSuccessListener(EditorActivity.this._screenshot3_delete_success_listener).addOnFailureListener(EditorActivity.this._screenshot3_failure_listener);
}
if (!EditorActivity.this.ss4.equals("")) {
EditorActivity.this._firebase_storage.getReferenceFromUrl(EditorActivity.this.ss4).delete().addOnSuccessListener(EditorActivity.this._screenshot4_delete_success_listener).addOnFailureListener(EditorActivity.this._screenshot4_failure_listener);
}
if (!EditorActivity.this.ss5.equals("")) {
EditorActivity.this._firebase_storage.getReferenceFromUrl(EditorActivity.this.ss5).delete().addOnSuccessListener(EditorActivity.this._screenshot5_delete_success_listener).addOnFailureListener(EditorActivity.this._screenshot5_failure_listener);
}
if (!EditorActivity.this.ss6.equals("")) {
EditorActivity.this._firebase_storage.getReferenceFromUrl(EditorActivity.this.ss6).delete().addOnSuccessListener(EditorActivity.this._screenshot6_delete_success_listener).addOnFailureListener(EditorActivity.this._screenshot6_failure_listener);
}
EditorActivity.this.timer = new C01031();
EditorActivity.this._timer.schedule(EditorActivity.this.timer, 2000L);
}
}
class C01031 extends TimerTask {
C01031() {
}
class RunnableC01041 implements Runnable {
RunnableC01041() {
}
@Override
public void run() {
EditorActivity.this.map = new HashMap();
EditorActivity.this.map.put("projects", String.valueOf((long) (Double.parseDouble(EditorActivity.this.total_projects) - 1.0d)));
EditorActivity.this.Users.child(EditorActivity.this.uid).updateChildren(EditorActivity.this.map);
EditorActivity.this.map.clear();
EditorActivity.this.project.child(EditorActivity.this.key).removeValue();
EditorActivity.this.timer = new TimerTask() {
@Override
public void run() {
EditorActivity.this.runOnUiThread(new Runnable() {
@Override
public void run() {
EditorActivity.this._Custom_Loading(false);
EditorActivity.this.finish();
}
});
}
};
EditorActivity.this._timer.schedule(EditorActivity.this.timer, 2000L);
}
}
@Override
public void run() {
EditorActivity.this.runOnUiThread(new RunnableC01041());
}
}
}
}
}
public class AnonymousClass22 implements ChildEventListener {
AnonymousClass22() {
}
@Override
public void onChildMoved(DataSnapshot dataSnapshot, String str) {
}
@Override
public void onChildAdded(DataSnapshot dataSnapshot, String str) {
GenericTypeIndicator<HashMap<String, Object>> genericTypeIndicator = new GenericTypeIndicator<HashMap<String, Object>>() {
};
String key = dataSnapshot.getKey();
final HashMap hashMap = (HashMap) dataSnapshot.getValue(genericTypeIndicator);
if (EditorActivity.this.developer.getString("type", "").equals("Free") && key.equals(EditorActivity.this.key)) {
if (hashMap.containsKey("icon")) {
Glide.with(EditorActivity.this.getApplicationContext()).load(Uri.parse(hashMap.get("icon").toString())).into(EditorActivity.this.icon);
EditorActivity.this.icon_url = hashMap.get("icon").toString();
EditorActivity.this.icon_edit.setText(hashMap.get("icon").toString());
}
if (hashMap.containsKey("title")) {
EditorActivity.this.title.setText(hashMap.get("title").toString());
EditorActivity.this.title_edit.setText(hashMap.get("title").toString());
}
if (hashMap.containsKey("name")) {
EditorActivity.this.textview_username.setText(hashMap.get("name").toString());
EditorActivity.this.developer_names.setText(hashMap.get("name").toString());
}
if (hashMap.containsKey("size")) {
EditorActivity.this.size_edit.setText(hashMap.get("size").toString());
EditorActivity.this.timer = new TimerTask() {
@Override
public void run() {
EditorActivity editorActivity = EditorActivity.this;
final HashMap hashMap2 = hashMap;
editorActivity.runOnUiThread(new Runnable() {
@Override
public void run() {
EditorActivity.this._TransitionManager(EditorActivity.this.linear1, 400.0d);
EditorActivity.this.textview_download.setText("Baixar ( ".concat(hashMap2.get("size").toString().concat(" )")));
}
});
}
};
EditorActivity.this._timer.schedule(EditorActivity.this.timer, 700L);
} else {
EditorActivity.this.timer = new TimerTask() {
@Override
public void run() {
EditorActivity.this.runOnUiThread(new Runnable() {
@Override
public void run() {
EditorActivity.this._TransitionManager(EditorActivity.this.linear1, 400.0d);
EditorActivity.this.textview_download.setText("Baixar");
}
});
}
};
EditorActivity.this._timer.schedule(EditorActivity.this.timer, 700L);
}
if (hashMap.containsKey("downloads")) {
EditorActivity.this.downloads.setText(hashMap.get("downloads").toString().concat(" downloads"));
}
if (hashMap.containsKey("time")) {
EditorActivity.this.date.setText(hashMap.get("time").toString());
}
if (hashMap.containsKey("likes")) {
EditorActivity.this.likes.setText(hashMap.get("likes").toString().concat(" likes"));
}
if (hashMap.containsKey("comments")) {
EditorActivity.this.comments.setText(hashMap.get("comments").toString());
}
if (hashMap.containsKey("download_url")) {
EditorActivity.this.download_url = hashMap.get("download_url").toString();
EditorActivity.this.download_edit.setText(hashMap.get("download_url").toString());
}
if (hashMap.containsKey("description")) {
EditorActivity.this.description_edit.setText(hashMap.get("description").toString());
EditorActivity.this.description.setText(hashMap.get("description").toString());
EditorActivity editorActivity = EditorActivity.this;
editorActivity._detect_links_(editorActivity.description);
}
if (hashMap.containsKey("video")) {
if (hashMap.get("video").toString().equals("")) {
EditorActivity.this.linear_video.setVisibility(8);
} else {
EditorActivity.this.yt_url = hashMap.get("video").toString();
EditorActivity.this.yt_edit.setText(hashMap.get("video").toString());
EditorActivity.this.linear_video.setVisibility(0);
}
}
if (hashMap.containsKey("category")) {
EditorActivity.this.textview_category.setText(hashMap.get("category").toString());
EditorActivity.this.category_edit.setText(hashMap.get("category").toString());
EditorActivity.this.linear_category.setVisibility(0);
}
if (hashMap.containsKey("comments_disable")) {
EditorActivity.this.comments_type = hashMap.get("comments_disable").toString();
if (hashMap.get("comments_disable").toString().equals("true")) {
EditorActivity.this.checkbox_comment_disable.setChecked(true);
}
}
if (hashMap.containsKey("screen1")) {
if (hashMap.get("screen1").toString().equals("")) {
EditorActivity.this.cardview3.setVisibility(8);
} else {
EditorActivity.this.ss1 = hashMap.get("screen1").toString();
Glide.with(EditorActivity.this.getApplicationContext()).load(Uri.parse(hashMap.get("screen1").toString())).into(EditorActivity.this.screen1);
EditorActivity.this.cardview3.setVisibility(0);
}
}
if (hashMap.containsKey("screen2")) {
if (hashMap.get("screen2").toString().equals("")) {
EditorActivity.this.cardview4.setVisibility(8);
} else {
EditorActivity.this.ss2 = hashMap.get("screen2").toString();
Glide.with(EditorActivity.this.getApplicationContext()).load(Uri.parse(hashMap.get("screen2").toString())).into(EditorActivity.this.screen2);
EditorActivity.this.cardview4.setVisibility(0);
}
}
if (hashMap.containsKey("screen3")) {
if (hashMap.get("screen3").toString().equals("")) {
EditorActivity.this.cardview5.setVisibility(8);
} else {
EditorActivity.this.ss3 = hashMap.get("screen3").toString();
Glide.with(EditorActivity.this.getApplicationContext()).load(Uri.parse(hashMap.get("screen3").toString())).into(EditorActivity.this.screen3);
EditorActivity.this.cardview5.setVisibility(0);
}
}
if (hashMap.containsKey("screen4")) {
if (hashMap.get("screen4").toString().equals("")) {
EditorActivity.this.cardview6.setVisibility(8);
} else {
EditorActivity.this.ss4 = hashMap.get("screen4").toString();
Glide.with(EditorActivity.this.getApplicationContext()).load(Uri.parse(hashMap.get("screen4").toString())).into(EditorActivity.this.screen4);
EditorActivity.this.cardview6.setVisibility(0);
}
}
if (hashMap.containsKey("screen5")) {
if (hashMap.get("screen5").toString().equals("")) {
EditorActivity.this.cardview7.setVisibility(8);
} else {
EditorActivity.this.ss5 = hashMap.get("screen5").toString();
Glide.with(EditorActivity.this.getApplicationContext()).load(Uri.parse(hashMap.get("screen5").toString())).into(EditorActivity.this.screen5);
EditorActivity.this.cardview7.setVisibility(0);
}
}
if (hashMap.containsKey("screen6")) {
if (hashMap.get("screen6").toString().equals("")) {
EditorActivity.this.cardview8.setVisibility(8);
return;
}
EditorActivity.this.ss6 = hashMap.get("screen6").toString();
Glide.with(EditorActivity.this.getApplicationContext()).load(Uri.parse(hashMap.get("screen6").toString())).into(EditorActivity.this.screen6);
EditorActivity.this.cardview8.setVisibility(0);
}
}
}
@Override
public void onChildChanged(DataSnapshot dataSnapshot, String str) {
GenericTypeIndicator<HashMap<String, Object>> genericTypeIndicator = new GenericTypeIndicator<HashMap<String, Object>>() {
};
String key = dataSnapshot.getKey();
final HashMap hashMap = (HashMap) dataSnapshot.getValue(genericTypeIndicator);
if (EditorActivity.this.developer.getString("type", "").equals("Free") && key.equals(EditorActivity.this.key)) {
if (hashMap.containsKey("icon")) {
Glide.with(EditorActivity.this.getApplicationContext()).load(Uri.parse(hashMap.get("icon").toString())).into(EditorActivity.this.icon);
EditorActivity.this.icon_url = hashMap.get("icon").toString();
EditorActivity.this.icon_edit.setText(hashMap.get("icon").toString());
}
if (hashMap.containsKey("title")) {
EditorActivity.this.title.setText(hashMap.get("title").toString());
EditorActivity.this.title_edit.setText(hashMap.get("title").toString());
}
if (hashMap.containsKey("name")) {
EditorActivity.this.textview_username.setText(hashMap.get("name").toString());
EditorActivity.this.developer_names.setText(hashMap.get("name").toString());
}
if (hashMap.containsKey("size")) {
EditorActivity.this.size_edit.setText(hashMap.get("size").toString());
EditorActivity.this.timer = new TimerTask() {
@Override
public void run() {
EditorActivity editorActivity = EditorActivity.this;
final HashMap hashMap2 = hashMap;
editorActivity.runOnUiThread(new Runnable() {
@Override
public void run() {
EditorActivity.this._TransitionManager(EditorActivity.this.linear1, 400.0d);
EditorActivity.this.textview_download.setText("Baixar ( ".concat(hashMap2.get("size").toString().concat(" )")));
}
});
}
};
EditorActivity.this._timer.schedule(EditorActivity.this.timer, 700L);
} else {
EditorActivity.this.timer = new TimerTask() {
@Override
public void run() {
EditorActivity.this.runOnUiThread(new Runnable() {
@Override
public void run() {
EditorActivity.this._TransitionManager(EditorActivity.this.linear1, 400.0d);
EditorActivity.this.textview_download.setText("Baixar");
}
});
}
};
EditorActivity.this._timer.schedule(EditorActivity.this.timer, 700L);
}
if (hashMap.containsKey("downloads")) {
EditorActivity.this.downloads.setText(hashMap.get("downloads").toString().concat(" downloads"));
}
if (hashMap.containsKey("time")) {
EditorActivity.this.date.setText(hashMap.get("time").toString());
}
if (hashMap.containsKey("likes")) {
EditorActivity.this.likes.setText(hashMap.get("likes").toString().concat(" likes"));
}
if (hashMap.containsKey("comments")) {
EditorActivity.this.comments.setText(hashMap.get("comments").toString());
}
if (hashMap.containsKey("download_url")) {
EditorActivity.this.download_url = hashMap.get("download_url").toString();
EditorActivity.this.download_edit.setText(hashMap.get("download_url").toString());
}
if (hashMap.containsKey("description")) {
EditorActivity.this.description_edit.setText(hashMap.get("description").toString());
EditorActivity.this.description.setText(hashMap.get("description").toString());
EditorActivity editorActivity = EditorActivity.this;
editorActivity._detect_links_(editorActivity.description);
}
if (hashMap.containsKey("video")) {
if (hashMap.get("video").toString().equals("")) {
EditorActivity.this.linear_video.setVisibility(8);
} else {
EditorActivity.this.yt_url = hashMap.get("video").toString();
EditorActivity.this.yt_edit.setText(hashMap.get("video").toString());
EditorActivity.this.linear_video.setVisibility(0);
}
}
if (hashMap.containsKey("category")) {
EditorActivity.this.textview_category.setText(hashMap.get("category").toString());
EditorActivity.this.category_edit.setText(hashMap.get("category").toString());
EditorActivity.this.linear_category.setVisibility(0);
}
if (hashMap.containsKey("comments_disable")) {
EditorActivity.this.comments_type = hashMap.get("comments_disable").toString();
if (hashMap.get("comments_disable").toString().equals("true")) {
EditorActivity.this.checkbox_comment_disable.setChecked(true);
}
}
if (hashMap.containsKey("screen1")) {
if (hashMap.get("screen1").toString().equals("")) {
EditorActivity.this.cardview3.setVisibility(8);
} else {
EditorActivity.this.ss1 = hashMap.get("screen1").toString();
Glide.with(EditorActivity.this.getApplicationContext()).load(Uri.parse(hashMap.get("screen1").toString())).into(EditorActivity.this.screen1);
EditorActivity.this.cardview3.setVisibility(0);
}
}
if (hashMap.containsKey("screen2")) {
if (hashMap.get("screen2").toString().equals("")) {
EditorActivity.this.cardview4.setVisibility(8);
} else {
EditorActivity.this.ss2 = hashMap.get("screen2").toString();
Glide.with(EditorActivity.this.getApplicationContext()).load(Uri.parse(hashMap.get("screen2").toString())).into(EditorActivity.this.screen2);
EditorActivity.this.cardview4.setVisibility(0);
}
}
if (hashMap.containsKey("screen3")) {
if (hashMap.get("screen3").toString().equals("")) {
EditorActivity.this.cardview5.setVisibility(8);
} else {
EditorActivity.this.ss3 = hashMap.get("screen3").toString();
Glide.with(EditorActivity.this.getApplicationContext()).load(Uri.parse(hashMap.get("screen3").toString())).into(EditorActivity.this.screen3);
EditorActivity.this.cardview5.setVisibility(0);
}
}
if (hashMap.containsKey("screen4")) {
if (hashMap.get("screen4").toString().equals("")) {
EditorActivity.this.cardview6.setVisibility(8);
} else {
EditorActivity.this.ss4 = hashMap.get("screen4").toString();
Glide.with(EditorActivity.this.getApplicationContext()).load(Uri.parse(hashMap.get("screen4").toString())).into(EditorActivity.this.screen4);
EditorActivity.this.cardview6.setVisibility(0);
}
}
if (hashMap.containsKey("screen5")) {
if (hashMap.get("screen5").toString().equals("")) {
EditorActivity.this.cardview7.setVisibility(8);
} else {
EditorActivity.this.ss5 = hashMap.get("screen5").toString();
Glide.with(EditorActivity.this.getApplicationContext()).load(Uri.parse(hashMap.get("screen5").toString())).into(EditorActivity.this.screen5);
EditorActivity.this.cardview7.setVisibility(0);
}
}
if (hashMap.containsKey("screen6")) {
if (hashMap.get("screen6").toString().equals("")) {
EditorActivity.this.cardview8.setVisibility(8);
return;
}
EditorActivity.this.ss6 = hashMap.get("screen6").toString();
Glide.with(EditorActivity.this.getApplicationContext()).load(Uri.parse(hashMap.get("screen6").toString())).into(EditorActivity.this.screen6);
EditorActivity.this.cardview8.setVisibility(0);
}
}
}
@Override
public void onChildRemoved(DataSnapshot dataSnapshot) {
GenericTypeIndicator<HashMap<String, Object>> genericTypeIndicator = new GenericTypeIndicator<HashMap<String, Object>>() {
};
dataSnapshot.getKey();
}
@Override
public void onCancelled(DatabaseError databaseError) {
databaseError.getCode();
databaseError.getMessage();
}
}
private void initializeLogic() {
this.description.setTextIsSelectable(true);
this.key = getIntent().getStringExtra("key");
this.uid = this.developer.getString("uid", "");
this.like_num = 0.0d;
this.comment_num = 0.0d;
this.liked = false;
this.like_key = this.key.concat(FirebaseAuth.getInstance().getCurrentUser().getUid());
_ui();
}
public void _round_corner_and_ripple(View view, double d, double d2, String str, boolean z) {
if (z) {
GradientDrawable gradientDrawable = new GradientDrawable();
gradientDrawable.setColor(Color.parseColor(str));
gradientDrawable.setCornerRadius((int) d);
view.setElevation((int) d2);
Drawable rippleDrawable = new RippleDrawable(new ColorStateList(new int[][]{new int[0]}, new int[]{Color.parseColor("#9e9e9e")}), gradientDrawable, null);
view.setClickable(true);
view.setBackground(rippleDrawable);
return;
}
GradientDrawable gradientDrawable2 = new GradientDrawable();
gradientDrawable2.setColor(Color.parseColor(str));
gradientDrawable2.setCornerRadius((int) d);
view.setBackground(gradientDrawable2);
view.setElevation((int) d2);
}
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 void _ui() {
getWindow().getDecorView().setSystemUiVisibility(8192);
getWindow().setStatusBarColor(-1);
_removeScollBar(this.vscroll1);
_removeScollBar(this.hscroll2);
_removeScollBar(this.hscroll1);
this.toolbar.setElevation(5.0f);
this.linear_category.setVisibility(8);
this.leniar_verified.setVisibility(8);
this.linear_editor.setVisibility(8);
this.cardview6.setVisibility(8);
this.cardview7.setVisibility(8);
this.cardview8.setVisibility(8);
this.cardview3.setVisibility(8);
this.cardview4.setVisibility(8);
this.cardview5.setVisibility(8);
this.cardview6.setVisibility(8);
this.cardview7.setVisibility(8);
this.cardview8.setVisibility(8);
this.linear10.setVisibility(8);
this.linear11.setVisibility(8);
this.linear13.setVisibility(8);
_RippleEffects("#BDBDBD", this.img_option);
_RippleEffects("#BDBDBD", this.img_back);
this.title.setEllipsize(TextUtils.TruncateAt.MARQUEE);
this.title.setMarqueeRepeatLimit(-1);
this.title.setSingleLine(true);
this.title.setSelected(true);
this.network.startRequestNetwork("GET", "https://www.google.com", "a", this._network_request_listener);
this.textview10.setTypeface(Typeface.createFromAsset(getAssets(), "fonts/opensans_bold.ttf"), 0);
_rippleRoundStroke(this.linear_category, "#673AB7", "#E0E0E0", 90.0d, 0.0d, "#000000");
_rippleRoundStroke(this.linear_likes, "#F44336", "#E0E0E0", 90.0d, 0.0d, "#000000");
_rippleRoundStroke(this.sketchware, "#FFFFFF", "#E0E0E0", 90.0d, 2.0d, "#757575");
_rippleRoundStroke(this.leniar_verified, "#4CAF50", "#E0E0E0", 90.0d, 0.0d, "#1361F5");
_rippleRoundStroke(this.linear_editor, "#2196F3", "#E0E0E0", 90.0d, 0.0d, "#1361F5");
_round_corner_and_ripple(this.linear_video, 20.0d, 10.0d, "#1361F5", true);
_round_corner_and_ripple(this.linear_download, 20.0d, 10.0d, "#1361F5", true);
TimerTask timerTask = new TimerTask() {
@Override
public void run() {
EditorActivity.this.runOnUiThread(new Runnable() {
@Override
public void run() {
EditorActivity.this._TransitionManager(EditorActivity.this.linear1, 400.0d);
EditorActivity.this.linear10.setVisibility(0);
EditorActivity.this.linear13.setVisibility(0);
}
});
}
};
this.timer = timerTask;
this._timer.schedule(timerTask, 500L);
_rippleRoundStroke(this.linear_box_1, "#FFFFFF", "#FFFFFF", 30.0d, 3.0d, "#000000");
_rippleRoundStroke(this.linear_box_4, "#FFFFFF", "#FFFFFF", 30.0d, 3.0d, "#000000");
_rippleRoundStroke(this.linear_box_5, "#FFFFFF", "#FFFFFF", 30.0d, 3.0d, "#000000");
_rippleRoundStroke(this.linear_box_6, "#FFFFFF", "#FFFFFF", 30.0d, 3.0d, "#000000");
_rippleRoundStroke(this.linear_box_7, "#FFFFFF", "#FFFFFF", 30.0d, 3.0d, "#000000");
_rippleRoundStroke(this.linear_box_8, "#FFFFFF", "#FFFFFF", 30.0d, 3.0d, "#000000");
_rippleRoundStroke(this.comment_layout, "#FFFFFF", "#FFFFFF", 30.0d, 3.0d, "#000000");
_rippleRoundStroke(this.linear_box_3, "#FFFFFF", "#FFFFFF", 30.0d, 3.0d, "#000000");
_round_corner_and_ripple(this.button2, 20.0d, 10.0d, "#2196F3", true);
_round_corner_and_ripple(this.button3, 20.0d, 10.0d, "#2196F3", true);
_round_corner_and_ripple(this.button4, 20.0d, 10.0d, "#2196F3", true);
_round_corner_and_ripple(this.button5, 20.0d, 10.0d, "#2196F3", true);
_round_corner_and_ripple(this.button6, 20.0d, 10.0d, "#2196F3", true);
_round_corner_and_ripple(this.button7, 20.0d, 10.0d, "#2196F3", true);
_round_corner_and_ripple(this.button9, 20.0d, 10.0d, "#2196F3", true);
}
public void _removeScollBar(View view) {
view.setVerticalScrollBarEnabled(false);
view.setHorizontalScrollBarEnabled(false);
}
public void _detect_links_(TextView textView) {
textView.setClickable(true);
Linkify.addLinks(textView, 15);
textView.setLinkTextColor(Color.parseColor("#2196F3"));
textView.setLinksClickable(true);
}
public void _RippleEffects(String str, View view) {
view.setBackground(new RippleDrawable(new ColorStateList(new int[][]{new int[0]}, new int[]{Color.parseColor(str)}), null, null));
}
public void _TransitionManager(View view, double d) {
AutoTransition autoTransition = new AutoTransition();
autoTransition.setDuration((long) d);
autoTransition.setInterpolator((TimeInterpolator) new DecelerateInterpolator());
TransitionManager.beginDelayedTransition((LinearLayout) view, autoTransition);
}
public void _Custom_Loading(boolean z) {
if (z) {
if (this.coreprog == null) {
ProgressDialog progressDialog = new ProgressDialog(this);
this.coreprog = progressDialog;
progressDialog.setCancelable(false);
this.coreprog.setCanceledOnTouchOutside(false);
this.coreprog.requestWindowFeature(1);
this.coreprog.getWindow().setBackgroundDrawable(new ColorDrawable(0));
}
this.coreprog.setMessage(null);
this.coreprog.show();
View inflate = getLayoutInflater().inflate(R.layout.custom_dialog, (ViewGroup) null);
LinearLayout linearLayout = (LinearLayout) inflate.findViewById(R.id.linear_base);
GradientDrawable gradientDrawable = new GradientDrawable();
gradientDrawable.setColor(0);
gradientDrawable.setCornerRadius(25.0f);
linearLayout.setBackground(gradientDrawable);
this.coreprog.setContentView(inflate);
return;
}
ProgressDialog progressDialog2 = this.coreprog;
if (progressDialog2 != null) {
progressDialog2.dismiss();
}
}
public void _downloadFileToFolder(String str, String str2, String str3) {
try {
String fileExtensionFromUrl = MimeTypeMap.getFileExtensionFromUrl(str3);
DownloadManager.Request request = new DownloadManager.Request(Uri.parse(str3));
request.setTitle(str);
request.setMimeType("/");
request.allowScanningByMediaScanner();
request.setAllowedOverMetered(true);
request.setNotificationVisibility(1);
request.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, String.valueOf(File.separator) + str2 + File.separator + str + "." + fileExtensionFromUrl);
((DownloadManager) getSystemService("download")).enqueue(request);
} catch (Exception e) {
SketchwareUtil.showMessage(getApplicationContext(), e.toString());
}
_Max_Success();
}
public void _shsh(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 void _Max_Success() {
final AlertDialog create = new AlertDialog.Builder(this).create();
View inflate = getLayoutInflater().inflate(R.layout.successful, (ViewGroup) null);
create.setView(inflate);
View view = (LinearLayout) inflate.findViewById(R.id.L1);
TextView textView = (TextView) inflate.findViewById(R.id.TOK);
TextView textView2 = (TextView) inflate.findViewById(R.id.T1);
TextView textView3 = (TextView) inflate.findViewById(R.id.T2);
_rippleRoundStroke(view, "#FFFFFF", "#FFFFFF", 15.0d, 0.0d, "#000000");
_rippleRoundStroke(textView, "#00C853", "#BDBDBD", 38.0d, 0.0d, "#000000");
textView2.setTypeface(Typeface.createFromAsset(getAssets(), "fonts/google.ttf"), 0);
textView3.setTypeface(Typeface.createFromAsset(getAssets(), "fonts/google.ttf"), 0);
textView.setTypeface(Typeface.createFromAsset(getAssets(), "fonts/google.ttf"), 0);
create.getWindow().setBackgroundDrawable(new ColorDrawable());
textView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view2) {
create.dismiss();
}
});
create.setCancelable(false);
create.show();
}
public void _Rewarded_Android_By_HarshTek() {
this.rewarded = MaxRewardedAd.getInstance("dbc2b232e2f4481d", this);
this.rewarded.setListener(new MaxRewardedAdListener() {
@Override
public void onAdClicked(MaxAd maxAd) {
}
@Override
public void onAdHidden(MaxAd maxAd) {
}
@Override
public void onAdLoaded(MaxAd maxAd) {
}
@Override
public void onRewardedVideoCompleted(MaxAd maxAd) {
}
@Override
public void onRewardedVideoStarted(MaxAd maxAd) {
}
@Override
public void onUserRewarded(MaxAd maxAd, MaxReward maxReward) {
}
@Override
public void onAdDisplayed(MaxAd maxAd) {
EditorActivity.this._Rewarded_Android_By_HarshTek();
}
@Override
public void onAdLoadFailed(String str, MaxError maxError) {
maxError.getMessage();
SketchwareUtil.showMessage(EditorActivity.this.getApplicationContext(), "Ads Load Error!!!");
}
@Override
public void onAdDisplayFailed(MaxAd maxAd, MaxError maxError) {
maxError.getMessage();
SketchwareUtil.showMessage(EditorActivity.this.getApplicationContext(), "Ads Load Error!!!");
}
});
this.rewarded.loadAd();
}
@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;
}
}