TopTV v3.0.1版本的 MD5 值为:0fc1b9ce94885bc92edd11a6ee3e5932
以下内容为反编译后的 PersonImagesAdapter.java 源代码,内容仅作参考
package com.toptvone.toptviptvbox.view.adapter;
import android.animation.ObjectAnimator;
import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;
import c.j.b.e;
import c.j.b.t;
import com.toptvone.toptviptvbox.R;
import com.toptvone.toptviptvbox.model.pojo.TMDBPersonProfilePojo;
import java.util.List;
import me.zhanghai.android.materialprogressbar.BuildConfig;
import org.jetbrains.annotations.NotNull;
public class PersonImagesAdapter extends RecyclerView.h<MyViewHolder> {
public Context f27142e;
public List<TMDBPersonProfilePojo> f27143f;
public static class MyViewHolder extends RecyclerView.e0 {
@BindView
public RelativeLayout Movie;
@BindView
public ImageView MovieImage;
public MyViewHolder(View view) {
super(view);
ButterKnife.b(this, view);
L(false);
}
}
public class MyViewHolder_ViewBinding implements Unbinder {
public MyViewHolder f27144b;
public MyViewHolder_ViewBinding(MyViewHolder myViewHolder, View view) {
this.f27144b = myViewHolder;
myViewHolder.Movie = (RelativeLayout) b.c.c.c(view, R.id.rl_movie, "field 'Movie'", RelativeLayout.class);
myViewHolder.MovieImage = (ImageView) b.c.c.c(view, R.id.iv_movie_image, "field 'MovieImage'", ImageView.class);
}
@Override
public void a() {
MyViewHolder myViewHolder = this.f27144b;
if (myViewHolder == null) {
throw new IllegalStateException("Bindings already cleared.");
}
this.f27144b = null;
myViewHolder.Movie = null;
myViewHolder.MovieImage = null;
}
}
public class a implements e {
public final MyViewHolder f27145a;
public a(MyViewHolder myViewHolder) {
this.f27145a = myViewHolder;
}
@Override
public void a() {
ImageView imageView;
Drawable f2;
if (Build.VERSION.SDK_INT >= 21) {
imageView = this.f27145a.MovieImage;
f2 = PersonImagesAdapter.this.f27142e.getResources().getDrawable(R.drawable.rounded_edge_3, null);
} else {
imageView = this.f27145a.MovieImage;
f2 = a.i.i.b.f(PersonImagesAdapter.this.f27142e, R.drawable.rounded_edge_3);
}
imageView.setImageDrawable(f2);
}
@Override
public void onSuccess() {
}
}
public class b implements View.OnClickListener {
public b() {
}
@Override
public void onClick(View view) {
}
}
public class c implements View.OnFocusChangeListener {
public final View f27148b;
public c(View view) {
this.f27148b = view;
}
public final void a(boolean z) {
if (z) {
ObjectAnimator ofFloat = ObjectAnimator.ofFloat(this.f27148b, "alpha", z ? 0.6f : 0.5f);
ofFloat.setDuration(150L);
ofFloat.start();
}
}
public final void b(float f2) {
ObjectAnimator ofFloat = ObjectAnimator.ofFloat(this.f27148b, "scaleX", f2);
ofFloat.setDuration(150L);
ofFloat.start();
}
public final void c(float f2) {
ObjectAnimator ofFloat = ObjectAnimator.ofFloat(this.f27148b, "scaleY", f2);
ofFloat.setDuration(150L);
ofFloat.start();
}
@Override
@SuppressLint({"ResourceType"})
public void onFocusChange(View view, boolean z) {
float f2;
View view2;
int i2;
if (!z) {
if (z) {
return;
}
f2 = z ? 1.09f : 1.0f;
a(z);
if ((this.f27148b.getTag() == null || !this.f27148b.getTag().equals("1")) && (this.f27148b.getTag() == null || !this.f27148b.getTag().equals("2"))) {
return;
}
b(f2);
c(f2);
this.f27148b.setBackgroundResource(R.drawable.black_button_dark);
return;
}
f2 = z ? 1.1f : 1.0f;
Log.e("id is", BuildConfig.FLAVOR + this.f27148b.getTag());
if (this.f27148b.getTag() != null && this.f27148b.getTag().equals("1")) {
b(f2);
view2 = this.f27148b;
i2 = R.drawable.back_btn_effect;
} else if (this.f27148b.getTag() == null || !this.f27148b.getTag().equals("2")) {
return;
} else {
b(f2);
view2 = this.f27148b;
i2 = R.drawable.logout_btn_effect;
}
view2.setBackgroundResource(i2);
}
}
public PersonImagesAdapter(List<TMDBPersonProfilePojo> list, Context context, boolean z) {
this.f27143f = list;
this.f27142e = context;
}
@Override
public void C(MyViewHolder myViewHolder, @SuppressLint({"RecyclerView"}) int i2) {
ImageView imageView;
Drawable f2;
if (this.f27142e != null) {
String str = "https://image.tmdb.org/t/p/w500/" + this.f27143f.get(i2).a();
myViewHolder.MovieImage.setImageDrawable(null);
if (str.equals(BuildConfig.FLAVOR)) {
if (Build.VERSION.SDK_INT >= 21) {
imageView = myViewHolder.MovieImage;
f2 = this.f27142e.getResources().getDrawable(R.drawable.rounded_edge_3, null);
} else {
imageView = myViewHolder.MovieImage;
f2 = a.i.i.b.f(this.f27142e, R.drawable.rounded_edge_3);
}
imageView.setImageDrawable(f2);
} else {
t.q(this.f27142e).l(str).h(myViewHolder.MovieImage, new a(myViewHolder));
}
myViewHolder.MovieImage.setOnClickListener(new b());
RelativeLayout relativeLayout = myViewHolder.Movie;
relativeLayout.setOnFocusChangeListener(new c(relativeLayout));
}
}
@Override
@NotNull
public MyViewHolder F(ViewGroup viewGroup, int i2) {
return new MyViewHolder(LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.cast_grid_layout, viewGroup, false));
}
@Override
public int n() {
return this.f27143f.size();
}
}