FLIX VISION v2.8.2版本的 MD5 值为:4d33b143293b36f23ce5a6a5834e6993
以下内容为反编译后的 a.java 源代码,内容仅作参考
package ob;
import android.content.res.AssetManager;
import android.graphics.Typeface;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.TextView;
import androidx.leanback.widget.f0;
import com.squareup.picasso.Picasso;
import flix.com.vision.App;
import flix.com.vision.R;
import flix.com.vision.models.Movie;
import flix.com.vision.tv.Constant;
import java.util.ArrayList;
import java.util.Iterator;
public final class a extends f0 {
public Typeface f16868a;
public p2.a f16869b;
public ProgressBar f16870c;
public final ArrayList<Movie> f16871d;
public a(ArrayList<Movie> arrayList) {
this.f16871d = arrayList;
}
@Override
public void onBindViewHolder(f0.a aVar, Object obj) {
Movie movie = (Movie) obj;
ImageView imageView = (ImageView) aVar.f2993a.findViewById(R.id.poster_image);
View view = aVar.f2993a;
TextView textView = (TextView) view.findViewById(R.id.episode_title_card);
this.f16870c = (ProgressBar) view.findViewById(R.id.progress_card);
if (movie.isSeries()) {
try {
int i10 = App.getInstance().f11732q.getInt(movie.getMovieId() + "watched_season_index", -1);
if (i10 > -1) {
int i11 = i10 + 1;
int i12 = App.getInstance().f11732q.getInt(movie.getMovieId() + "season" + i11 + "episode" + i11, 0) + 1;
String string = App.getInstance().f11732q.getString(movie.getMovieId() + "s" + i11 + "e" + i11 + "title", "");
if (string.length() > 1) {
textView.setText("S" + i11 + "E" + i12 + ": " + string);
} else {
textView.setText("S" + i11 + "E" + i12);
}
this.f16869b.applyFontToView(textView, this.f16868a);
textView.setVisibility(0);
}
} catch (Exception unused) {
}
} else {
textView.setVisibility(8);
if (App.getInstance().f11732q.getInt(movie.getMovieId() + "", -1) > 0) {
Iterator<Movie> it = this.f16871d.iterator();
while (true) {
if (!it.hasNext()) {
break;
}
if (it.next().getMovieId() == movie.getMovieId() && movie.getDuration() > 0) {
this.f16870c.setVisibility(0);
this.f16870c.setProgress((int) ((r10 * 100) / (movie.getDuration() * 60000)));
break;
}
}
}
}
String str = "https://www.themoviedb.org/t/p/w780" + movie.f12381j;
String str2 = movie.f12381j;
if (str2 == null || str2.length() <= 10) {
Picasso.get().load(R.drawable.ic_movie).fit().centerCrop().into(imageView);
return;
}
try {
Picasso.get().load(str).fit().centerCrop().error(R.drawable.ic_movie).into(imageView);
} catch (Exception e10) {
e10.printStackTrace();
}
}
@Override
public f0.a onCreateViewHolder(ViewGroup viewGroup) {
View d10 = a.b.d(viewGroup, R.layout.movie_item_view_card, viewGroup, false);
ViewGroup.LayoutParams layoutParams = d10.getLayoutParams();
layoutParams.width = cc.b.getWidthInPercent(viewGroup.getContext(), 28);
layoutParams.height = cc.b.getHeightInPercent(viewGroup.getContext(), 24);
AssetManager assets = viewGroup.getContext().getAssets();
String str = Constant.f12431b;
this.f16868a = Typeface.createFromAsset(assets, "fonts/product_sans_bold.ttf");
this.f16869b = new p2.a();
return new f0.a(d10);
}
@Override
public void onUnbindViewHolder(f0.a aVar) {
}
}