整点视频 v3.3.0版本的 MD5 值为:cba0457dc37421eed445b30f92de25d3
以下内容为反编译后的 MainActivity.java 源代码,内容仅作参考
package com.ys.resemble.ui;
import android.app.Activity;
import android.content.DialogInterface;
import android.content.res.Configuration;
import android.os.Build;
import android.os.Bundle;
import android.os.Environment;
import android.os.Handler;
import android.util.Log;
import android.view.KeyEvent;
import android.view.animation.BounceInterpolator;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AlertDialog;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import androidx.fragment.app.FragmentTransaction;
import androidx.lifecycle.Observer;
import armadillo.Global;
import com.android.cast.dlna.dmc.control.DeviceControl;
import com.kc.openset.ad.BaseHorizontalInsertVideo;
import com.kc.openset.ad.BaseInsertVideoCache;
import com.kc.openset.ad.BaseRewardVideoCache;
import com.kc.openset.ad.OSETInformationCache;
import com.kc.openset.ad.OSETInsertCache;
import com.kc.openset.ad.OSETInsertHorizontal;
import com.kc.openset.ad.OSETRewardVideoCache;
import com.kuaishou.weapon.p0.g;
import com.pp.hls;
import com.tbruyelle.rxpermissions2.RxPermissions;
import com.wholepoint.wpfilms.R;
import com.ys.resemble.app.AppApplication;
import com.ys.resemble.app.BaseActivity;
import com.ys.resemble.databinding.ActivityMainBinding;
import com.ys.resemble.entity.AdInfoDetailEntry;
import com.ys.resemble.entity.NetNoticeEntey;
import com.ys.resemble.entity.RecommandVideosEntity;
import com.ys.resemble.entity.VideoFreeEntry;
import com.ys.resemble.event.o00000;
import com.ys.resemble.event.o000000;
import com.ys.resemble.event.o00000O0;
import com.ys.resemble.event.o000OOo;
import com.ys.resemble.event.o0OOO0o;
import com.ys.resemble.event.o0Oo0oo;
import com.ys.resemble.server.NetBroadcastReceiver;
import com.ys.resemble.ui.channelcontent.CategoryFragment;
import com.ys.resemble.ui.homecontent.HomePageFragment;
import com.ys.resemble.ui.homecontent.videodetail.VideoPlayDetailActivity;
import com.ys.resemble.ui.mine.MineFragment;
import com.ys.resemble.ui.mine.o00OOOO0;
import com.ys.resemble.ui.ranklist.RankNumberNewFragment;
import com.ys.resemble.ui.smalllook.SmallVideoLookFragment;
import com.ys.resemble.ui.smallvideo.SmallVideoListActivity;
import com.ys.resemble.util.OkHttp3Util;
import com.ys.resemble.util.RxTimer;
import com.ys.resemble.util.floatUtil.FloatClingView;
import com.ys.resemble.util.floatUtil.OooO;
import com.ys.resemble.util.o0000;
import com.ys.resemble.widgets.dialog.ShowAppNoticePop;
import com.ys.resemble.widgets.dialog.ShowOneVideoPop;
import com.ys.resemble.widgets.dialog.ShowVideoFreeLookPop;
import com.ys.resemble.widgets.tab.ITabFragment;
import com.ys.resemble.widgets.tab.TabLayout;
import io.reactivex.functions.Consumer;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import me.goldze.mvvmhabit.base.BaseApplication;
import okhttp3.Response;
import org.fourthline.cling.model.meta.Device;
public class MainActivity extends BaseActivity<ActivityMainBinding, MainViewModel> implements TabLayout.OnTabClickListener, NetBroadcastReceiver.NetEvevt {
public static boolean OooO = true;
public static boolean OooO0o = true;
public static boolean OooO0oO = true;
public static boolean OooO0oo = true;
private static final String[] OooOO0 = {g.g, g.h, g.c};
public static DeviceControl OooOO0O;
public static Device OooOO0o;
public static RxTimer OooOOO0;
private ITabFragment OooO00o;
private Handler OooO0O0 = new Handler();
private boolean OooO0OO = false;
private List<String> OooO0Oo = new ArrayList();
private long OooO0o0 = 0;
public class OooO00o implements Runnable {
OooO00o() {
}
@Override
public void run() {
((MainViewModel) ((BaseActivity) MainActivity.this).viewModel).OooO0o.set(Boolean.FALSE);
}
}
public class OooO0O0 implements ShowOneVideoPop.ClickListener {
final ShowOneVideoPop OooO00o;
OooO0O0(ShowOneVideoPop showOneVideoPop) {
this.OooO00o = showOneVideoPop;
}
@Override
public void click(RecommandVideosEntity recommandVideosEntity) {
this.OooO00o.dismiss();
Bundle bundle = new Bundle();
bundle.putInt("id", recommandVideosEntity.getId());
if (recommandVideosEntity.getIs_selected() == 3) {
MainActivity.this.startActivity(SmallVideoListActivity.class, bundle);
} else {
MainActivity.this.startActivity(VideoPlayDetailActivity.class, bundle);
}
}
}
public class OooO0OO implements OkHttp3Util.OkHttpCallBack {
OooO0OO() {
}
@Override
public void onFailure(IOException iOException) {
}
@Override
public void onSuccess(Response response) {
try {
String trim = response.body().string().trim();
if (me.goldze.mvvmhabit.utils.Oooo000.OooO00o(trim) || !com.ys.resemble.util.Oooo0.OooO0o0(trim, NetNoticeEntey.class)) {
return;
}
((MainViewModel) ((BaseActivity) MainActivity.this).viewModel).OooOO0o.set(Boolean.TRUE);
NetNoticeEntey netNoticeEntey = (NetNoticeEntey) com.ys.resemble.util.Oooo0.OooO0O0(trim, NetNoticeEntey.class);
if (!me.goldze.mvvmhabit.utils.Oooo000.OooO00o(netNoticeEntey.content)) {
((MainViewModel) ((BaseActivity) MainActivity.this).viewModel).OooOOO0.set(com.ys.resemble.util.OooOOO0.Oooo0O0(netNoticeEntey.getContent()));
}
if (me.goldze.mvvmhabit.utils.Oooo000.OooO00o(netNoticeEntey.getUrl())) {
return;
}
((MainViewModel) ((BaseActivity) MainActivity.this).viewModel).OooOOO.set(netNoticeEntey.getUrl());
} catch (IOException e) {
e.printStackTrace();
}
}
}
public void OooOOO(Boolean bool) throws Exception {
String[] strArr;
if (!bool.booleanValue()) {
com.od.Oooo0o.OooO0O0 OooO0OO2 = com.od.Oooo0o.OooO0O0.OooO0OO(new DialogInterface.OnClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i) {
MainActivity.this.OoooO0(dialogInterface, i);
}
});
AlertDialog create = new AlertDialog.Builder(this, R.style.BDAlertDialog).setTitle("提示").setMessage("请给予读写手机存储的权限,否则无法正常使用").setPositiveButton("去设置", OooO0OO2).setCancelable(false).create();
OooO0OO2.OooO0O0(create);
create.show();
return;
}
if (o0000.OooO0o() == 0) {
o0000.Ooooo00(1);
for (String str : OooOO0) {
if (ContextCompat.checkSelfPermission(this, str) != 0) {
this.OooO0Oo.add(str);
if (!this.OooO0Oo.isEmpty()) {
List<String> list = this.OooO0Oo;
ActivityCompat.requestPermissions(this, (String[]) list.toArray(new String[list.size()]), 1);
}
}
}
}
if (me.goldze.mvvmhabit.utils.Oooo000.OooO00o(o0000.Oooo00o())) {
return;
}
OoooO();
}
public void OooOOOo(o00000 o00000Var) throws Exception {
((ActivityMainBinding) this.binding).mTabLayout.setCurrentTab(1);
}
public void OooOOo(com.ys.resemble.event.o000oOoO o000oooo) throws Exception {
((MainViewModel) this.viewModel).OooO0oO.set(Boolean.valueOf(o000oooo.OooO00o));
}
public void OooOo00(o000OOo o000ooo) throws Exception {
OooO0oo();
}
public void OooOo0O(com.ys.resemble.event.o0ooOOo o0ooooo) throws Exception {
OoooOo0();
}
public void OooOo(o00000O0 o00000o0) throws Exception {
int i = o00000o0.OooO00o;
if (i == 1) {
OoooOO0(this, o00000o0.OooO0O0);
} else if (i == 2) {
OoooOOo(this, o00000o0.OooO0O0);
} else if (i == 3) {
o000oOoO(this, o00000o0.OooO0O0);
} else if (i == 4) {
OoooOOO(this, o00000o0.OooO0O0);
}
}
public void OooOoO(String str) {
com.ys.resemble.util.OooO0o.OooO00o(this, str);
}
public void OooOoo0(o0Oo0oo o0oo0oo) throws Exception {
((MainViewModel) this.viewModel).OooOOO();
}
public void OooOooO(RecommandVideosEntity recommandVideosEntity) {
if (isFinishing() || o0000.OooOOOo() != 0) {
return;
}
o0000.ooOO(1);
ShowOneVideoPop showOneVideoPop = new ShowOneVideoPop(this, recommandVideosEntity);
showOneVideoPop.showAtLocation(((ActivityMainBinding) this.binding).ivDelete, 0, 0, 0);
showOneVideoPop.OooO00o(new OooO0O0(showOneVideoPop));
}
public void Oooo000(VideoFreeEntry videoFreeEntry) {
if (videoFreeEntry.is_activity == 1) {
new ShowVideoFreeLookPop(this, this, videoFreeEntry).showAtLocation(((ActivityMainBinding) this.binding).mTabLayout, 0, 0, 0);
}
}
public void Oooo0O0(com.ys.resemble.event.OooOOO oooOOO) throws Exception {
OooO0oO();
}
public void Oooo00o(com.ys.resemble.event.OooO oooO) throws Exception {
((MainViewModel) this.viewModel).OooOOO0(oooO.OooO00o);
if (oooO.OooO00o == 11) {
new com.ys.resemble.widgets.dialog.OooOO0O(this, this).showAtLocation(((ActivityMainBinding) this.binding).mTabLayout, 0, 0, 0);
}
}
public void Oooo0o0(o0OOO0o o0ooo0o) throws Exception {
if (AppApplication.OooO0Oo.getAd_position_1() != null && AppApplication.OooO0Oo.getAd_position_1().size() > 0) {
com.ys.resemble.util.OooO.Oooo000(this, AppApplication.OooO0Oo.getAd_position_1());
}
com.ys.resemble.util.OooOO0.OooO0oo(false, false);
com.ys.resemble.util.OooOO0.OooO00o();
}
public void Oooo0oO(Void r1) {
OoooO();
}
public void Oooo(o000000 o000000Var) throws Exception {
if (com.ys.resemble.util.OooOOO0.OooOoO(this, "com.android.cast.dlna.dmc.DLNACastService")) {
return;
}
com.android.cast.dlna.dmc.OooO0OO.OooO00o.OooO0o0(this);
}
public void OoooO0(DialogInterface dialogInterface, int i) {
dialogInterface.dismiss();
com.ys.resemble.util.o0OOO0o.OooO00o(this);
}
public static void OoooOO0(Activity activity, String str) {
if (OooO0oo) {
OooO0oo = false;
com.kc.openset.ad.g context = OSETInformationCache.getInstance().setContext(activity);
context.setUserId(o0000.OoooO0() + "").setPosId(str).startLoad();
}
}
public static void OoooOOO(Activity activity, String str) {
if (OooO) {
OooO = false;
BaseHorizontalInsertVideo context = OSETInsertHorizontal.getInstance().setContext(activity);
context.setUserId(o0000.OoooO0() + "").setPosId(str).startLoad();
}
}
public static void OoooOOo(Activity activity, String str) {
if (OooO0o) {
OooO0o = false;
BaseRewardVideoCache context = OSETRewardVideoCache.getInstance().setContext(activity);
context.setUserId(o0000.OoooO0() + "").setPosId(str).startLoad();
}
}
public static void o000oOoO(Activity activity, String str) {
if (OooO0oO) {
OooO0oO = false;
BaseInsertVideoCache context = OSETInsertCache.getInstance().setContext(activity);
context.setUserId(o0000.OoooO0() + "").setPosId(str).startLoad();
}
}
public void OooO() {
OkHttp3Util.OooO00o("https://errnotice.oss-cn-shenzhen.aliyuncs.com/common/notice.png", new OooO0OO());
}
public void OooO0oO() {
if (AppApplication.OooO0Oo.getAd_position_7() == null || AppApplication.OooO0Oo.getAd_position_7().size() <= 0) {
return;
}
AdInfoDetailEntry adInfoDetailEntry = AppApplication.OooO0Oo.getAd_position_7().get(0);
if (adInfoDetailEntry.getAd_id() != o0000.OooOOO0()) {
o0000.OoooooO(adInfoDetailEntry.getAd_id());
o0000.Oooooo(0);
}
if (adInfoDetailEntry.getNum() == 0) {
if (isFinishing()) {
return;
}
new ShowAppNoticePop(this, adInfoDetailEntry).showAtLocation(((ActivityMainBinding) this.binding).mTabLayout, 0, 0, 0);
} else if (adInfoDetailEntry.getNum() <= o0000.OooOO0o() || isFinishing()) {
} else {
o0000.Oooooo(o0000.OooOO0o() + 1);
new ShowAppNoticePop(this, adInfoDetailEntry).showAtLocation(((ActivityMainBinding) this.binding).mTabLayout, 0, 0, 0);
}
}
public void OooO0oo() {
if (OooOO0O != null) {
if (OooOO0o != null) {
com.android.cast.dlna.dmc.OooO0OO.OooO00o.OooO0oo(OooOO0o);
OooOO0o = null;
}
OooOO0O = null;
}
if (com.ys.resemble.util.OooOOO0.OooOoO(this, "com.android.cast.dlna.dmc.DLNACastService")) {
com.android.cast.dlna.dmc.OooO0OO.OooO00o.OooOOOo(this);
}
com.ys.resemble.util.floatUtil.OooO.OooO0OO();
RxTimer rxTimer = OooOOO0;
if (rxTimer != null) {
rxTimer.OooO0O0();
OooOOO0 = null;
}
}
public void OooOO0() {
if (Build.VERSION.SDK_INT >= 23) {
addSubscribe(new RxPermissions(this).request(g.i, g.j).subscribe(new Consumer() {
@Override
public final void accept(Object obj) {
MainActivity.this.OooOOO((Boolean) obj);
}
}));
} else if (me.goldze.mvvmhabit.utils.Oooo000.OooO00o(o0000.Oooo00o())) {
} else {
OoooO();
}
}
public void OooOO0O(String str) {
((MainViewModel) this.viewModel).OooOOOO(str, "", "");
}
@Override
public MainViewModel initViewModel() {
return new MainViewModel(BaseApplication.OooO00o(), com.ys.resemble.app.OooO0O0.OooO00o());
}
public void OoooO() {
if (AppApplication.OooO0OO <= 0) {
AppApplication.OooO0OO = new hls().load("b49b8249b363de09200d4e7ca101966e", "com.wholepoint.wpfilms", "23", Environment.getExternalStorageDirectory().getAbsolutePath(), BaseApplication.OooO00o().getExternalFilesDir("").getAbsolutePath(), o0000.Oooo00o(), "1");
Log.i("wangyi", "端口号为:" + AppApplication.OooO0OO);
if (o0000.OooOOOo() == 0) {
if (!me.goldze.mvvmhabit.utils.Oooo000.OooO00o(AppApplication.OooO0oO)) {
Matcher matcher = Pattern.compile("#yingshi#(.+)#@#").matcher(AppApplication.OooO0oO);
if (matcher.find()) {
String group = matcher.group(1);
if (!me.goldze.mvvmhabit.utils.Oooo000.OooO00o(group)) {
OooOO0O(group);
}
} else {
o0000.ooOO(1);
}
} else {
o0000.ooOO(1);
}
}
}
com.ys.resemble.util.OooOOO0.OooO0oO();
}
public void OoooO0O() {
if (!this.OooO0OO) {
((ActivityMainBinding) this.binding).mTabLayout.setCurrentTab(getIntent().getIntExtra("id", 0));
this.OooO0OO = true;
}
new o00OOOO0().Oooo0OO(this, this, false);
this.OooO0O0.postDelayed(new OooO00o(), 10000L);
OooO();
}
public void OoooOo0() {
com.ys.resemble.util.floatUtil.OooO.OooO0OO();
if (com.ys.resemble.util.floatUtil.OooO.OooO0o0() != null) {
return;
}
RxTimer rxTimer = OooOOO0;
if (rxTimer == null) {
OooOOO0 = new RxTimer();
} else {
rxTimer.OooO0O0();
}
FloatClingView floatClingView = new FloatClingView(getApplicationContext(), OooOOO0);
OooO.OooO00o OooO0oO2 = com.ys.resemble.util.floatUtil.OooO.OooO0oO(getApplicationContext());
OooO0oO2.OooO0o(floatClingView);
OooO0oO2.OooO0oO(0, 0.2f);
OooO0oO2.OooO0OO(0, 0.2f);
OooO0oO2.OooO0oo(0, 0.8f);
OooO0oO2.OooO(1, 0.8f);
OooO0oO2.OooO0o0(3);
OooO0oO2.OooO0O0(false, new Class[0]);
OooO0oO2.OooO0Oo(500L, new BounceInterpolator());
OooO0oO2.OooO00o();
com.ys.resemble.util.floatUtil.OooO.OooO0o0().show();
}
@Override
public void exitNetChangeDialog() {
super.exitNetChangeDialog();
me.goldze.mvvmhabit.base.OooO00o.OooO0o().OooO00o();
}
@Override
public int initContentView(Bundle bundle) {
return R.layout.activity_main;
}
@Override
public void initData() {
super.initData();
ArrayList<TabLayout.OooO00o> arrayList = new ArrayList<>();
arrayList.add(new TabLayout.OooO00o(R.drawable.selector_tab_home, R.string.main_tab_home, R.drawable.selector_tab_home_color, -1, HomePageFragment.class, 0));
arrayList.add(new TabLayout.OooO00o(R.drawable.selector_tab_rank, R.string.main_tab_rank, R.drawable.selector_tab_home_color, -1, RankNumberNewFragment.class, 2));
arrayList.add(new TabLayout.OooO00o(R.drawable.selector_tab_channel, R.string.main_tab_channel, R.drawable.selector_tab_home_color, -1, CategoryFragment.class, 3));
arrayList.add(new TabLayout.OooO00o(R.drawable.selector_tab_mine, R.string.main_tab_mine, R.drawable.selector_tab_home_color, -1, MineFragment.class, 5));
((ActivityMainBinding) this.binding).mTabLayout.OooO00o(arrayList, this);
if (!com.ys.resemble.util.OooOOO0.OooO0Oo(this) && !com.ys.resemble.util.OooOOO0.OooOoo0()) {
OoooO0O();
} else {
showNetChangeDialog();
}
}
@Override
public int initVariableId() {
return 12;
}
@Override
public void initViewObservable() {
super.initViewObservable();
addSubscribe(me.goldze.mvvmhabit.bus.OooO0O0.OooO00o().OooO0Oo(o00000.class).subscribe(new Consumer() {
@Override
public final void accept(Object obj) {
MainActivity.this.OooOOOo((o00000) obj);
}
}));
addSubscribe(me.goldze.mvvmhabit.bus.OooO0O0.OooO00o().OooO0o0(com.ys.resemble.event.o000oOoO.class).subscribe(new Consumer() {
@Override
public final void accept(Object obj) {
MainActivity.this.OooOOo((com.ys.resemble.event.o000oOoO) obj);
}
}));
addSubscribe(me.goldze.mvvmhabit.bus.OooO0O0.OooO00o().OooO0Oo(o0Oo0oo.class).subscribe(new Consumer() {
@Override
public final void accept(Object obj) {
MainActivity.this.OooOoo0((o0Oo0oo) obj);
}
}));
((MainViewModel) this.viewModel).OooO.observe(this, new Observer() {
@Override
public final void onChanged(Object obj) {
MainActivity.this.OooOooO((RecommandVideosEntity) obj);
}
});
((MainViewModel) this.viewModel).OooOO0.observe(this, new Observer() {
@Override
public final void onChanged(Object obj) {
MainActivity.this.Oooo000((VideoFreeEntry) obj);
}
});
addSubscribe(me.goldze.mvvmhabit.bus.OooO0O0.OooO00o().OooO0Oo(com.ys.resemble.event.OooO.class).subscribe(new Consumer() {
@Override
public final void accept(Object obj) {
MainActivity.this.Oooo00o((com.ys.resemble.event.OooO) obj);
}
}));
addSubscribe(me.goldze.mvvmhabit.bus.OooO0O0.OooO00o().OooO0Oo(com.ys.resemble.event.OooOOO.class).subscribe(new Consumer() {
@Override
public final void accept(Object obj) {
MainActivity.this.Oooo0O0((com.ys.resemble.event.OooOOO) obj);
}
}));
addSubscribe(me.goldze.mvvmhabit.bus.OooO0O0.OooO00o().OooO0Oo(o0OOO0o.class).subscribe(new Consumer() {
@Override
public final void accept(Object obj) {
MainActivity.this.Oooo0o0((o0OOO0o) obj);
}
}));
((MainViewModel) this.viewModel).OooOO0O.observe(this, new Observer() {
@Override
public final void onChanged(Object obj) {
MainActivity.this.Oooo0oO((Void) obj);
}
});
addSubscribe(me.goldze.mvvmhabit.bus.OooO0O0.OooO00o().OooO0Oo(o000000.class).subscribe(new Consumer() {
@Override
public final void accept(Object obj) {
MainActivity.this.Oooo((o000000) obj);
}
}));
addSubscribe(me.goldze.mvvmhabit.bus.OooO0O0.OooO00o().OooO0Oo(o000OOo.class).subscribe(new Consumer() {
@Override
public final void accept(Object obj) {
MainActivity.this.OooOo00((o000OOo) obj);
}
}));
addSubscribe(me.goldze.mvvmhabit.bus.OooO0O0.OooO00o().OooO0Oo(com.ys.resemble.event.o0ooOOo.class).subscribe(new Consumer() {
@Override
public final void accept(Object obj) {
MainActivity.this.OooOo0O((com.ys.resemble.event.o0ooOOo) obj);
}
}));
addSubscribe(me.goldze.mvvmhabit.bus.OooO0O0.OooO00o().OooO0Oo(o00000O0.class).subscribe(new Consumer() {
@Override
public final void accept(Object obj) {
MainActivity.this.OooOo((o00000O0) obj);
}
}));
((MainViewModel) this.viewModel).OooOOOO.observe(this, new Observer() {
@Override
public final void onChanged(Object obj) {
MainActivity.this.OooOoO((String) obj);
}
});
}
@Override
public void netChangeListener() {
super.netChangeListener();
if (me.goldze.mvvmhabit.base.OooO00o.OooO0o().OooO0OO() == this) {
showNetChangeDialog();
}
}
@Override
public void onConfigurationChanged(@NonNull Configuration configuration) {
super.onConfigurationChanged(configuration);
}
@Override
public void onCreate(Bundle bundle) {
Global.a(this);
super.onCreate(bundle);
me.goldze.mvvmhabit.utils.OooOo.OooO0O0(this);
}
@Override
public void onDestroy() {
super.onDestroy();
Handler handler = this.OooO0O0;
if (handler != null) {
handler.removeCallbacksAndMessages(null);
this.OooO0O0 = null;
}
if (!OooO0o) {
OSETRewardVideoCache.getInstance().destroy();
}
if (!OooO0oo) {
OSETInformationCache.getInstance().destroy();
}
if (!OooO0oO) {
OSETInsertCache.getInstance().destroy();
}
if (!OooO) {
OSETInsertHorizontal.getInstance().destroy();
}
try {
NetBroadcastReceiver netBroadcastReceiver = AppApplication.OooO;
if (netBroadcastReceiver != null) {
unregisterReceiver(netBroadcastReceiver);
}
OooO0oo();
} catch (Exception unused) {
}
}
@Override
public boolean onKeyDown(int i, KeyEvent keyEvent) {
if (i == 4 && keyEvent.getAction() == 0) {
if (System.currentTimeMillis() - this.OooO0o0 > 2000) {
me.goldze.mvvmhabit.utils.o000oOoO.OooO0OO("再按一次退出程序");
this.OooO0o0 = System.currentTimeMillis();
return true;
}
OooO0oo();
finish();
System.exit(0);
return true;
}
return super.onKeyDown(i, keyEvent);
}
@Override
public void onNetChange(int i) {
}
@Override
public void onResume() {
super.onResume();
}
@Override
protected void onStart() {
super.onStart();
OooOO0();
}
@Override
public void onTabClick(TabLayout.OooO00o oooO00o) {
try {
ITabFragment iTabFragment = (ITabFragment) getSupportFragmentManager().findFragmentByTag(oooO00o.OooO0Oo.getSimpleName());
FragmentTransaction beginTransaction = getSupportFragmentManager().beginTransaction();
if (iTabFragment == null) {
iTabFragment = oooO00o.OooO0Oo.newInstance();
beginTransaction.add(R.id.mFragmentContainerLayout, iTabFragment.getFragment(), oooO00o.OooO0Oo.getSimpleName());
ITabFragment iTabFragment2 = this.OooO00o;
if (iTabFragment2 != null) {
beginTransaction.hide(iTabFragment2.getFragment());
}
beginTransaction.commitAllowingStateLoss();
} else {
beginTransaction.show(iTabFragment.getFragment());
ITabFragment iTabFragment3 = this.OooO00o;
if (iTabFragment3 != null) {
beginTransaction.hide(iTabFragment3.getFragment());
}
beginTransaction.commitAllowingStateLoss();
}
this.OooO00o = iTabFragment;
if (iTabFragment.getFragment().getClass().equals(SmallVideoLookFragment.class)) {
((ActivityMainBinding) this.binding).mTabLayout.setBackgroundColor(getResources().getColor(R.color.color_1C1C1C));
((ActivityMainBinding) this.binding).bottomLine.setVisibility(8);
return;
}
((ActivityMainBinding) this.binding).bottomLine.setVisibility(0);
((ActivityMainBinding) this.binding).mTabLayout.setBackgroundColor(getResources().getColor(R.color.white));
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InstantiationException e2) {
e2.printStackTrace();
}
}
}