ZStore v1.7版本的 MD5 值为:ca9bb200afd8d690876bd39318f8215c
以下内容为反编译后的 ProjectViewActivity.java 源代码,内容仅作参考
package com.zackiestudios.zstore;
import android.animation.TimeInterpolator;
import android.app.AlertDialog;
import android.app.DownloadManager;
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.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
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.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 com.applovin.mediation.MaxAd;
import com.applovin.mediation.MaxError;
import com.applovin.mediation.MaxReward;
import com.applovin.mediation.MaxRewardedAdListener;
import com.applovin.mediation.ads.MaxInterstitialAd;
import com.applovin.mediation.ads.MaxRewardedAd;
import com.bumptech.glide.Glide;
import com.google.android.gms.common.Scopes;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.Task;
import com.google.android.material.bottomsheet.BottomSheetDialog;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.google.android.material.textfield.TextInputLayout;
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.zackiestudios.zstore.RequestNetwork;
import java.io.File;
import java.text.SimpleDateFormat;
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 ProjectViewActivity extends AppCompatActivity {
private LinearLayout Adss;
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 FloatingActionButton _fab;
private ChildEventListener _like_child_listener;
private RequestNetwork.RequestListener _network_request_listener;
private ChildEventListener _premium_child_listener;
private ChildEventListener _project_child_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 button1;
private CardView cardview3;
private CardView cardview4;
private CardView cardview5;
private CardView cardview6;
private CardView cardview7;
private CardView cardview8;
private CardView cardview_icon;
private TextView comments;
private TextView date;
private TextView description;
private SharedPreferences developer;
private TextView developer_names;
private TextView downloads;
private HorizontalScrollView hscroll1;
private HorizontalScrollView hscroll2;
private ImageView icon;
private ImageView imageview18;
private ImageView imageview20;
private ImageView imageview21;
private ImageView imageview22;
private ImageView imageview23;
private ImageView imageview_like;
private ImageView img_back;
private ImageView img_option;
private EditText inter;
MaxInterstitialAd inter2;
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 linear6;
private LinearLayout linear7;
private LinearLayout linear8;
private LinearLayout linear9;
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_premium;
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 LinearLayout sketchware;
private TextView textview10;
private TextView textview12;
private TextView textview28;
private TextView textview3;
private TextView textview39;
private TextView textview4;
private TextView textview42;
private TextView textview45;
private TextView textview46;
private TextView textview5;
private TextView textview6;
private TextView textview_category;
private TextView textview_download;
private TextView textview_price;
private TextView textview_username;
private TextView textview_verified;
private TimerTask timer;
private TextView title;
private LinearLayout toolbar;
private SharedPreferences users;
private ScrollView vscroll1;
private Timer _timer = new Timer();
private FirebaseDatabase _firebase = FirebaseDatabase.getInstance();
private String key = "";
private String uid = "";
private boolean liked = false;
private String like_key = "";
private double comment_num = 0.0d;
private double like_num = 0.0d;
private String download_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 test_link = "";
private String yt_url = "";
private String edittext_value = "";
private HashMap<String, Object> report_map = new HashMap<>();
private double total_downloads = 0.0d;
private String report_key = "";
private String Contactt = "";
private String Share = "";
private String Banner = "";
private String Interstitial = "";
private String Reward = "";
private ArrayList<HashMap<String, Object>> recommend_map = new ArrayList<>();
private DatabaseReference project = this._firebase.getReference("projects/normal");
private DatabaseReference premium = this._firebase.getReference("projects/premium");
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 Calendar cal = Calendar.getInstance();
private DatabaseReference Contact = this._firebase.getReference("CT");
private DatabaseReference Ads = this._firebase.getReference("Net");
public void _rewarded_video() {
}
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
setContentView(R.layout.project_view);
initialize(bundle);
FirebaseApp.initializeApp(this);
initializeLogic();
}
private void initialize(Bundle bundle) {
this._fab = (FloatingActionButton) findViewById(R.id._fab);
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.Adss = (LinearLayout) findViewById(R.id.Adss);
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.img_back = (ImageView) findViewById(R.id.img_back);
this.Bana = (EditText) findViewById(R.id.Bana);
this.inter = (EditText) findViewById(R.id.inter);
this.Rewarded1 = (EditText) findViewById(R.id.Rewarded1);
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.textview46 = (TextView) findViewById(R.id.textview46);
this.textview_price = (TextView) findViewById(R.id.textview_price);
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.linear_premium = (LinearLayout) findViewById(R.id.linear_premium);
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.imageview23 = (ImageView) findViewById(R.id.imageview23);
this.textview42 = (TextView) findViewById(R.id.textview42);
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.button1 = (Button) findViewById(R.id.button1);
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.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) {
ProjectViewActivity.this.intent.setClass(ProjectViewActivity.this.getApplicationContext(), CommentsActivity.class);
ProjectViewActivity.this.intent.putExtra("title", ProjectViewActivity.this.title.getText().toString());
ProjectViewActivity.this.intent.putExtra("key", ProjectViewActivity.this.key);
ProjectViewActivity.this.intent.putExtra("uid", ProjectViewActivity.this.uid);
ProjectViewActivity projectViewActivity = ProjectViewActivity.this;
projectViewActivity.startActivity(projectViewActivity.intent);
ProjectViewActivity.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) {
ProjectViewActivity.this.onBackPressed();
}
});
this.imageview_like.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (SketchwareUtil.isConnected(ProjectViewActivity.this.getApplicationContext())) {
if (ProjectViewActivity.this.liked) {
ProjectViewActivity.this.like_map = new HashMap();
ProjectViewActivity.this.like_map.put("value", "false");
ProjectViewActivity.this.like_map.put("key", ProjectViewActivity.this.key);
ProjectViewActivity.this.like_map.put("like_key", ProjectViewActivity.this.like_key);
ProjectViewActivity.this.like_map.put("uid", FirebaseAuth.getInstance().getCurrentUser().getUid());
ProjectViewActivity.this.like.child(ProjectViewActivity.this.like_key).updateChildren(ProjectViewActivity.this.like_map);
return;
}
ProjectViewActivity.this.like_map = new HashMap();
ProjectViewActivity.this.like_map.put("value", "true");
ProjectViewActivity.this.like_map.put("key", ProjectViewActivity.this.key);
ProjectViewActivity.this.like_map.put("like_key", ProjectViewActivity.this.like_key);
ProjectViewActivity.this.like_map.put("uid", FirebaseAuth.getInstance().getCurrentUser().getUid());
ProjectViewActivity.this.like.child(ProjectViewActivity.this.like_key).updateChildren(ProjectViewActivity.this.like_map);
return;
}
SketchwareUtil.showMessage(ProjectViewActivity.this.getApplicationContext(), "Sem conexão com a Internet");
}
});
this.img_option.setOnLongClickListener(new View.OnLongClickListener() {
@Override
public boolean onLongClick(View view) {
return true;
}
});
this.img_option.setOnClickListener(new AnonymousClass5());
this.textview_username.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (SketchwareUtil.isConnected(ProjectViewActivity.this.getApplicationContext())) {
if (!ProjectViewActivity.this.uid.equals("")) {
ProjectViewActivity.this.intent.setClass(ProjectViewActivity.this.getApplicationContext(), AccountActivity.class);
ProjectViewActivity.this.developer.edit().putString("uid", ProjectViewActivity.this.uid).commit();
ProjectViewActivity projectViewActivity = ProjectViewActivity.this;
projectViewActivity.startActivity(projectViewActivity.intent);
ProjectViewActivity.this.overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
return;
}
SketchwareUtil.showMessage(ProjectViewActivity.this.getApplicationContext(), "Algo deu errado");
return;
}
SketchwareUtil.showMessage(ProjectViewActivity.this.getApplicationContext(), "Sem internet");
}
});
this.linear_category.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
ProjectViewActivity.this.intent.setClass(ProjectViewActivity.this.getApplicationContext(), CategoryActivity.class);
ProjectViewActivity.this.intent.putExtra("title", ProjectViewActivity.this.textview_category.getText().toString());
ProjectViewActivity projectViewActivity = ProjectViewActivity.this;
projectViewActivity.startActivity(projectViewActivity.intent);
ProjectViewActivity.this.overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
}
});
this.button1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (!ProjectViewActivity.this.test_link.equals("")) {
ProjectViewActivity.this.view.setAction("android.intent.action.VIEW");
ProjectViewActivity.this.view.setData(Uri.parse(ProjectViewActivity.this.test_link));
ProjectViewActivity projectViewActivity = ProjectViewActivity.this;
projectViewActivity.startActivity(projectViewActivity.view);
return;
}
SketchwareUtil.showMessage(ProjectViewActivity.this.getApplicationContext(), "Sem Links!");
}
});
this.linear_download.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (SketchwareUtil.isConnected(ProjectViewActivity.this.getApplicationContext())) {
if (ProjectViewActivity.this.developer.getString("type", "").equals("Free")) {
ProjectViewActivity projectViewActivity = ProjectViewActivity.this;
projectViewActivity._downloadFileToFolder(projectViewActivity.title.getText().toString(), "/ZStore/Baixados", ProjectViewActivity.this.download_url);
ProjectViewActivity.this.report_map = new HashMap();
ProjectViewActivity.this.report_map.put("downloads", String.valueOf((long) (ProjectViewActivity.this.total_downloads + 1.0d)));
ProjectViewActivity.this.project.child(ProjectViewActivity.this.key).updateChildren(ProjectViewActivity.this.report_map);
ProjectViewActivity.this.report_map.clear();
}
if (ProjectViewActivity.this.developer.getString("type", "").equals("Paid")) {
ProjectViewActivity.this.view.setAction("android.intent.action.VIEW");
ProjectViewActivity.this.view.setData(Uri.parse(ProjectViewActivity.this.download_url));
ProjectViewActivity projectViewActivity2 = ProjectViewActivity.this;
projectViewActivity2.startActivity(projectViewActivity2.view);
return;
}
return;
}
SketchwareUtil.showMessage(ProjectViewActivity.this.getApplicationContext(), "Sem internet");
}
});
this.linear_video.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
ProjectViewActivity.this.view.setAction("android.intent.action.VIEW");
ProjectViewActivity.this.view.setData(Uri.parse("https://youtu.be/".concat(ProjectViewActivity.this.yt_url)));
ProjectViewActivity projectViewActivity = ProjectViewActivity.this;
projectViewActivity.startActivity(projectViewActivity.view);
ProjectViewActivity.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(ProjectViewActivity.this.getApplicationContext())) {
ProjectViewActivity.this.view.setClass(ProjectViewActivity.this.getApplicationContext(), ImagesActivity.class);
ProjectViewActivity.this.view.putExtra("img", ProjectViewActivity.this.ss1);
ProjectViewActivity projectViewActivity = ProjectViewActivity.this;
projectViewActivity.startActivity(projectViewActivity.view);
return;
}
SketchwareUtil.showMessage(ProjectViewActivity.this.getApplicationContext(), "Sem conexão com a Internet");
}
});
this.screen2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (SketchwareUtil.isConnected(ProjectViewActivity.this.getApplicationContext())) {
ProjectViewActivity.this.view.setClass(ProjectViewActivity.this.getApplicationContext(), ImagesActivity.class);
ProjectViewActivity.this.view.putExtra("img", ProjectViewActivity.this.ss2);
ProjectViewActivity projectViewActivity = ProjectViewActivity.this;
projectViewActivity.startActivity(projectViewActivity.view);
return;
}
SketchwareUtil.showMessage(ProjectViewActivity.this.getApplicationContext(), "Sem conexão com a Internet");
}
});
this.screen3.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (SketchwareUtil.isConnected(ProjectViewActivity.this.getApplicationContext())) {
ProjectViewActivity.this.view.setClass(ProjectViewActivity.this.getApplicationContext(), ImagesActivity.class);
ProjectViewActivity.this.view.putExtra("img", ProjectViewActivity.this.ss3);
ProjectViewActivity projectViewActivity = ProjectViewActivity.this;
projectViewActivity.startActivity(projectViewActivity.view);
return;
}
SketchwareUtil.showMessage(ProjectViewActivity.this.getApplicationContext(), "Sem conexão com a Internet");
}
});
this.screen4.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (SketchwareUtil.isConnected(ProjectViewActivity.this.getApplicationContext())) {
ProjectViewActivity.this.view.setClass(ProjectViewActivity.this.getApplicationContext(), ImagesActivity.class);
ProjectViewActivity.this.view.putExtra("img", ProjectViewActivity.this.ss4);
ProjectViewActivity projectViewActivity = ProjectViewActivity.this;
projectViewActivity.startActivity(projectViewActivity.view);
return;
}
SketchwareUtil.showMessage(ProjectViewActivity.this.getApplicationContext(), "Sem conexão com a Internet");
}
});
this.screen5.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (SketchwareUtil.isConnected(ProjectViewActivity.this.getApplicationContext())) {
ProjectViewActivity.this.view.setClass(ProjectViewActivity.this.getApplicationContext(), ImagesActivity.class);
ProjectViewActivity.this.view.putExtra("img", ProjectViewActivity.this.ss5);
ProjectViewActivity projectViewActivity = ProjectViewActivity.this;
projectViewActivity.startActivity(projectViewActivity.view);
return;
}
SketchwareUtil.showMessage(ProjectViewActivity.this.getApplicationContext(), "Sem conexão com a Internet");
}
});
this.screen6.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (SketchwareUtil.isConnected(ProjectViewActivity.this.getApplicationContext())) {
ProjectViewActivity.this.view.setClass(ProjectViewActivity.this.getApplicationContext(), ImagesActivity.class);
ProjectViewActivity.this.view.putExtra("img", ProjectViewActivity.this.ss6);
ProjectViewActivity projectViewActivity = ProjectViewActivity.this;
projectViewActivity.startActivity(projectViewActivity.view);
return;
}
SketchwareUtil.showMessage(ProjectViewActivity.this.getApplicationContext(), "Sem conexão com a Internet");
}
});
this.developer_names.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (SketchwareUtil.isConnected(ProjectViewActivity.this.getApplicationContext())) {
if (!ProjectViewActivity.this.uid.equals("")) {
ProjectViewActivity.this.intent.setClass(ProjectViewActivity.this.getApplicationContext(), AccountActivity.class);
ProjectViewActivity.this.developer.edit().putString("uid", ProjectViewActivity.this.uid).commit();
ProjectViewActivity projectViewActivity = ProjectViewActivity.this;
projectViewActivity.startActivity(projectViewActivity.intent);
ProjectViewActivity.this.overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
return;
}
SketchwareUtil.showMessage(ProjectViewActivity.this.getApplicationContext(), "Algo deu errado");
return;
}
SketchwareUtil.showMessage(ProjectViewActivity.this.getApplicationContext(), "Sem internet");
}
});
this._fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
ProjectViewActivity.this.intent.setClass(ProjectViewActivity.this.getApplicationContext(), EditorActivity.class);
ProjectViewActivity.this.intent.putExtra("key", ProjectViewActivity.this.key);
ProjectViewActivity.this.developer.edit().putString("uid", ProjectViewActivity.this.uid).commit();
ProjectViewActivity.this.developer.edit().putString("type", "Free").commit();
ProjectViewActivity projectViewActivity = ProjectViewActivity.this;
projectViewActivity.startActivity(projectViewActivity.intent);
}
});
AnonymousClass19 anonymousClass19 = new AnonymousClass19();
this._project_child_listener = anonymousClass19;
this.project.addChildEventListener(anonymousClass19);
AnonymousClass20 anonymousClass20 = new AnonymousClass20();
this._premium_child_listener = anonymousClass20;
this.premium.addChildEventListener(anonymousClass20);
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")) {
if (ProjectViewActivity.this.developer.getString("type", "").equals("Free")) {
if (ProjectViewActivity.this.key.equals(hashMap.get("key").toString()) && hashMap.get("value").toString().equals("true")) {
ProjectViewActivity.this.like_num += 1.0d;
ProjectViewActivity.this.like_map = new HashMap();
ProjectViewActivity.this.like_map.put("likes", String.valueOf((long) ProjectViewActivity.this.like_num));
ProjectViewActivity.this.project.child(ProjectViewActivity.this.key).updateChildren(ProjectViewActivity.this.like_map);
ProjectViewActivity.this.like_map.clear();
}
if (ProjectViewActivity.this.key.equals(hashMap.get("key").toString()) && hashMap.get("uid").toString().equals(FirebaseAuth.getInstance().getCurrentUser().getUid())) {
if (hashMap.get("value").toString().equals("true")) {
ProjectViewActivity.this.imageview_like.setImageResource(R.drawable.icons);
ProjectViewActivity.this.liked = true;
} else {
ProjectViewActivity.this.imageview_like.setImageResource(R.drawable.ic_favorite_outline_black);
ProjectViewActivity.this.liked = false;
}
}
}
if (ProjectViewActivity.this.developer.getString("type", "").equals("Paid")) {
if (ProjectViewActivity.this.key.equals(hashMap.get("key").toString()) && hashMap.get("value").toString().equals("true")) {
ProjectViewActivity.this.like_num += 1.0d;
ProjectViewActivity.this.like_map = new HashMap();
ProjectViewActivity.this.like_map.put("likes", String.valueOf((long) ProjectViewActivity.this.like_num));
ProjectViewActivity.this.premium.child(ProjectViewActivity.this.key).updateChildren(ProjectViewActivity.this.like_map);
ProjectViewActivity.this.like_map.clear();
}
if (ProjectViewActivity.this.key.equals(hashMap.get("key").toString()) && hashMap.get("uid").toString().equals(FirebaseAuth.getInstance().getCurrentUser().getUid())) {
if (hashMap.get("value").toString().equals("true")) {
ProjectViewActivity.this.imageview_like.setImageResource(R.drawable.icons);
ProjectViewActivity.this.liked = true;
} else {
ProjectViewActivity.this.imageview_like.setImageResource(R.drawable.ic_favorite_outline_black);
ProjectViewActivity.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 (ProjectViewActivity.this.developer.getString("type", "").equals("Free")) {
if (hashMap.get("key").toString().equals(ProjectViewActivity.this.key)) {
if (hashMap.get("value").toString().equals("true")) {
ProjectViewActivity.this.like_num += 1.0d;
ProjectViewActivity.this.like_map = new HashMap();
ProjectViewActivity.this.like_map.put("likes", String.valueOf((long) ProjectViewActivity.this.like_num));
ProjectViewActivity.this.project.child(ProjectViewActivity.this.key).updateChildren(ProjectViewActivity.this.like_map);
ProjectViewActivity.this.like_map.clear();
} else {
ProjectViewActivity.this.like_num -= 1.0d;
ProjectViewActivity.this.like_map = new HashMap();
ProjectViewActivity.this.like_map.put("likes", String.valueOf((long) ProjectViewActivity.this.like_num));
ProjectViewActivity.this.project.child(ProjectViewActivity.this.key).updateChildren(ProjectViewActivity.this.like_map);
ProjectViewActivity.this.like_map.clear();
}
}
if (hashMap.get("key").toString().equals(ProjectViewActivity.this.key) && hashMap.get("uid").toString().equals(FirebaseAuth.getInstance().getCurrentUser().getUid())) {
if (hashMap.get("value").toString().equals("true")) {
ProjectViewActivity.this.imageview_like.setImageResource(R.drawable.icons);
ProjectViewActivity.this.liked = true;
} else {
ProjectViewActivity.this.imageview_like.setImageResource(R.drawable.ic_favorite_outline_black);
ProjectViewActivity.this.liked = false;
}
}
}
if (ProjectViewActivity.this.developer.getString("type", "").equals("Paid")) {
if (hashMap.get("key").toString().equals(ProjectViewActivity.this.key)) {
if (hashMap.get("value").toString().equals("true")) {
ProjectViewActivity.this.like_num += 1.0d;
ProjectViewActivity.this.like_map = new HashMap();
ProjectViewActivity.this.like_map.put("likes", String.valueOf((long) ProjectViewActivity.this.like_num));
ProjectViewActivity.this.premium.child(ProjectViewActivity.this.key).updateChildren(ProjectViewActivity.this.like_map);
ProjectViewActivity.this.like_map.clear();
} else {
ProjectViewActivity.this.like_num -= 1.0d;
ProjectViewActivity.this.like_map = new HashMap();
ProjectViewActivity.this.like_map.put("likes", String.valueOf((long) ProjectViewActivity.this.like_num));
ProjectViewActivity.this.premium.child(ProjectViewActivity.this.key).updateChildren(ProjectViewActivity.this.like_map);
ProjectViewActivity.this.like_map.clear();
}
}
if (hashMap.get("key").toString().equals(ProjectViewActivity.this.key) && hashMap.get("uid").toString().equals(FirebaseAuth.getInstance().getCurrentUser().getUid())) {
if (hashMap.get("value").toString().equals("true")) {
ProjectViewActivity.this.imageview_like.setImageResource(R.drawable.icons);
ProjectViewActivity.this.liked = true;
} else {
ProjectViewActivity.this.imageview_like.setImageResource(R.drawable.ic_favorite_outline_black);
ProjectViewActivity.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")) {
if (ProjectViewActivity.this.developer.getString("type", "").equals("Free") && ProjectViewActivity.this.key.equals(hashMap.get("post_key").toString())) {
ProjectViewActivity.this.comment_num += 1.0d;
ProjectViewActivity.this.comment_map = new HashMap();
ProjectViewActivity.this.comment_map.put("comments", String.valueOf((long) ProjectViewActivity.this.comment_num));
ProjectViewActivity.this.project.child(ProjectViewActivity.this.key).updateChildren(ProjectViewActivity.this.comment_map);
ProjectViewActivity.this.comment_map.clear();
}
if (ProjectViewActivity.this.developer.getString("type", "").equals("Paid") && ProjectViewActivity.this.key.equals(hashMap.get("post_key").toString())) {
ProjectViewActivity.this.comment_num += 1.0d;
ProjectViewActivity.this.comment_map = new HashMap();
ProjectViewActivity.this.comment_map.put("comments", String.valueOf((long) ProjectViewActivity.this.comment_num));
ProjectViewActivity.this.premium.child(ProjectViewActivity.this.key).updateChildren(ProjectViewActivity.this.comment_map);
ProjectViewActivity.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")) {
if (ProjectViewActivity.this.developer.getString("type", "").equals("Free") && ProjectViewActivity.this.key.equals(hashMap.get("post_key").toString())) {
ProjectViewActivity.this.comment_num -= 1.0d;
ProjectViewActivity.this.comment_map = new HashMap();
ProjectViewActivity.this.comment_map.put("comments", String.valueOf((long) ProjectViewActivity.this.comment_num));
ProjectViewActivity.this.project.child(ProjectViewActivity.this.key).updateChildren(ProjectViewActivity.this.comment_map);
ProjectViewActivity.this.comment_map.clear();
}
if (ProjectViewActivity.this.developer.getString("type", "").equals("Paid") && ProjectViewActivity.this.key.equals(hashMap.get("post_key").toString())) {
ProjectViewActivity.this.comment_num -= 1.0d;
ProjectViewActivity.this.comment_map = new HashMap();
ProjectViewActivity.this.comment_map.put("comments", String.valueOf((long) ProjectViewActivity.this.comment_num));
ProjectViewActivity.this.premium.child(ProjectViewActivity.this.key).updateChildren(ProjectViewActivity.this.comment_map);
ProjectViewActivity.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(ProjectViewActivity.this.uid) && hashMap.containsKey("name")) {
ProjectViewActivity.this.textview_username.setText(hashMap.get("name").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(ProjectViewActivity.this.uid) && hashMap.containsKey("name")) {
ProjectViewActivity.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) {
}
};
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")) {
ProjectViewActivity.this.Contactt = 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")) {
ProjectViewActivity.this.Bana.setText(hashMap.get("A1").toString());
}
if (hashMap.containsKey("B2")) {
ProjectViewActivity.this.inter.setText(hashMap.get("B2").toString());
}
if (hashMap.containsKey("C3")) {
ProjectViewActivity.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 AnonymousClass5 implements View.OnClickListener {
AnonymousClass5() {
}
@Override
public void onClick(View view) {
ProjectViewActivity projectViewActivity = ProjectViewActivity.this;
PopupMenu popupMenu = new PopupMenu(projectViewActivity, projectViewActivity.img_option);
Menu menu = popupMenu.getMenu();
menu.add("Compartilhar");
menu.add("Reportar");
menu.add("Contato");
popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
@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 (!ProjectViewActivity.this.Contactt.equals("")) {
ProjectViewActivity.this.intent.setAction("android.intent.action.VIEW");
ProjectViewActivity.this.intent.setData(Uri.parse(ProjectViewActivity.this.Contactt));
ProjectViewActivity.this.startActivity(ProjectViewActivity.this.intent);
} else {
SketchwareUtil.showMessage(ProjectViewActivity.this.getApplicationContext(), "Sem Links!");
}
return true;
}
if (hashCode != -362395515) {
if (hashCode != 715284034 || !charSequence.equals("Compartilhar")) {
return false;
}
ProjectViewActivity.this.Share = ProjectViewActivity.this.download_url;
Intent intent = new Intent("android.intent.action.SEND");
intent.setType("text/plain");
intent.putExtra("android.intent.extra.TEXT", ProjectViewActivity.this.Share);
ProjectViewActivity.this.startActivity(Intent.createChooser(intent, "Compartilhar usando"));
return true;
}
if (!charSequence.equals("Reportar")) {
return false;
}
final BottomSheetDialog bottomSheetDialog = new BottomSheetDialog(ProjectViewActivity.this);
View inflate = ProjectViewActivity.this.getLayoutInflater().inflate(R.layout.report, (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);
final EditText editText = (EditText) bottomSheetDialog.findViewById(R.id.edittext1);
editText.setFocusableInTouchMode(true);
editText.addTextChangedListener(new TextWatcher() {
@Override
public void afterTextChanged(Editable editable) {
}
@Override
public void beforeTextChanged(CharSequence charSequence2, int i, int i2, int i3) {
}
@Override
public void onTextChanged(CharSequence charSequence2, int i, int i2, int i3) {
charSequence2.toString();
}
});
((TextInputLayout) inflate.findViewById(R.id.textinputlayout1)).setBoxCornerRadii(5.0f, 5.0f, 5.0f, 5.0f);
Button button = (Button) bottomSheetDialog.findViewById(R.id.b1);
button.setText("REPORTANDO");
ProjectViewActivity.this._round_corner_and_ripple(linearLayout, 20.0d, 0.0d, "#FFFFFF", false);
ProjectViewActivity.this._round_corner_and_ripple(linearLayout2, 360.0d, 0.0d, "#E0E0E0", false);
ProjectViewActivity.this._round_corner_and_ripple(button, 15.0d, 5.0d, "#1361F5", true);
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view2) {
ProjectViewActivity.this.edittext_value = editText.getText().toString();
if (SketchwareUtil.isConnected(ProjectViewActivity.this.getApplicationContext())) {
if (ProjectViewActivity.this.edittext_value.length() > 5) {
ProjectViewActivity.this.cal = Calendar.getInstance();
ProjectViewActivity.this.report_key = ProjectViewActivity.this.suggestion.push().getKey();
ProjectViewActivity.this.report_map = new HashMap();
ProjectViewActivity.this.report_map.put("project_name", ProjectViewActivity.this.title.getText().toString());
ProjectViewActivity.this.report_map.put("message", ProjectViewActivity.this.edittext_value);
ProjectViewActivity.this.report_map.put("project_key", ProjectViewActivity.this.key);
ProjectViewActivity.this.report_map.put("project_uid", ProjectViewActivity.this.uid);
ProjectViewActivity.this.report_map.put("key", ProjectViewActivity.this.report_key);
ProjectViewActivity.this.report_map.put("type", ProjectViewActivity.this.developer.getString("type", ""));
ProjectViewActivity.this.report_map.put("mode", "Report");
ProjectViewActivity.this.report_map.put("time", new SimpleDateFormat("dd-MM-yyyy hh:mm:ss").format(ProjectViewActivity.this.cal.getTime()));
ProjectViewActivity.this.report_map.put("user_name", ProjectViewActivity.this.users.getString("name", ""));
ProjectViewActivity.this.report_map.put("user_profile", ProjectViewActivity.this.users.getString(Scopes.PROFILE, ""));
ProjectViewActivity.this.report_map.put("user_email", FirebaseAuth.getInstance().getCurrentUser().getEmail());
ProjectViewActivity.this.report_map.put("user_uid", FirebaseAuth.getInstance().getCurrentUser().getUid());
ProjectViewActivity.this.suggestion.child(ProjectViewActivity.this.report_key).updateChildren(ProjectViewActivity.this.report_map);
ProjectViewActivity.this.report_map.clear();
SketchwareUtil.showMessage(ProjectViewActivity.this.getApplicationContext(), "Iremos analisar o seu report");
bottomSheetDialog.dismiss();
return;
}
SketchwareUtil.showMessage(ProjectViewActivity.this.getApplicationContext(), "Por favor, explique seu report");
return;
}
SketchwareUtil.showMessage(ProjectViewActivity.this.getApplicationContext(), "Sem internet");
}
});
bottomSheetDialog.setCancelable(true);
bottomSheetDialog.show();
return true;
}
});
popupMenu.show();
}
}
public class AnonymousClass19 implements ChildEventListener {
AnonymousClass19() {
}
@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 (ProjectViewActivity.this.developer.getString("type", "").equals("Free") && key.equals(ProjectViewActivity.this.key)) {
if (hashMap.containsKey("icon")) {
Glide.with(ProjectViewActivity.this.getApplicationContext()).load(Uri.parse(hashMap.get("icon").toString())).into(ProjectViewActivity.this.icon);
}
if (hashMap.containsKey("title")) {
ProjectViewActivity.this.title.setText(hashMap.get("title").toString());
}
if (hashMap.containsKey("name")) {
ProjectViewActivity.this.textview_username.setText(hashMap.get("name").toString());
ProjectViewActivity.this.developer_names.setText(hashMap.get("name").toString());
}
if (hashMap.containsKey("size")) {
ProjectViewActivity.this.timer = new TimerTask() {
@Override
public void run() {
ProjectViewActivity projectViewActivity = ProjectViewActivity.this;
final HashMap hashMap2 = hashMap;
projectViewActivity.runOnUiThread(new Runnable() {
@Override
public void run() {
ProjectViewActivity.this._TransitionManager(ProjectViewActivity.this.linear1, 400.0d);
ProjectViewActivity.this.textview_download.setText("Baixar ( ".concat(hashMap2.get("size").toString().concat(" )")));
}
});
}
};
ProjectViewActivity.this._timer.schedule(ProjectViewActivity.this.timer, 700L);
} else {
ProjectViewActivity.this.timer = new TimerTask() {
@Override
public void run() {
ProjectViewActivity.this.runOnUiThread(new Runnable() {
@Override
public void run() {
ProjectViewActivity.this._TransitionManager(ProjectViewActivity.this.linear1, 400.0d);
ProjectViewActivity.this.textview_download.setText("Baixar");
}
});
}
};
ProjectViewActivity.this._timer.schedule(ProjectViewActivity.this.timer, 700L);
}
if (hashMap.containsKey("downloads")) {
ProjectViewActivity.this.total_downloads = Double.parseDouble(hashMap.get("downloads").toString());
ProjectViewActivity.this.downloads.setText(hashMap.get("downloads").toString().concat(" downloads"));
}
if (hashMap.containsKey("time")) {
ProjectViewActivity.this.date.setText(hashMap.get("time").toString());
}
if (hashMap.containsKey("likes")) {
ProjectViewActivity.this.likes.setText(hashMap.get("likes").toString().concat(" likes"));
}
if (hashMap.containsKey("comments")) {
ProjectViewActivity.this.comments.setText(hashMap.get("comments").toString());
}
if (hashMap.containsKey("download_url")) {
ProjectViewActivity.this.download_url = hashMap.get("download_url").toString();
}
if (hashMap.containsKey("description")) {
ProjectViewActivity.this.description.setText(hashMap.get("description").toString());
ProjectViewActivity projectViewActivity = ProjectViewActivity.this;
projectViewActivity._detect_links_(projectViewActivity.description);
}
if (hashMap.containsKey("video")) {
if (hashMap.get("video").toString().equals("")) {
ProjectViewActivity.this.linear_video.setVisibility(8);
} else {
ProjectViewActivity.this.yt_url = hashMap.get("video").toString();
ProjectViewActivity.this.linear_video.setVisibility(0);
}
}
if (hashMap.containsKey("category")) {
ProjectViewActivity.this.textview_category.setText(hashMap.get("category").toString());
ProjectViewActivity.this.linear_category.setVisibility(0);
}
if (hashMap.get("verify").toString().equals("true")) {
ProjectViewActivity.this.leniar_verified.setVisibility(0);
}
if (hashMap.get("editors_choice").toString().equals("true")) {
ProjectViewActivity.this.linear_editor.setVisibility(0);
}
if (hashMap.containsKey("comments_disable")) {
ProjectViewActivity.this.comments_type = hashMap.get("comments_disable").toString();
}
if (hashMap.containsKey("screen1")) {
if (hashMap.get("screen1").toString().equals("")) {
ProjectViewActivity.this.cardview3.setVisibility(8);
} else {
ProjectViewActivity.this.ss1 = hashMap.get("screen1").toString();
Glide.with(ProjectViewActivity.this.getApplicationContext()).load(Uri.parse(hashMap.get("screen1").toString())).into(ProjectViewActivity.this.screen1);
ProjectViewActivity.this.cardview3.setVisibility(0);
}
}
if (hashMap.containsKey("screen2")) {
if (hashMap.get("screen2").toString().equals("")) {
ProjectViewActivity.this.cardview4.setVisibility(8);
} else {
ProjectViewActivity.this.ss2 = hashMap.get("screen2").toString();
Glide.with(ProjectViewActivity.this.getApplicationContext()).load(Uri.parse(hashMap.get("screen2").toString())).into(ProjectViewActivity.this.screen2);
ProjectViewActivity.this.cardview4.setVisibility(0);
}
}
if (hashMap.containsKey("screen3")) {
if (hashMap.get("screen3").toString().equals("")) {
ProjectViewActivity.this.cardview5.setVisibility(8);
} else {
ProjectViewActivity.this.ss3 = hashMap.get("screen3").toString();
Glide.with(ProjectViewActivity.this.getApplicationContext()).load(Uri.parse(hashMap.get("screen3").toString())).into(ProjectViewActivity.this.screen3);
ProjectViewActivity.this.cardview5.setVisibility(0);
}
}
if (hashMap.containsKey("screen4")) {
if (hashMap.get("screen4").toString().equals("")) {
ProjectViewActivity.this.cardview6.setVisibility(8);
} else {
ProjectViewActivity.this.ss4 = hashMap.get("screen4").toString();
Glide.with(ProjectViewActivity.this.getApplicationContext()).load(Uri.parse(hashMap.get("screen4").toString())).into(ProjectViewActivity.this.screen4);
ProjectViewActivity.this.cardview6.setVisibility(0);
}
}
if (hashMap.containsKey("screen5")) {
if (hashMap.get("screen5").toString().equals("")) {
ProjectViewActivity.this.cardview7.setVisibility(8);
} else {
ProjectViewActivity.this.ss5 = hashMap.get("screen5").toString();
Glide.with(ProjectViewActivity.this.getApplicationContext()).load(Uri.parse(hashMap.get("screen5").toString())).into(ProjectViewActivity.this.screen5);
ProjectViewActivity.this.cardview7.setVisibility(0);
}
}
if (hashMap.containsKey("screen6")) {
if (hashMap.get("screen6").toString().equals("")) {
ProjectViewActivity.this.cardview8.setVisibility(8);
return;
}
ProjectViewActivity.this.ss6 = hashMap.get("screen6").toString();
Glide.with(ProjectViewActivity.this.getApplicationContext()).load(Uri.parse(hashMap.get("screen6").toString())).into(ProjectViewActivity.this.screen6);
ProjectViewActivity.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 (ProjectViewActivity.this.developer.getString("type", "").equals("Free") && key.equals(ProjectViewActivity.this.key)) {
if (hashMap.containsKey("icon")) {
Glide.with(ProjectViewActivity.this.getApplicationContext()).load(Uri.parse(hashMap.get("icon").toString())).into(ProjectViewActivity.this.icon);
}
if (hashMap.containsKey("title")) {
ProjectViewActivity.this.title.setText(hashMap.get("title").toString());
}
if (hashMap.containsKey("name")) {
ProjectViewActivity.this.textview_username.setText(hashMap.get("name").toString());
ProjectViewActivity.this.developer_names.setText(hashMap.get("name").toString());
}
if (hashMap.containsKey("size")) {
ProjectViewActivity.this.timer = new TimerTask() {
@Override
public void run() {
ProjectViewActivity projectViewActivity = ProjectViewActivity.this;
final HashMap hashMap2 = hashMap;
projectViewActivity.runOnUiThread(new Runnable() {
@Override
public void run() {
ProjectViewActivity.this._TransitionManager(ProjectViewActivity.this.linear1, 400.0d);
ProjectViewActivity.this.textview_download.setText("Baixar ( ".concat(hashMap2.get("size").toString().concat(" )")));
}
});
}
};
ProjectViewActivity.this._timer.schedule(ProjectViewActivity.this.timer, 700L);
} else {
ProjectViewActivity.this.timer = new TimerTask() {
@Override
public void run() {
ProjectViewActivity.this.runOnUiThread(new Runnable() {
@Override
public void run() {
ProjectViewActivity.this._TransitionManager(ProjectViewActivity.this.linear1, 400.0d);
ProjectViewActivity.this.textview_download.setText("Baixar");
}
});
}
};
ProjectViewActivity.this._timer.schedule(ProjectViewActivity.this.timer, 700L);
}
if (hashMap.containsKey("downloads")) {
ProjectViewActivity.this.total_downloads = Double.parseDouble(hashMap.get("downloads").toString());
ProjectViewActivity.this.downloads.setText(hashMap.get("downloads").toString().concat(" downloads"));
}
if (hashMap.containsKey("time")) {
ProjectViewActivity.this.date.setText(hashMap.get("time").toString());
}
if (hashMap.containsKey("likes")) {
ProjectViewActivity.this.likes.setText(hashMap.get("likes").toString().concat(" likes"));
}
if (hashMap.containsKey("comments")) {
ProjectViewActivity.this.comments.setText(hashMap.get("comments").toString());
}
if (hashMap.containsKey("download_url")) {
ProjectViewActivity.this.download_url = hashMap.get("download_url").toString();
}
if (hashMap.containsKey("description")) {
ProjectViewActivity.this.description.setText(hashMap.get("description").toString());
ProjectViewActivity projectViewActivity = ProjectViewActivity.this;
projectViewActivity._detect_links_(projectViewActivity.description);
}
if (hashMap.containsKey("video")) {
if (hashMap.get("video").toString().equals("")) {
ProjectViewActivity.this.linear_video.setVisibility(8);
} else {
ProjectViewActivity.this.yt_url = hashMap.get("video").toString();
ProjectViewActivity.this.linear_video.setVisibility(0);
}
}
if (hashMap.containsKey("category")) {
ProjectViewActivity.this.textview_category.setText(hashMap.get("category").toString());
ProjectViewActivity.this.linear_category.setVisibility(0);
}
if (hashMap.get("verify").toString().equals("true")) {
ProjectViewActivity.this.leniar_verified.setVisibility(0);
}
if (hashMap.get("editors_choice").toString().equals("true")) {
ProjectViewActivity.this.linear_editor.setVisibility(0);
}
if (hashMap.containsKey("comments_disable")) {
ProjectViewActivity.this.comments_type = hashMap.get("comments_disable").toString();
}
if (hashMap.containsKey("screen1")) {
if (hashMap.get("screen1").toString().equals("")) {
ProjectViewActivity.this.cardview3.setVisibility(8);
} else {
ProjectViewActivity.this.ss1 = hashMap.get("screen1").toString();
Glide.with(ProjectViewActivity.this.getApplicationContext()).load(Uri.parse(hashMap.get("screen1").toString())).into(ProjectViewActivity.this.screen1);
ProjectViewActivity.this.cardview3.setVisibility(0);
}
}
if (hashMap.containsKey("screen2")) {
if (hashMap.get("screen2").toString().equals("")) {
ProjectViewActivity.this.cardview4.setVisibility(8);
} else {
ProjectViewActivity.this.ss2 = hashMap.get("screen2").toString();
Glide.with(ProjectViewActivity.this.getApplicationContext()).load(Uri.parse(hashMap.get("screen2").toString())).into(ProjectViewActivity.this.screen2);
ProjectViewActivity.this.cardview4.setVisibility(0);
}
}
if (hashMap.containsKey("screen3")) {
if (hashMap.get("screen3").toString().equals("")) {
ProjectViewActivity.this.cardview5.setVisibility(8);
} else {
ProjectViewActivity.this.ss3 = hashMap.get("screen3").toString();
Glide.with(ProjectViewActivity.this.getApplicationContext()).load(Uri.parse(hashMap.get("screen3").toString())).into(ProjectViewActivity.this.screen3);
ProjectViewActivity.this.cardview5.setVisibility(0);
}
}
if (hashMap.containsKey("screen4")) {
if (hashMap.get("screen4").toString().equals("")) {
ProjectViewActivity.this.cardview6.setVisibility(8);
} else {
ProjectViewActivity.this.ss4 = hashMap.get("screen4").toString();
Glide.with(ProjectViewActivity.this.getApplicationContext()).load(Uri.parse(hashMap.get("screen4").toString())).into(ProjectViewActivity.this.screen4);
ProjectViewActivity.this.cardview6.setVisibility(0);
}
}
if (hashMap.containsKey("screen5")) {
if (hashMap.get("screen5").toString().equals("")) {
ProjectViewActivity.this.cardview7.setVisibility(8);
} else {
ProjectViewActivity.this.ss5 = hashMap.get("screen5").toString();
Glide.with(ProjectViewActivity.this.getApplicationContext()).load(Uri.parse(hashMap.get("screen5").toString())).into(ProjectViewActivity.this.screen5);
ProjectViewActivity.this.cardview7.setVisibility(0);
}
}
if (hashMap.containsKey("screen6")) {
if (hashMap.get("screen6").toString().equals("")) {
ProjectViewActivity.this.cardview8.setVisibility(8);
return;
}
ProjectViewActivity.this.ss6 = hashMap.get("screen6").toString();
Glide.with(ProjectViewActivity.this.getApplicationContext()).load(Uri.parse(hashMap.get("screen6").toString())).into(ProjectViewActivity.this.screen6);
ProjectViewActivity.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();
}
}
public class AnonymousClass20 implements ChildEventListener {
AnonymousClass20() {
}
@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 (ProjectViewActivity.this.developer.getString("type", "").equals("Paid") && key.equals(ProjectViewActivity.this.key)) {
if (hashMap.containsKey("icon")) {
Glide.with(ProjectViewActivity.this.getApplicationContext()).load(Uri.parse(hashMap.get("icon").toString())).into(ProjectViewActivity.this.icon);
}
if (hashMap.containsKey("title")) {
ProjectViewActivity.this.title.setText(hashMap.get("title").toString());
}
if (hashMap.containsKey("name")) {
ProjectViewActivity.this.textview_username.setText(hashMap.get("name").toString());
ProjectViewActivity.this.developer_names.setText(hashMap.get("name").toString());
}
if (hashMap.containsKey("size")) {
ProjectViewActivity.this.timer = new TimerTask() {
@Override
public void run() {
ProjectViewActivity projectViewActivity = ProjectViewActivity.this;
final HashMap hashMap2 = hashMap;
projectViewActivity.runOnUiThread(new Runnable() {
@Override
public void run() {
ProjectViewActivity.this._TransitionManager(ProjectViewActivity.this.linear1, 400.0d);
ProjectViewActivity.this.textview_download.setText("Comprar ( ".concat(hashMap2.get("size").toString().concat(" )")));
}
});
}
};
ProjectViewActivity.this._timer.schedule(ProjectViewActivity.this.timer, 700L);
} else {
ProjectViewActivity.this.timer = new TimerTask() {
@Override
public void run() {
ProjectViewActivity.this.runOnUiThread(new Runnable() {
@Override
public void run() {
ProjectViewActivity.this._TransitionManager(ProjectViewActivity.this.linear1, 400.0d);
ProjectViewActivity.this.textview_download.setText("Comprar");
}
});
}
};
ProjectViewActivity.this._timer.schedule(ProjectViewActivity.this.timer, 700L);
}
if (hashMap.containsKey("price")) {
ProjectViewActivity.this.textview_price.setText(hashMap.get("price").toString().concat(" Tk"));
ProjectViewActivity.this.timer = new TimerTask() {
@Override
public void run() {
ProjectViewActivity.this.runOnUiThread(new Runnable() {
@Override
public void run() {
ProjectViewActivity.this._TransitionManager(ProjectViewActivity.this.linear1, 400.0d);
ProjectViewActivity.this.linear11.setVisibility(0);
}
});
}
};
ProjectViewActivity.this._timer.schedule(ProjectViewActivity.this.timer, 700L);
}
if (hashMap.containsKey("test_link")) {
ProjectViewActivity.this.test_link = hashMap.get("test_link").toString();
ProjectViewActivity.this.button1.setVisibility(0);
}
if (hashMap.containsKey("time")) {
ProjectViewActivity.this.date.setText(hashMap.get("time").toString());
}
if (hashMap.containsKey("downloads")) {
ProjectViewActivity.this.downloads.setText(hashMap.get("downloads").toString().concat(" downloads"));
}
if (hashMap.containsKey("likes")) {
ProjectViewActivity.this.likes.setText(hashMap.get("likes").toString().concat(" likes"));
}
if (hashMap.containsKey("comments")) {
ProjectViewActivity.this.comments.setText(hashMap.get("comments").toString());
}
if (hashMap.containsKey("download_url")) {
ProjectViewActivity.this.download_url = hashMap.get("download_url").toString();
}
if (hashMap.containsKey("description")) {
ProjectViewActivity.this.description.setText(hashMap.get("description").toString());
ProjectViewActivity projectViewActivity = ProjectViewActivity.this;
projectViewActivity._detect_links_(projectViewActivity.description);
}
if (hashMap.containsKey("video")) {
if (hashMap.get("video").toString().equals("")) {
ProjectViewActivity.this.linear_video.setVisibility(8);
} else {
ProjectViewActivity.this.yt_url = hashMap.get("video").toString();
ProjectViewActivity.this.linear_video.setVisibility(0);
}
}
if (hashMap.containsKey("category")) {
ProjectViewActivity.this.textview_category.setText(hashMap.get("category").toString());
ProjectViewActivity.this.linear_category.setVisibility(0);
}
if (hashMap.get("verify").toString().equals("true")) {
ProjectViewActivity.this.leniar_verified.setVisibility(0);
}
if (hashMap.containsKey("comments_disable")) {
ProjectViewActivity.this.comments_type = hashMap.get("comments_disable").toString();
}
if (hashMap.containsKey("screen1")) {
if (hashMap.get("screen1").toString().equals("")) {
ProjectViewActivity.this.cardview3.setVisibility(8);
} else {
ProjectViewActivity.this.ss1 = hashMap.get("screen1").toString();
Glide.with(ProjectViewActivity.this.getApplicationContext()).load(Uri.parse(hashMap.get("screen1").toString())).into(ProjectViewActivity.this.screen1);
ProjectViewActivity.this.cardview3.setVisibility(0);
}
}
if (hashMap.containsKey("screen2")) {
if (hashMap.get("screen2").toString().equals("")) {
ProjectViewActivity.this.cardview4.setVisibility(8);
} else {
ProjectViewActivity.this.ss2 = hashMap.get("screen2").toString();
Glide.with(ProjectViewActivity.this.getApplicationContext()).load(Uri.parse(hashMap.get("screen2").toString())).into(ProjectViewActivity.this.screen2);
ProjectViewActivity.this.cardview4.setVisibility(0);
}
}
if (hashMap.containsKey("screen3")) {
if (hashMap.get("screen3").toString().equals("")) {
ProjectViewActivity.this.cardview5.setVisibility(8);
} else {
ProjectViewActivity.this.ss3 = hashMap.get("screen3").toString();
Glide.with(ProjectViewActivity.this.getApplicationContext()).load(Uri.parse(hashMap.get("screen3").toString())).into(ProjectViewActivity.this.screen3);
ProjectViewActivity.this.cardview5.setVisibility(0);
}
}
if (hashMap.containsKey("screen4")) {
if (!hashMap.get("screen4").toString().equals("")) {
ProjectViewActivity.this.cardview6.setVisibility(0);
ProjectViewActivity.this.ss4 = hashMap.get("screen4").toString();
Glide.with(ProjectViewActivity.this.getApplicationContext()).load(Uri.parse(hashMap.get("screen4").toString())).into(ProjectViewActivity.this.screen4);
ProjectViewActivity.this.cardview6.setVisibility(0);
} else {
ProjectViewActivity.this.cardview6.setVisibility(8);
}
}
if (hashMap.containsKey("screen5")) {
if (!hashMap.get("screen5").toString().equals("")) {
ProjectViewActivity.this.cardview7.setVisibility(0);
ProjectViewActivity.this.ss5 = hashMap.get("screen5").toString();
Glide.with(ProjectViewActivity.this.getApplicationContext()).load(Uri.parse(hashMap.get("screen5").toString())).into(ProjectViewActivity.this.screen5);
ProjectViewActivity.this.cardview7.setVisibility(0);
} else {
ProjectViewActivity.this.cardview7.setVisibility(8);
}
}
if (hashMap.containsKey("screen6")) {
if (!hashMap.get("screen6").toString().equals("")) {
ProjectViewActivity.this.cardview8.setVisibility(0);
ProjectViewActivity.this.ss6 = hashMap.get("screen6").toString();
Glide.with(ProjectViewActivity.this.getApplicationContext()).load(Uri.parse(hashMap.get("screen6").toString())).into(ProjectViewActivity.this.screen6);
ProjectViewActivity.this.cardview8.setVisibility(0);
return;
}
ProjectViewActivity.this.cardview8.setVisibility(8);
}
}
}
@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 (ProjectViewActivity.this.developer.getString("type", "").equals("Paid") && key.equals(ProjectViewActivity.this.key)) {
if (hashMap.containsKey("icon")) {
Glide.with(ProjectViewActivity.this.getApplicationContext()).load(Uri.parse(hashMap.get("icon").toString())).into(ProjectViewActivity.this.icon);
}
if (hashMap.containsKey("title")) {
ProjectViewActivity.this.title.setText(hashMap.get("title").toString());
}
if (hashMap.containsKey("name")) {
ProjectViewActivity.this.textview_username.setText(hashMap.get("name").toString());
ProjectViewActivity.this.developer_names.setText(hashMap.get("name").toString());
}
if (hashMap.containsKey("size")) {
ProjectViewActivity.this.timer = new TimerTask() {
@Override
public void run() {
ProjectViewActivity projectViewActivity = ProjectViewActivity.this;
final HashMap hashMap2 = hashMap;
projectViewActivity.runOnUiThread(new Runnable() {
@Override
public void run() {
ProjectViewActivity.this._TransitionManager(ProjectViewActivity.this.linear1, 400.0d);
ProjectViewActivity.this.textview_download.setText("Comprar ( ".concat(hashMap2.get("size").toString().concat(" )")));
}
});
}
};
ProjectViewActivity.this._timer.schedule(ProjectViewActivity.this.timer, 700L);
} else {
ProjectViewActivity.this.timer = new TimerTask() {
@Override
public void run() {
ProjectViewActivity.this.runOnUiThread(new Runnable() {
@Override
public void run() {
ProjectViewActivity.this._TransitionManager(ProjectViewActivity.this.linear1, 400.0d);
ProjectViewActivity.this.textview_download.setText("Comprar");
}
});
}
};
ProjectViewActivity.this._timer.schedule(ProjectViewActivity.this.timer, 700L);
}
if (hashMap.containsKey("price")) {
ProjectViewActivity.this.textview_price.setText(hashMap.get("price").toString().concat(" Tk"));
ProjectViewActivity.this.timer = new TimerTask() {
@Override
public void run() {
ProjectViewActivity.this.runOnUiThread(new Runnable() {
@Override
public void run() {
ProjectViewActivity.this._TransitionManager(ProjectViewActivity.this.linear1, 400.0d);
ProjectViewActivity.this.linear11.setVisibility(0);
}
});
}
};
ProjectViewActivity.this._timer.schedule(ProjectViewActivity.this.timer, 700L);
}
if (hashMap.containsKey("test_link")) {
ProjectViewActivity.this.test_link = hashMap.get("test_link").toString();
ProjectViewActivity.this.button1.setVisibility(0);
}
if (hashMap.containsKey("time")) {
ProjectViewActivity.this.date.setText(hashMap.get("time").toString());
}
if (hashMap.containsKey("downloads")) {
ProjectViewActivity.this.downloads.setText(hashMap.get("downloads").toString().concat(" downloads"));
}
if (hashMap.containsKey("likes")) {
ProjectViewActivity.this.likes.setText(hashMap.get("likes").toString().concat(" likes"));
}
if (hashMap.containsKey("comments")) {
ProjectViewActivity.this.comments.setText(hashMap.get("comments").toString());
}
if (hashMap.containsKey("download_url")) {
ProjectViewActivity.this.download_url = hashMap.get("download_url").toString();
}
if (hashMap.containsKey("description")) {
ProjectViewActivity.this.description.setText(hashMap.get("description").toString());
ProjectViewActivity projectViewActivity = ProjectViewActivity.this;
projectViewActivity._detect_links_(projectViewActivity.description);
}
if (hashMap.containsKey("video")) {
if (hashMap.get("video").toString().equals("")) {
ProjectViewActivity.this.linear_video.setVisibility(8);
} else {
ProjectViewActivity.this.yt_url = hashMap.get("video").toString();
ProjectViewActivity.this.linear_video.setVisibility(0);
}
}
if (hashMap.containsKey("category")) {
ProjectViewActivity.this.textview_category.setText(hashMap.get("category").toString());
ProjectViewActivity.this.linear_category.setVisibility(0);
}
if (hashMap.get("verify").toString().equals("true")) {
ProjectViewActivity.this.leniar_verified.setVisibility(0);
}
if (hashMap.containsKey("comments_disable")) {
ProjectViewActivity.this.comments_type = hashMap.get("comments_disable").toString();
}
if (hashMap.containsKey("screen1")) {
if (hashMap.get("screen1").toString().equals("")) {
ProjectViewActivity.this.cardview3.setVisibility(8);
} else {
ProjectViewActivity.this.ss1 = hashMap.get("screen1").toString();
Glide.with(ProjectViewActivity.this.getApplicationContext()).load(Uri.parse(hashMap.get("screen1").toString())).into(ProjectViewActivity.this.screen1);
ProjectViewActivity.this.cardview3.setVisibility(0);
}
}
if (hashMap.containsKey("screen2")) {
if (hashMap.get("screen2").toString().equals("")) {
ProjectViewActivity.this.cardview4.setVisibility(8);
} else {
ProjectViewActivity.this.ss2 = hashMap.get("screen2").toString();
Glide.with(ProjectViewActivity.this.getApplicationContext()).load(Uri.parse(hashMap.get("screen2").toString())).into(ProjectViewActivity.this.screen2);
ProjectViewActivity.this.cardview4.setVisibility(0);
}
}
if (hashMap.containsKey("screen3")) {
if (hashMap.get("screen3").toString().equals("")) {
ProjectViewActivity.this.cardview5.setVisibility(8);
} else {
ProjectViewActivity.this.ss3 = hashMap.get("screen3").toString();
Glide.with(ProjectViewActivity.this.getApplicationContext()).load(Uri.parse(hashMap.get("screen3").toString())).into(ProjectViewActivity.this.screen3);
ProjectViewActivity.this.cardview5.setVisibility(0);
}
}
if (hashMap.containsKey("screen4")) {
if (!hashMap.get("screen4").toString().equals("")) {
ProjectViewActivity.this.cardview6.setVisibility(0);
ProjectViewActivity.this.ss4 = hashMap.get("screen4").toString();
Glide.with(ProjectViewActivity.this.getApplicationContext()).load(Uri.parse(hashMap.get("screen4").toString())).into(ProjectViewActivity.this.screen4);
ProjectViewActivity.this.cardview6.setVisibility(0);
} else {
ProjectViewActivity.this.cardview6.setVisibility(8);
}
}
if (hashMap.containsKey("screen5")) {
if (!hashMap.get("screen5").toString().equals("")) {
ProjectViewActivity.this.cardview7.setVisibility(0);
ProjectViewActivity.this.ss5 = hashMap.get("screen5").toString();
Glide.with(ProjectViewActivity.this.getApplicationContext()).load(Uri.parse(hashMap.get("screen5").toString())).into(ProjectViewActivity.this.screen5);
ProjectViewActivity.this.cardview7.setVisibility(0);
} else {
ProjectViewActivity.this.cardview7.setVisibility(8);
}
}
if (hashMap.containsKey("screen6")) {
if (!hashMap.get("screen6").toString().equals("")) {
ProjectViewActivity.this.cardview8.setVisibility(0);
ProjectViewActivity.this.ss6 = hashMap.get("screen6").toString();
Glide.with(ProjectViewActivity.this.getApplicationContext()).load(Uri.parse(hashMap.get("screen6").toString())).into(ProjectViewActivity.this.screen6);
ProjectViewActivity.this.cardview8.setVisibility(0);
return;
}
ProjectViewActivity.this.cardview8.setVisibility(8);
}
}
}
@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();
this.network.startRequestNetwork("GET", "http://www.google.com", "", this._network_request_listener);
if (this.uid.equals(FirebaseAuth.getInstance().getCurrentUser().getUid())) {
this._fab.show();
} else {
this._fab.hide();
}
if (this.developer.getString("type", "").equals("Paid")) {
this._fab.hide();
}
}
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);
_rewarded_video();
_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.linear_premium.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.button1.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");
_rippleRoundStroke(this.linear_premium, "#FF9800", "#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);
_round_corner_and_ripple(this.button1, 20.0d, 10.0d, "#D50000", true);
TimerTask timerTask = new TimerTask() {
@Override
public void run() {
ProjectViewActivity.this.runOnUiThread(new Runnable() {
@Override
public void run() {
ProjectViewActivity.this._TransitionManager(ProjectViewActivity.this.linear1, 400.0d);
ProjectViewActivity.this.linear10.setVisibility(0);
ProjectViewActivity.this.linear13.setVisibility(0);
}
});
}
};
this.timer = timerTask;
this._timer.schedule(timerTask, 500L);
if (this.developer.getString("type", "").equals("Paid")) {
this.linear_premium.setVisibility(0);
}
}
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 _cus_report() {
final BottomSheetDialog bottomSheetDialog = new BottomSheetDialog(this);
View inflate = getLayoutInflater().inflate(R.layout.report, (ViewGroup) null);
bottomSheetDialog.setContentView(inflate);
bottomSheetDialog.getWindow().findViewById(R.id.design_bottom_sheet).setBackgroundResource(android.R.color.transparent);
View view = (LinearLayout) inflate.findViewById(R.id.bg);
View view2 = (LinearLayout) inflate.findViewById(R.id.top);
final EditText editText = (EditText) bottomSheetDialog.findViewById(R.id.edittext1);
editText.setFocusableInTouchMode(true);
editText.addTextChangedListener(new TextWatcher() {
@Override
public void afterTextChanged(Editable editable) {
}
@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) {
}
@Override
public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) {
charSequence.toString();
}
});
((TextInputLayout) inflate.findViewById(R.id.textinputlayout1)).setBoxCornerRadii(5.0f, 5.0f, 5.0f, 5.0f);
Button button = (Button) bottomSheetDialog.findViewById(R.id.b1);
button.setText("REPORTAR");
_round_corner_and_ripple(view, 20.0d, 0.0d, "#FFFFFF", false);
_round_corner_and_ripple(view2, 360.0d, 0.0d, "#E0E0E0", false);
_round_corner_and_ripple(button, 15.0d, 5.0d, "#1361F5", true);
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view3) {
ProjectViewActivity.this.edittext_value = editText.getText().toString();
if (SketchwareUtil.isConnected(ProjectViewActivity.this.getApplicationContext())) {
if (ProjectViewActivity.this.edittext_value.length() > 5) {
ProjectViewActivity.this.cal = Calendar.getInstance();
ProjectViewActivity projectViewActivity = ProjectViewActivity.this;
projectViewActivity.report_key = projectViewActivity.suggestion.push().getKey();
ProjectViewActivity.this.report_map = new HashMap();
ProjectViewActivity.this.report_map.put("project_name", ProjectViewActivity.this.title.getText().toString());
ProjectViewActivity.this.report_map.put("message", ProjectViewActivity.this.edittext_value);
ProjectViewActivity.this.report_map.put("project_key", ProjectViewActivity.this.key);
ProjectViewActivity.this.report_map.put("project_uid", ProjectViewActivity.this.uid);
ProjectViewActivity.this.report_map.put("key", ProjectViewActivity.this.report_key);
ProjectViewActivity.this.report_map.put("type", ProjectViewActivity.this.developer.getString("type", ""));
ProjectViewActivity.this.report_map.put("mode", "Report");
ProjectViewActivity.this.report_map.put("time", new SimpleDateFormat("dd-MM-yyyy hh:mm:ss").format(ProjectViewActivity.this.cal.getTime()));
ProjectViewActivity.this.report_map.put("user_name", ProjectViewActivity.this.users.getString("name", ""));
ProjectViewActivity.this.report_map.put("user_profile", ProjectViewActivity.this.users.getString(Scopes.PROFILE, ""));
ProjectViewActivity.this.report_map.put("user_email", FirebaseAuth.getInstance().getCurrentUser().getEmail());
ProjectViewActivity.this.report_map.put("user_uid", FirebaseAuth.getInstance().getCurrentUser().getUid());
ProjectViewActivity.this.suggestion.child(ProjectViewActivity.this.report_key).updateChildren(ProjectViewActivity.this.report_map);
ProjectViewActivity.this.report_map.clear();
SketchwareUtil.showMessage(ProjectViewActivity.this.getApplicationContext(), "Iremos analisar o seu report.");
bottomSheetDialog.dismiss();
return;
}
SketchwareUtil.showMessage(ProjectViewActivity.this.getApplicationContext(), "Por favor, explique seu report.");
return;
}
SketchwareUtil.showMessage(ProjectViewActivity.this.getApplicationContext(), "Sem internet");
}
});
bottomSheetDialog.setCancelable(true);
bottomSheetDialog.show();
}
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 _rplew(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) {
ProjectViewActivity.this._Rewarded_Android_By_HarshTek();
}
@Override
public void onAdLoadFailed(String str, MaxError maxError) {
maxError.getMessage();
SketchwareUtil.showMessage(ProjectViewActivity.this.getApplicationContext(), "Erro ao carregar anúncios!");
}
@Override
public void onAdDisplayFailed(MaxAd maxAd, MaxError maxError) {
maxError.getMessage();
SketchwareUtil.showMessage(ProjectViewActivity.this.getApplicationContext(), "Erro ao carregar anúncios!");
}
});
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;
}
}