FLIX VISION v2.8.2版本的 MD5 值为:4c8f04d6db90386313134c0796491235
以下内容为反编译后的 a.java 源代码,内容仅作参考
package flix.com.vision.activities.leanback.fragment;
import android.content.Intent;
import android.content.res.AssetManager;
import android.graphics.Typeface;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentContainerView;
import androidx.fragment.app.f0;
import com.squareup.picasso.Picasso;
import flix.com.vision.App;
import flix.com.vision.R;
import flix.com.vision.activities.MovieDetailActivity;
import flix.com.vision.activities.leanback.FilterActivityLeanBack;
import flix.com.vision.activities.leanback.MainActivityLeanback;
import flix.com.vision.activities.leanback.fragment.TVListFragmentMain;
import flix.com.vision.models.Movie;
import flix.com.vision.tv.Constant;
import me.grantland.widget.AutofitTextView;
public class a extends Fragment {
public final MainActivityLeanback Z;
public FragmentContainerView f11952a0;
public p2.a f11953b0;
public Typeface f11954c0;
public TVListFragmentMain f11955d0;
public TextView f11956e0;
public TextView f11957f0;
public TextView f11958g0;
public AutofitTextView f11959h0;
public ImageView f11960i0;
public final TVListFragmentMain.ContentTypeLB f11961j0;
public a() {
this.f11961j0 = TVListFragmentMain.ContentTypeLB.HOME;
}
public a(MainActivityLeanback mainActivityLeanback, TVListFragmentMain.ContentTypeLB contentTypeLB) {
this.f11961j0 = TVListFragmentMain.ContentTypeLB.HOME;
this.Z = mainActivityLeanback;
this.f11961j0 = contentTypeLB;
}
public void finished() {
MainActivityLeanback mainActivityLeanback = this.Z;
if (mainActivityLeanback != null) {
mainActivityLeanback.finished();
}
}
public int getSelectedPosition() {
TVListFragmentMain tVListFragmentMain = this.f11955d0;
if (tVListFragmentMain != null) {
return tVListFragmentMain.getSelectedPosition();
}
return -1;
}
@Override
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
return layoutInflater.inflate(R.layout.fragment_home, viewGroup, false);
}
public void onMovieClicked(Movie movie) {
App.getInstance().f11723h = false;
MainActivityLeanback mainActivityLeanback = this.Z;
if (mainActivityLeanback != null) {
mainActivityLeanback.openMovieintent(movie);
return;
}
Intent intent = new Intent(getActivity(), (Class<?>) MovieDetailActivity.class);
intent.putExtra("movie", movie);
intent.setFlags(268435456);
startActivity(intent);
}
public void onMovieSelected(Movie movie) {
this.f11959h0.setText(movie.getTitle());
this.f11957f0.setText(movie.getOverview());
if (movie.isSeries()) {
this.f11958g0.setText(" · Series");
} else {
this.f11958g0.setText(" · Film");
}
String year = movie.getYear();
String genres = movie.getGenres();
if (genres != null && genres.length() > 2) {
year = o.a.d(year, " · ", genres);
}
this.f11956e0.setText(year);
try {
Picasso.get().load("https://www.themoviedb.org/t/p/w780" + movie.f12381j).fit().centerCrop().into(this.f11960i0);
} catch (Exception e10) {
e10.printStackTrace();
}
}
public void onNetworkClicked(mb.a aVar) {
Intent intent = new Intent(getActivity(), (Class<?>) FilterActivityLeanBack.class);
intent.putExtra("network", aVar.f16524b);
intent.setFlags(268435456);
startActivity(intent);
}
public void onNetworkSelected(mb.a aVar) {
this.f11959h0.setText(aVar.f16526d.getTitle());
this.f11957f0.setText(aVar.f16526d.getOverview());
if (aVar.f16526d.isSeries()) {
this.f11958g0.setText(" · Series");
} else {
this.f11958g0.setText(" · Film");
}
String year = aVar.f16526d.getYear();
String genres = aVar.f16526d.getGenres();
if (genres != null && genres.length() > 2) {
year = o.a.d(year, " · ", genres);
}
this.f11956e0.setText(year);
try {
Picasso.get().load(aVar.f16526d.f12377b).fit().centerCrop().into(this.f11960i0);
} catch (Exception e10) {
e10.printStackTrace();
}
}
@Override
public void onViewCreated(View view, Bundle bundle) {
super.onViewCreated(view, bundle);
this.f11958g0 = (TextView) view.findViewById(R.id.type_text_view);
this.f11952a0 = (FragmentContainerView) view.findViewById(R.id.list_fragment);
view.findViewById(R.id.gradient_horizontal);
this.f11960i0 = (ImageView) view.findViewById(R.id.img_banner);
this.f11959h0 = (AutofitTextView) view.findViewById(R.id.title);
this.f11956e0 = (TextView) view.findViewById(R.id.subtitle);
this.f11957f0 = (TextView) view.findViewById(R.id.description);
this.f11953b0 = new p2.a();
AssetManager assets = getActivity().getAssets();
String str = Constant.f12431b;
this.f11954c0 = Typeface.createFromAsset(assets, "fonts/pproduct_sans_rregular.ttf");
this.f11953b0.applyFontToView(this.f11959h0, Typeface.createFromAsset(getActivity().getAssets(), "fonts/product_sans_bold.ttf"));
this.f11953b0.applyFontToView(this.f11956e0, this.f11954c0);
this.f11953b0.applyFontToView(this.f11957f0, this.f11954c0);
TVListFragmentMain tVListFragmentMain = new TVListFragmentMain(this.f11961j0);
this.f11955d0 = tVListFragmentMain;
tVListFragmentMain.setOnContentSelectedListener(this);
f0 beginTransaction = getChildFragmentManager().beginTransaction();
beginTransaction.add(R.id.list_fragment, this.f11955d0);
beginTransaction.commit();
}
public void reloadWatchedHistory() {
TVListFragmentMain tVListFragmentMain = this.f11955d0;
if (tVListFragmentMain != null) {
tVListFragmentMain.reloadWatchedHistory();
}
}
public void requestFocus1() {
FragmentContainerView fragmentContainerView = this.f11952a0;
if (fragmentContainerView == null) {
return;
}
fragmentContainerView.requestFocus();
}
public void setHome() {
}
public void setSelectedPosition(int i10) {
this.f11955d0.setSelectedPosition(i10, true);
}
}