package com.mymahal; import androidx.appcompat.app.AppCompatActivity; import androidx.annotation.*; import android.app.*; import android.os.*; import android.view.*; import android.view.View.*; import android.widget.*; import android.content.*; import android.content.res.*; import android.graphics.*; import android.graphics.drawable.*; import android.media.*; import android.net.*; import android.text.*; import android.text.style.*; import android.util.*; import android.webkit.*; import android.animation.*; import android.view.animation.*; import java.io.*; import java.util.*; import java.util.regex.*; import java.text.*; import org.json.*; import java.util.HashMap; import java.util.ArrayList; import android.widget.LinearLayout; import android.widget.ImageView; import android.widget.TextView; import androidx.viewpager.widget.ViewPager; import androidx.viewpager.widget.PagerAdapter; import androidx.viewpager.widget.ViewPager.OnPageChangeListener; import androidx.viewpager.widget.ViewPager.OnAdapterChangeListener; import androidx.recyclerview.widget.*; import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView.Adapter; import androidx.recyclerview.widget.RecyclerView.ViewHolder; import android.content.Intent; import android.net.Uri; import android.app.Activity; import android.content.SharedPreferences; import android.animation.ObjectAnimator; import android.view.animation.LinearInterpolator; import android.view.animation.AccelerateInterpolator; import android.view.animation.DecelerateInterpolator; import android.view.animation.AccelerateDecelerateInterpolator; import android.view.animation.BounceInterpolator; import java.util.Timer; import java.util.TimerTask; import android.app.AlertDialog; import android.content.DialogInterface; import android.view.View; import android.graphics.Typeface; import com.bumptech.glide.Glide; import com.azoft.carousellayoutmanager.*; import com.cyberalpha.darkIOS.*; import com.kaopiz.kprogresshud.*; import com.twotoasters.jazzylistview.*; import androidx.fragment.app.Fragment; import androidx.fragment.app.FragmentManager; import androidx.fragment.app.DialogFragment; import androidx.core.content.ContextCompat; import androidx.core.app.ActivityCompat; import android.Manifest; import android.content.pm.PackageManager; public class DashboardActivity extends AppCompatActivity { private Timer _timer = new Timer(); private HashMap UpdatifyMap = new HashMap<>(); private boolean b = false; private double position = 0; private double num = 0; private boolean sliderb = false; private boolean bb = false; private double pos = 0; private HashMap varmap = new HashMap<>(); private ArrayList> listmap = new ArrayList<>(); private ArrayList> map = new ArrayList<>(); private LinearLayout linear1; private LinearLayout linear2; private LinearLayout linear13; private LinearLayout linear12; private ImageView imageview1; private LinearLayout linear3; private TextView textview1; private ImageView imageview2; private TextView textview10; private ViewPager viewpager1; private LinearLayout linear14; private JazzyListView listview1; private RecyclerView recyclerview1; private Intent i = new Intent(); private SharedPreferences UCSP; private RequestNetwork net; private RequestNetwork.RequestListener _net_request_listener; private ObjectAnimator bane = new ObjectAnimator(); private TimerTask tim; private TimerTask up; private AlertDialog.Builder d; private Intent support = new Intent(); private SharedPreferences app; private SharedPreferences whatsnew; private TimerTask del; private TimerTask slidet; private TimerTask t; private ObjectAnimator anim = new ObjectAnimator(); private TimerTask pop; @Override protected void onCreate(Bundle _savedInstanceState) { super.onCreate(_savedInstanceState); setContentView(R.layout.dashboard); initialize(_savedInstanceState); if (ContextCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE) == PackageManager.PERMISSION_DENIED) { ActivityCompat.requestPermissions(this, new String[] {Manifest.permission.READ_EXTERNAL_STORAGE}, 1000); } else { initializeLogic(); } } @Override public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) { super.onRequestPermissionsResult(requestCode, permissions, grantResults); if (requestCode == 1000) { initializeLogic(); } } private void initialize(Bundle _savedInstanceState) { linear1 = findViewById(R.id.linear1); linear2 = findViewById(R.id.linear2); linear13 = findViewById(R.id.linear13); linear12 = findViewById(R.id.linear12); imageview1 = findViewById(R.id.imageview1); linear3 = findViewById(R.id.linear3); textview1 = findViewById(R.id.textview1); imageview2 = findViewById(R.id.imageview2); textview10 = findViewById(R.id.textview10); viewpager1 = findViewById(R.id.viewpager1); linear14 = findViewById(R.id.linear14); listview1 = findViewById(R.id.listview1); recyclerview1 = findViewById(R.id.recyclerview1); UCSP = getSharedPreferences("UCSP", Activity.MODE_PRIVATE); net = new RequestNetwork(this); d = new AlertDialog.Builder(this); app = getSharedPreferences("app", Activity.MODE_PRIVATE); whatsnew = getSharedPreferences("n", Activity.MODE_PRIVATE); imageview1.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View _view) { i.setClass(getApplicationContext(), FixDashboardActivity.class); startActivity(i); } }); imageview2.setOnLongClickListener(new View.OnLongClickListener() { @Override public boolean onLongClick(View _view) { return true; } }); imageview2.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View _view) { final AlertDialog d = new AlertDialog.Builder(DashboardActivity.this).create(); View inflate = getLayoutInflater().inflate(R.layout.profile, null); d.setView(inflate); d.getWindow().setBackgroundDrawableResource(android.R.color.transparent); final Button but1 = (Button)inflate.findViewById(R.id.button1); but1.setOnClickListener(new OnClickListener() { public void onClick(View view) { d.dismiss(); support.setAction(Intent.ACTION_VIEW); support.setData(Uri.parse("https://youtube.com/@NewIyongOfficial")); startActivity(support); } }); final Button but2 = (Button)inflate.findViewById(R.id.button2); but2.setOnClickListener(new OnClickListener() { public void onClick(View view) { d.dismiss(); support.setAction(Intent.ACTION_VIEW); support.setData(Uri.parse("https://youtube.com/@NewIyongOfficial")); startActivity(support); } }); final Button but3 = (Button)inflate.findViewById(R.id.button3); but3.setOnClickListener(new OnClickListener() { public void onClick(View view) { d.dismiss(); } }); final TextView textview1 = (TextView)inflate.findViewById(R.id.textview1); final ImageView imageview1 = (ImageView)inflate.findViewById(R.id.imageview1); final LinearLayout linear1 = (LinearLayout)inflate.findViewById(R.id.linear1); if (!app.getString("pp", "").equals("")) { if (FileUtil.isExistFile(app.getString("pp", ""))) { com.bumptech.glide.request.RequestOptions oimageview1 = new com.bumptech.glide.request.RequestOptions(); oimageview1.circleCrop(); Glide.with(getApplicationContext()) .load(Uri.fromFile(new java.io.File(app.getString("pp", "")))) .apply(oimageview1) .placeholder(R.drawable.logooo) .into(imageview1); } } textview1.setTypeface(Typeface.createFromAsset(getAssets(),"fonts/zeroes_one.ttf"), 0); but1.setTypeface(Typeface.createFromAsset(getAssets(),"fonts/zeroes_one.ttf"), 0); but2.setTypeface(Typeface.createFromAsset(getAssets(),"fonts/zeroes_one.ttf"), 0); but3.setTypeface(Typeface.createFromAsset(getAssets(),"fonts/zeroes_one.ttf"), 0); textview1.setText("40K Followers 12k Subscribers"); but1.setBackground(new GradientDrawable() { public GradientDrawable getIns(int a, int b) { this.setCornerRadius(a); this.setColor(b); return this; } }.getIns((int)15, 0xFF2196F3)); but2.setBackground(new GradientDrawable() { public GradientDrawable getIns(int a, int b) { this.setCornerRadius(a); this.setColor(b); return this; } }.getIns((int)15, 0xFFFF3D00)); but3.setBackground(new GradientDrawable() { public GradientDrawable getIns(int a, int b) { this.setCornerRadius(a); this.setColor(b); return this; } }.getIns((int)15, 0xFF4589B0)); linear1.setBackground(new GradientDrawable() { public GradientDrawable getIns(int a, int b, int c, int d) { this.setCornerRadius(a); this.setStroke(b, c); this.setColor(d); return this; } }.getIns((int)15, (int)0, 0xFF006064, 0xFF224972)); d.setCancelable(false); d.show(); } }); viewpager1.addOnPageChangeListener(new ViewPager.OnPageChangeListener() { @Override public void onPageScrolled(int _position, float _positionOffset, int _positionOffsetPixels) { } @Override public void onPageSelected(int _position) { position = _position; num = _position; recyclerview1.setAdapter(new Recyclerview1Adapter(listmap)); recyclerview1.smoothScrollToPosition((int)_position); } @Override public void onPageScrollStateChanged(int _scrollState) { } }); _net_request_listener = new RequestNetwork.RequestListener() { @Override public void onResponse(String _param1, String _param2, HashMap _param3) { final String _tag = _param1; final String _response = _param2; final HashMap _responseHeaders = _param3; } @Override public void onErrorResponse(String _param1, String _param2) { final String _tag = _param1; final String _message = _param2; } }; } private void initializeLogic() { listview1.setAlpha((float)(0)); listview1.setScaleX((float)(0.4d)); listview1.setScaleY((float)(0.4d)); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { Window w = this.getWindow(); w.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS); w.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);} getWindow().getDecorView().setSystemUiVisibility( View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { getWindow().setStatusBarColor(Color.TRANSPARENT); } if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { getWindow().setNavigationBarColor(Color.TRANSPARENT); } listview1.setVerticalScrollBarEnabled(false); //This block is Coded by CyberAlpha PH overrideFonts(this,getWindow().getDecorView()); } private void overrideFonts(final android.content.Context context, final View v) { String type = "normal"; int op = 0; if (type.equals("normal")) { op = 0; } if (type.equals("bold")) { op = 1; } if (type.equals("italic")) { op = 2; } if (type.equals("bold|italic")) { op = 3; } try { Typeface typeace = Typeface.createFromAsset(getAssets(),"fonts/zeroes_one.ttf"); if (v instanceof ViewGroup) { ViewGroup vg = (ViewGroup) v; for (int i = 0; i < vg.getChildCount(); i++) { View child = vg.getChildAt(i); overrideFonts(context, child); } } else { if ((v instanceof TextView)) { ((TextView) v).setTypeface(typeace, (op)); } else { if ((v instanceof EditText )) { ((EditText) v).setTypeface(typeace, (op)); } else { if ((v instanceof Button)) { ((Button) v).setTypeface(typeace, (op)); } } } } } catch(Exception e) { SketchwareUtil.showMessage(getApplicationContext(), "Error Loading Font"); }; textview1.setTypeface(Typeface.createFromAsset(getAssets(),"fonts/chou.ttf"), 1); textview10.setEllipsize(TextUtils.TruncateAt.MARQUEE); textview10.setMarqueeRepeatLimit(-1); textview10.setSingleLine(true); textview10.setSelected(true); if (!sliderb) { { HashMap _item = new HashMap<>(); _item.put("i", "https://i.imgur.com/4dMj6kR.jpg"); listmap.add(_item); } { HashMap _item = new HashMap<>(); _item.put("i", "https://i.imgur.com/1WFbATX.jpg"); listmap.add(_item); } { HashMap _item = new HashMap<>(); _item.put("i", "https://i.imgur.com/lHiqGNL.jpg"); listmap.add(_item); } viewpager1.setAdapter(new Viewpager1Adapter(listmap)); recyclerview1.setAdapter(new Recyclerview1Adapter(listmap)); recyclerview1.setLayoutManager(new LinearLayoutManager(this,LinearLayoutManager.HORIZONTAL, false)); recyclerview1.setHasFixedSize(true); slidet = new TimerTask() { @Override public void run() { runOnUiThread(new Runnable() { @Override public void run() { viewpager1.setCurrentItem((int)num); num++; if (num == listmap.size()) { num = 0; } } }); } }; _timer.scheduleAtFixedRate(slidet, (int)(0), (int)(2500)); if (whatsnew.getString(app.getString("v", ""), "").equals("")) { del = new TimerTask() { @Override public void run() { runOnUiThread(new Runnable() { @Override public void run() { _whats(); } }); } }; _timer.schedule(del, (int)(1500)); } else { _Animator(listview1, "Alpha", 1, 200); _Animator(listview1, "scaleX", 1.1d, 500); _Animator(listview1, "scaleY", 1.1d, 500); pop = new TimerTask() { @Override public void run() { runOnUiThread(new Runnable() { @Override public void run() { _Animator(listview1, "scaleX", 1, 200); _Animator(listview1, "scaleY", 1, 200); } }); } }; _timer.schedule(pop, (int)(500)); } sliderb = true; } if (!bb) { _loadmenu(); if (app.contains("bgm")) { } bb = true; } } @Override public void onBackPressed() { if (app.contains("bgm")) { } finish(); } public void _Animator(final View _view, final String _propertyName, final double _value, final double _duration) { ObjectAnimator anim = new ObjectAnimator(); anim.setTarget(_view); anim.setPropertyName(_propertyName); anim.setFloatValues((float)_value); anim.setDuration((long)_duration); anim.start(); } public void _whats() { if (whatsnew.getString(app.getString("v", ""), "").equals("")) { whatsnew.edit().putString(app.getString("v", ""), "1").commit(); final com.google.android.material.bottomsheet.BottomSheetDialog b = new com.google.android.material.bottomsheet.BottomSheetDialog(DashboardActivity.this); View layBase = getLayoutInflater().inflate(R.layout.what, null); final LinearLayout lin1 = (LinearLayout)layBase.findViewById(R.id.linear1); final TextView t1 = (TextView)layBase.findViewById(R.id.textview1); final TextView t2 = (TextView)layBase.findViewById(R.id.textview2); lin1.setBackground(new GradientDrawable() { public GradientDrawable getIns(int a, int b) { this.setCornerRadius(a); this.setColor(b); return this; } }.getIns((int)15, 0xFF32486B)); t1.setTypeface(Typeface.createFromAsset(getAssets(),"fonts/zeroes_one.ttf"), 1); t2.setTypeface(Typeface.createFromAsset(getAssets(),"fonts/zeroes_one.ttf"), 0); final ImageView exit = (ImageView)layBase.findViewById(R.id.imageview1); exit.setOnClickListener(new OnClickListener() { @Override public void onClick (View v) { b.dismiss(); _Animator(listview1, "Alpha", 1, 200); _Animator(listview1, "scaleX", 1.1d, 500); _Animator(listview1, "scaleY", 1.1d, 500); pop = new TimerTask() { @Override public void run() { runOnUiThread(new Runnable() { @Override public void run() { _Animator(listview1, "scaleX", 1, 200); _Animator(listview1, "scaleY", 1, 200); } }); } }; _timer.schedule(pop, (int)(500)); }}); b.setContentView(layBase); b.getWindow().findViewById(R.id.design_bottom_sheet).setBackgroundResource(android.R.color.transparent); b.show(); } else { } } public void _rippleRoundStroke(final View _view, final String _focus, final String _pressed, final double _round, final double _stroke, final String _strokeclr) { android.graphics.drawable.GradientDrawable GG = new android.graphics.drawable.GradientDrawable(); GG.setColor(Color.parseColor(_focus)); GG.setCornerRadius((float)_round); GG.setStroke((int) _stroke, Color.parseColor("#" + _strokeclr.replace("#", ""))); android.graphics.drawable.RippleDrawable RE = new android.graphics.drawable.RippleDrawable(new android.content.res.ColorStateList(new int[][]{new int[]{}}, new int[]{ Color.parseColor(_pressed)}), GG, null); _view.setBackground(RE); } public void _loadmenu() { varmap = new HashMap<>(); varmap.put("t", "HEROES"); varmap.put("st", "Unlock New Skins"); varmap.put("i", "https://i.imgur.com/JsoGYYK.jpg"); map.add(varmap); varmap = new HashMap<>(); varmap.put("t", "EMOTE"); varmap.put("st", "Unlock Battle Emoji"); varmap.put("i", "https://i.imgur.com/j1iXhie.jpg"); map.add(varmap); varmap = new HashMap<>(); varmap.put("t", "Recall & BGM"); varmap.put("st", "Unlock Cool Recalls and BGM"); varmap.put("i", "https://i.imgur.com/dblHVns.jpg"); map.add(varmap); varmap = new HashMap<>(); varmap.put("t", "Mod Script"); varmap.put("st", "Unlock Funniest Script"); varmap.put("i", "https://i.imgur.com/n1QZZYh.jpg"); map.add(varmap); listview1.setAdapter(new Listview1Adapter(map)); listview1.setTransitionEffect(new com.twotoasters.jazzylistview.effects.SlideInEffect()); } public void _caseof(final double _n) { if (_n == 0) { i.setClass(getApplicationContext(), HerolistActivity.class); i.putExtra("c", ""); startActivity(i); } if (_n == 1) { i.setClass(getApplicationContext(), EffectsActivity.class); i.putExtra("c", ""); startActivity(i); } if (_n == 2) { i.setClass(getApplicationContext(), TestActivity.class); i.putExtra("c", ""); startActivity(i); } if (_n == 3) { i.setClass(getApplicationContext(), NewEffectsActivity.class); i.putExtra("c", ""); startActivity(i); } } public void _shadAnim(final View _view, final String _propertyName, final double _value, final double _duration) { ObjectAnimator anim= new ObjectAnimator(); anim.setTarget(_view); anim.setPropertyName(_propertyName); anim.setFloatValues((float)_value); anim.setDuration((long)_duration); anim.start(); anim.setInterpolator(new LinearInterpolator()); anim.start(); } public void _clickAnim(final View _view) { _view.setOnTouchListener(new OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { switch(event.getAction()){ case MotionEvent.ACTION_DOWN:{ _shadAnim(_view, "elevation", 25, 100); _shadAnim(_view, "scaleX", 0.8d, 100); _shadAnim(_view, "scaleY", 0.8d, 100); //Read Me // If gusto mo onClick lumiliit yung button, gaiwn mo yung "1.5" into less than 1 like 0.9, 0 8..... //If gusto mo OnCluck lumalakinyung button, gawin no yung 1.5 into bigger than 1 like 1.2, 1.3, 1.5, ..... t = new TimerTask() { @Override public void run() { runOnUiThread(new Runnable() { @Override public void run() { _shadAnim(_view, "elevation", 10, 100); _shadAnim(_view, "scaleX", 1.0d, 100); _shadAnim(_view, "scaleY", 1.0d, 100); } }); } }; _timer.schedule(t, (int)(70)); break;} case MotionEvent.ACTION_UP:{ anim.cancel(); _shadAnim(_view, "elevation", 5, 100); _shadAnim(_view, "scaleX", 1, 100); _shadAnim(_view, "scaleY", 1, 100); t = new TimerTask() { @Override public void run() { runOnUiThread(new Runnable() { @Override public void run() { _shadAnim(_view, "elevation", 1, 100); _shadAnim(_view, "scaleX", 1, 100); _shadAnim(_view, "scaleY", 1, 100); } }); } }; _timer.schedule(t, (int)(130)); t = new TimerTask() { @Override public void run() { runOnUiThread(new Runnable() { @Override public void run() { _shadAnim(_view, "elevation", 1, 100); _shadAnim(_view, "scaleX", 1, 100); _shadAnim(_view, "scaleY", 1, 100); } }); } }; _timer.schedule(t, (int)(130)); break;}} return false; } }); } public class Viewpager1Adapter extends PagerAdapter { Context _context; ArrayList> _data; public Viewpager1Adapter(Context _ctx, ArrayList> _arr) { _context = _ctx; _data = _arr; } public Viewpager1Adapter(ArrayList> _arr) { _context = getApplicationContext(); _data = _arr; } @Override public int getCount() { return _data.size(); } @Override public boolean isViewFromObject(View _view, Object _object) { return _view == _object; } @Override public void destroyItem(ViewGroup _container, int _position, Object _object) { _container.removeView((View) _object); } @Override public int getItemPosition(Object _object) { return super.getItemPosition(_object); } @Override public CharSequence getPageTitle(int pos) { // Use the Activity Event (onTabLayoutNewTabAdded) in order to use this method return "page " + String.valueOf(pos); } @Override public Object instantiateItem(ViewGroup _container, final int _position) { View _view = LayoutInflater.from(_context).inflate(R.layout.slide, _container, false); final LinearLayout linear1 = _view.findViewById(R.id.linear1); final ImageView imageview1 = _view.findViewById(R.id.imageview1); Glide.with(getApplicationContext()) .load(_data.get((int)_position).get("i").toString()) .placeholder(R.drawable.transparent) .transform(new com.bumptech.glide.load.resource.bitmap.RoundedCorners(15)) .into(imageview1); linear1.setBackground(new GradientDrawable() { public GradientDrawable getIns(int a, int b, int c, int d) { this.setCornerRadius(a); this.setStroke(b, c); this.setColor(d); return this; } }.getIns((int)15, (int)2, 0xFF424242, 0xFF212121)); _container.addView(_view); return _view; } } public class Listview1Adapter extends BaseAdapter { ArrayList> _data; public Listview1Adapter(ArrayList> _arr) { _data = _arr; } @Override public int getCount() { return _data.size(); } @Override public HashMap getItem(int _index) { return _data.get(_index); } @Override public long getItemId(int _index) { return _index; } @Override public View getView(final int _position, View _v, ViewGroup _container) { LayoutInflater _inflater = (LayoutInflater) getBaseContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE); View _view = _v; if (_view == null) { _view = _inflater.inflate(R.layout.menu, null); } final LinearLayout linear1 = _view.findViewById(R.id.linear1); final ImageView imageview1 = _view.findViewById(R.id.imageview1); final LinearLayout linear2 = _view.findViewById(R.id.linear2); final Button button1 = _view.findViewById(R.id.button1); final TextView textview1 = _view.findViewById(R.id.textview1); final TextView textview2 = _view.findViewById(R.id.textview2); textview1.setText(_data.get((int)_position).get("t").toString()); textview2.setText(_data.get((int)_position).get("st").toString()); textview1.setTypeface(Typeface.createFromAsset(getAssets(),"fonts/chou.ttf"), 0); textview2.setTypeface(Typeface.createFromAsset(getAssets(),"fonts/zeroes_one.ttf"), 0); button1.setTypeface(Typeface.createFromAsset(getAssets(),"fonts/zeroes_one.ttf"), 0); Glide.with(getApplicationContext()) .load(_data.get((int)_position).get("i").toString()) .placeholder(R.drawable.transparent) .transform(new com.bumptech.glide.load.resource.bitmap.RoundedCorners(100)) .into(imageview1); linear1.setBackgroundColor(Color.TRANSPARENT); button1.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View _view) { _caseof(_position); } }); _clickAnim(button1); return _view; } } public class Recyclerview1Adapter extends RecyclerView.Adapter { ArrayList> _data; public Recyclerview1Adapter(ArrayList> _arr) { _data = _arr; } @Override public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { LayoutInflater _inflater = (LayoutInflater) getBaseContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE); View _v = _inflater.inflate(R.layout.dots, null); RecyclerView.LayoutParams _lp = new RecyclerView.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); _v.setLayoutParams(_lp); return new ViewHolder(_v); } @Override public void onBindViewHolder(ViewHolder _holder, final int _position) { View _view = _holder.itemView; final LinearLayout linear1 = _view.findViewById(R.id.linear1); RecyclerView.LayoutParams _lp = new RecyclerView.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT); _view.setLayoutParams(_lp); _rippleRoundStroke(linear1, "#FFFFFF", "#FFFFFF", 15, 0, "#FFFFFF"); if (position == _position) { _rippleRoundStroke(linear1, "#FFFFFF", "#FFFFFF", 15, 0, "#FFFFFF"); linear1.setAlpha((float)(1.0d)); } else { _rippleRoundStroke(linear1, "#FFFFFF", "#FFFFFF", 15, 0, "#FFFFFF"); linear1.setAlpha((float)(0.5d)); } } @Override public int getItemCount() { return _data.size(); } public class ViewHolder extends RecyclerView.ViewHolder { public ViewHolder(View v) { super(v); } } } @Deprecated public void showMessage(String _s) { Toast.makeText(getApplicationContext(), _s, Toast.LENGTH_SHORT).show(); } @Deprecated public int getLocationX(View _v) { int _location[] = new int[2]; _v.getLocationInWindow(_location); return _location[0]; } @Deprecated public int getLocationY(View _v) { int _location[] = new int[2]; _v.getLocationInWindow(_location); return _location[1]; } @Deprecated public int getRandom(int _min, int _max) { Random random = new Random(); return random.nextInt(_max - _min + 1) + _min; } @Deprecated public ArrayList getCheckedItemPositionsToArray(ListView _list) { ArrayList _result = new ArrayList(); SparseBooleanArray _arr = _list.getCheckedItemPositions(); for (int _iIdx = 0; _iIdx < _arr.size(); _iIdx++) { if (_arr.valueAt(_iIdx)) _result.add((double)_arr.keyAt(_iIdx)); } return _result; } @Deprecated public float getDip(int _input) { return TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, _input, getResources().getDisplayMetrics()); } @Deprecated public int getDisplayWidthPixels() { return getResources().getDisplayMetrics().widthPixels; } @Deprecated public int getDisplayHeightPixels() { return getResources().getDisplayMetrics().heightPixels; } }