FLIX VISION v2.8.2版本的 MD5 值为:4d33b143293b36f23ce5a6a5834e6993
以下内容为反编译后的 x.java 源代码,内容仅作参考
package ba;
import android.app.Activity;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.TextView;
import androidx.recyclerview.widget.RecyclerView;
import com.squareup.picasso.Picasso;
import flix.com.vision.App;
import flix.com.vision.R;
import flix.com.vision.models.Movie;
import java.util.ArrayList;
import v9.z;
public final class x extends RecyclerView.Adapter<a> {
public final hb.i f4534d;
public final ArrayList<Movie> f4535e;
public class a extends RecyclerView.z {
public Movie f4536u;
public final View f4537v;
public final TextView f4538w;
public final ImageView f4539x;
public final ProgressBar f4540y;
public a(x xVar, View view) {
super(view);
this.f4537v = view;
this.f4538w = (TextView) view.findViewById(R.id.episode_title_card);
this.f4539x = (ImageView) view.findViewById(R.id.poster_image);
this.f4540y = (ProgressBar) view.findViewById(R.id.progress_watching_main);
}
}
public x(Context context, ArrayList<Movie> arrayList, Activity activity, hb.i iVar) {
this.f4535e = arrayList;
this.f4534d = iVar;
}
@Override
public int getItemCount() {
return this.f4535e.size();
}
@Override
public void onBindViewHolder(a aVar, int i10) {
aVar.f4536u = this.f4535e.get(i10);
ProgressBar progressBar = aVar.f4540y;
String str = aVar.f4536u.getMovieId() + "";
String str2 = aVar.f4536u.f12381j;
if (str2 != null && str2.length() > 1) {
try {
try {
Picasso.get().load("https://www.themoviedb.org/t/p/w300" + aVar.f4536u.f12381j).fit().centerCrop().into(aVar.f4539x);
} catch (OutOfMemoryError e10) {
e10.printStackTrace();
}
} catch (Exception e11) {
e11.printStackTrace();
}
}
if (App.getInstance().f11732q.getInt(str, -1) > 0) {
try {
if (aVar.f4536u.getDuration() > 0) {
progressBar.setVisibility(0);
progressBar.setProgress((int) ((r0 * 100) / (aVar.f4536u.getDuration() * 60000)));
}
} catch (Exception unused) {
}
}
z zVar = new z(15, this, aVar);
View view = aVar.f4537v;
view.setOnClickListener(zVar);
view.setOnFocusChangeListener(new v9.b(4));
Movie movie = aVar.f4536u;
boolean isSeries = movie.isSeries();
TextView textView = aVar.f4538w;
if (!isSeries) {
textView.setText(movie.getTitle());
return;
}
try {
int i11 = App.getInstance().f11732q.getInt(movie.getMovieId() + "watched_season_index", -1);
if (i11 > -1) {
int i12 = i11 + 1;
int i13 = App.getInstance().f11732q.getInt(movie.getMovieId() + "season" + i12 + "episode" + i12, 0) + 1;
String string = App.getInstance().f11732q.getString(movie.getMovieId() + "s" + i12 + "e" + i12 + "title", "");
if (string.length() > 1) {
textView.setText("S" + i12 + "E" + i13 + ": " + string);
} else {
textView.setText("S" + i12 + "E" + i13);
}
}
} catch (Exception unused2) {
}
}
@Override
public a onCreateViewHolder(ViewGroup viewGroup, int i10) {
return new a(this, a.b.d(viewGroup, R.layout.movie_item_view_watching, viewGroup, false));
}
}