TopTV v3.0.1版本的 MD5 值为:0fc1b9ce94885bc92edd11a6ee3e5932
以下内容为反编译后的 MultiUserActivity.java 源代码,内容仅作参考
package com.toptvone.toptviptvbox.view.activity;
import a.b.k.c;
import android.animation.ObjectAnimator;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import android.view.View;
import android.view.Window;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.Toast;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import com.toptvone.toptviptvbox.R;
import com.toptvone.toptviptvbox.model.MultiUserDBModel;
import com.toptvone.toptviptvbox.model.database.MultiUserDBHandler;
import com.toptvone.toptviptvbox.model.database.SharepreferenceDBHandler;
import com.toptvone.toptviptvbox.view.adapter.MultiUserAdapter;
import java.util.ArrayList;
import me.zhanghai.android.materialprogressbar.BuildConfig;
public class MultiUserActivity extends c {
@BindView
public ImageView addmore;
public Context f25335d;
public Handler f25336e;
@BindView
public TextView emptyView;
public MultiUserDBHandler f25337f;
@BindView
public FrameLayout frameLayout;
public SharedPreferences f25338g;
public Boolean f25339h;
public MultiUserAdapter f25340i;
@BindView
public ImageView ivBTUP;
public GridLayoutManager f25341j;
public Intent f25342k;
@BindView
public LinearLayout ll_add_new_user;
@BindView
public LinearLayout ll_add_user;
@BindView
public LinearLayout ll_termsandservices;
@BindView
public RecyclerView myRecyclerView;
public c.k.a.i.d.a.a f25345n;
@BindView
public ProgressBar pbLoader;
@BindView
public TextView tvNoRecordFound;
@BindView
public TextView tvNoStream;
@BindView
public TextView tv_link2;
@BindView
public TextView tv_list_options;
public boolean f25343l = false;
public String f25344m = "false";
public class a implements View.OnClickListener {
public a() {
}
@Override
public void onClick(View view) {
try {
Intent intent = new Intent("android.intent.action.VIEW");
intent.setData(Uri.parse("https://www.iptvsmarters.com/terms-and-conditions/"));
MultiUserActivity.this.startActivity(intent);
} catch (Exception unused) {
Toast.makeText(MultiUserActivity.this.getApplicationContext(), "Your Device Not Supported !!", 1).show();
}
}
}
public class b implements View.OnFocusChangeListener {
public final View f25347b;
public b(View view) {
this.f25347b = view;
}
public final void a(boolean z) {
if (z) {
ObjectAnimator ofFloat = ObjectAnimator.ofFloat(this.f25347b, "alpha", z ? 0.6f : 0.5f);
ofFloat.setDuration(150L);
ofFloat.start();
}
}
public final void b(float f2) {
ObjectAnimator ofFloat = ObjectAnimator.ofFloat(this.f25347b, "scaleX", f2);
ofFloat.setDuration(150L);
ofFloat.start();
}
public final void c(float f2) {
ObjectAnimator ofFloat = ObjectAnimator.ofFloat(this.f25347b, "scaleY", f2);
ofFloat.setDuration(150L);
ofFloat.start();
}
@Override
@SuppressLint({"ResourceType"})
public void onFocusChange(View view, boolean z) {
float f2;
if (!z) {
if (z || !this.f25347b.getTag().equals("7")) {
return;
}
f2 = z ? 2.0f : 1.0f;
b(f2);
c(f2);
a(z);
return;
}
Log.e("id is", BuildConfig.FLAVOR + this.f25347b.getTag());
if (this.f25347b.getTag().equals("7")) {
f2 = z ? 2.0f : 1.0f;
b(f2);
c(f2);
}
}
}
@Override
public void onBackPressed() {
super.onBackPressed();
}
@Override
public void onCreate(Bundle bundle) {
this.f25335d = this;
super.onCreate(bundle);
requestWindowFeature(1);
if (getIntent().getBooleanExtra("EXIT", false)) {
finish();
}
c.k.a.i.d.a.a aVar = new c.k.a.i.d.a.a(this.f25335d);
this.f25345n = aVar;
setContentView(aVar.z().equals(c.k.a.g.n.a.s0) ? R.layout.activity_multi_user_tv : R.layout.activity_multi_user);
ButterKnife.a(this);
if (c.k.a.g.n.a.M.booleanValue()) {
this.ll_termsandservices.setVisibility(0);
} else {
this.ll_termsandservices.setVisibility(8);
}
Intent intent = getIntent();
this.f25342k = intent;
String stringExtra = intent.getStringExtra("from_login");
this.f25344m = stringExtra;
if (stringExtra == null) {
this.f25344m = "false";
}
this.f25344m.equals("true");
getWindow().setFlags(1024, 1024);
s0();
this.tv_link2.setOnClickListener(new a());
getSharedPreferences("Accept_clicked", 0).getString("Accept_clicked", BuildConfig.FLAVOR);
SharedPreferences sharedPreferences = getSharedPreferences("sharedprefremberme", 0);
this.f25338g = sharedPreferences;
this.f25339h = Boolean.valueOf(sharedPreferences.getBoolean("savelogin", false));
ImageView imageView = this.addmore;
imageView.setOnFocusChangeListener(new b(imageView));
this.f25337f = new MultiUserDBHandler(this.f25335d);
t0();
}
@Override
public void onResume() {
super.onResume();
overridePendingTransition(R.anim.fade_out, R.anim.fade_in);
}
@OnClick
public void onViewClicked(View view) {
int id = view.getId();
if (id == R.id.ll_add_new_user || id == R.id.ll_add_user) {
startActivity(c.k.a.g.n.a.f17277e.booleanValue() ? new Intent(this, RoutingActivity.class) : new Intent(this, LoginActivity.class));
overridePendingTransition(R.anim.fade_out, R.anim.fade_in);
c.k.a.g.n.a.K = Boolean.TRUE;
finish();
}
}
public final void s0() {
Window window = getWindow();
int i2 = Build.VERSION.SDK_INT;
if (i2 >= 19) {
window.clearFlags(67108864);
}
if (i2 >= 21) {
window.addFlags(Integer.MIN_VALUE);
}
if (i2 >= 21) {
window.setStatusBarColor(a.i.i.b.d(this, R.color.colorPrimaryDark));
}
}
public void t0() {
Handler handler = new Handler();
this.f25336e = handler;
handler.removeCallbacksAndMessages(null);
ProgressBar progressBar = this.pbLoader;
if (progressBar != null) {
progressBar.setVisibility(0);
}
u0();
ProgressBar progressBar2 = this.pbLoader;
if (progressBar2 != null) {
progressBar2.setVisibility(8);
}
}
public void u0() {
ArrayList<MultiUserDBModel> p = this.f25337f.p();
MultiUserDBModel multiUserDBModel = (!SharepreferenceDBHandler.f(this.f25335d).equals("m3u") || p.size() <= 0) ? null : p.get(0);
ArrayList<MultiUserDBModel> o2 = this.f25337f.o();
if (SharepreferenceDBHandler.f(this.f25335d).equals("api") && o2.size() > 0) {
multiUserDBModel = o2.get(0);
}
MultiUserDBModel multiUserDBModel2 = multiUserDBModel;
p.addAll(o2);
if (p.size() > 0) {
this.tv_list_options.setVisibility(8);
this.f25340i = new MultiUserAdapter(this, p, this.f25335d, this.ll_add_new_user, this.tv_list_options, this.f25344m, multiUserDBModel2, this.ll_add_user);
GridLayoutManager gridLayoutManager = new GridLayoutManager(this, 2);
this.f25341j = gridLayoutManager;
this.myRecyclerView.setLayoutManager(gridLayoutManager);
this.myRecyclerView.setItemAnimator(new a.y.e.c());
this.myRecyclerView.setAdapter(this.f25340i);
} else {
this.ll_add_new_user.setVisibility(0);
this.ll_add_user.setNextFocusDownId(R.id.ll_add_new_user);
}
c.k.a.g.n.a.L = Boolean.FALSE;
}
}