家家有田 v1.2.8版本的 MD5 值为:62f44aac901441b9b72af508fbe86bf2
以下内容为反编译后的 FilmOrderListActivity.java 源代码,内容仅作参考
package com.dunshen.familyland.ui.film.activity;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.lifecycle.Lifecycle;
import androidx.viewpager2.widget.ViewPager2;
import com.dunshen.familyland.R;
import com.dunshen.familyland.databinding.ActivityFilmOrderListBinding;
import com.dunshen.familyland.ui.film.fragment.FilmOrderListFragment;
import com.dunshen.familyland.vm.FilmViewModel;
import com.google.android.material.tabs.TabLayout;
import com.google.android.material.tabs.TabLayoutMediator;
import com.ssm.comm.ext.ViewPager2ExtKt;
import com.ssm.comm.ui.base.BaseActivity;
import java.util.ArrayList;
import java.util.List;
import kotlin.Metadata;
import kotlin.collections.CollectionsKt;
import kotlin.jvm.internal.Intrinsics;
@Metadata(d1 = {"\u00000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010!\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u0002\n\u0000\u0018\u00002\u000e\u0012\u0004\u0012\u00020\u0002\u0012\u0004\u0012\u00020\u00030\u0001B\u0005¢\u0006\u0002\u0010\u0004J\b\u0010\n\u001a\u00020\u000bH\u0016J\b\u0010\f\u001a\u00020\rH\u0016R\u0014\u0010\u0005\u001a\b\u0012\u0004\u0012\u00020\u00070\u0006X\u0082\u000e¢\u0006\u0002\n\u0000R\u0014\u0010\b\u001a\b\u0012\u0004\u0012\u00020\t0\u0006X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006\u000e"}, d2 = {"Lcom/dunshen/familyland/ui/film/activity/FilmOrderListActivity;", "Lcom/ssm/comm/ui/base/BaseActivity;", "Lcom/dunshen/familyland/databinding/ActivityFilmOrderListBinding;", "Lcom/dunshen/familyland/vm/FilmViewModel;", "()V", "fragmentList", "", "Landroidx/fragment/app/Fragment;", "tables", "", "getLayoutId", "", "initView", "", "app_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
public final class FilmOrderListActivity extends BaseActivity<ActivityFilmOrderListBinding, FilmViewModel> {
private List<Fragment> fragmentList;
private final List<String> tables;
@Override
public int getLayoutId() {
return R.layout.activity_film_order_list;
}
public FilmOrderListActivity() {
super(new FilmViewModel());
this.fragmentList = new ArrayList();
this.tables = CollectionsKt.mutableListOf("全部", "待观影", "已观影");
}
@Override
public void initView() {
this.fragmentList.add(FilmOrderListFragment.Companion.newInstance(0));
this.fragmentList.add(FilmOrderListFragment.Companion.newInstance(888));
this.fragmentList.add(FilmOrderListFragment.Companion.newInstance(999));
ViewPager2 viewPager2 = getMDataBinding().vp;
Intrinsics.checkNotNullExpressionValue(viewPager2, "mDataBinding.vp");
FragmentManager supportFragmentManager = getSupportFragmentManager();
Intrinsics.checkNotNullExpressionValue(supportFragmentManager, "supportFragmentManager");
Lifecycle lifecycle = getLifecycle();
Intrinsics.checkNotNullExpressionValue(lifecycle, "this@FilmOrderListActivity.lifecycle");
List<Fragment> list = this.fragmentList;
ViewPager2ExtKt.bindFragment(viewPager2, supportFragmentManager, lifecycle, list, list.size());
new TabLayoutMediator(getMDataBinding().tabLayout, getMDataBinding().vp, new TabLayoutMediator.TabConfigurationStrategy() {
@Override
public final void onConfigureTab(TabLayout.Tab tab, int i) {
FilmOrderListActivity.initView$lambda$0(FilmOrderListActivity.this, tab, i);
}
}).attach();
}
public static final void initView$lambda$0(FilmOrderListActivity this$0, TabLayout.Tab tab, int i) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
Intrinsics.checkNotNullParameter(tab, "tab");
tab.setText(this$0.tables.get(i));
}
}