正在查看: TruCred v1.1.3 应用的 MineFragment.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: TruCred v1.1.3 应用的 MineFragment.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.veloz.app.ui.home.fragment;
import android.app.Dialog;
import android.content.Intent;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.GradientDrawable;
import android.graphics.drawable.LayerDrawable;
import android.graphics.drawable.ScaleDrawable;
import android.location.Address;
import android.net.Uri;
import android.os.Build;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.core.content.ContextCompat;
import androidx.lifecycle.Observer;
import com.blankj.utilcode.util.AppUtils;
import com.blankj.utilcode.util.DeviceUtils;
import com.blankj.utilcode.util.IntentUtils;
import com.blankj.utilcode.util.LanguageUtils;
import com.blankj.utilcode.util.LogUtils;
import com.blankj.utilcode.util.PhoneUtils;
import com.blankj.utilcode.util.SDCardUtils;
import com.blankj.utilcode.util.StringUtils;
import com.blankj.utilcode.util.ThreadUtils;
import com.jeremyliao.liveeventbus.LiveEventBus;
import com.lzy.okgo.model.Progress;
import com.veloz.app.R$color;
import com.veloz.app.R$drawable;
import com.veloz.app.R$id;
import com.veloz.app.R$layout;
import com.veloz.app.R$style;
import com.veloz.app.VelozApplication;
import com.veloz.app.base.BaseFragment;
import com.veloz.app.cache.LocationCache;
import com.veloz.app.cache.LoginInfoCache;
import com.veloz.app.constant.Constant;
import com.veloz.app.databinding.FragmentMineBinding;
import com.veloz.app.dialog.LogoutConfirmDialog;
import com.veloz.app.dialog.ModifyNickDialog;
import com.veloz.app.dialog.ModifyNickSuccessDialog;
import com.veloz.app.dialog.MyBottomSheetDialog;
import com.veloz.app.entity.AppServiceInfo;
import com.veloz.app.entity.AppUserInfo;
import com.veloz.app.entity.LocationEntity;
import com.veloz.app.entity.LogOutBean;
import com.veloz.app.entity.LoginInfo;
import com.veloz.app.entity.PageInfo;
import com.veloz.app.entity.RequestHeader;
import com.veloz.app.my.MyFragment;
import com.veloz.app.ui.home.fragment.MineFragment;
import com.veloz.app.ui.login.LoginActivity;
import com.veloz.app.ui.mine.MessageCenterActivity;
import com.veloz.app.ui.mine.PersonalCenterActivity;
import com.veloz.app.ui.web.CommonWebViewActivity;
import com.veloz.app.utils.Constants;
import com.veloz.app.utils.GeoCoderHelper;
import com.veloz.app.utils.H5TestUtil;
import com.veloz.app.utils.MyDeviceInfoUtils;
import com.veloz.app.utils.SensorsHelper;
import com.veloz.app.utils.StaticC;
import com.veloz.app.utils.XToastUtils;
public class MineFragment extends MyFragment<FragmentMineBinding, MineViewModel> {
public static final int MODIFY_TYPE_NORMAL = 0;
public static final int MODIFY_TYPE_TASK = 1;
private static MineFragment fragment;
private MyBottomSheetDialog contactServiceBottomDialog;
private LogoutConfirmDialog logoutConfirmDialog;
private AppServiceInfo mAppServiceInfo;
private String memberUrl;
private ModifyNickDialog modifyNickDialog;
private ModifyNickSuccessDialog modifyNickSuccessDialog;
public static MineFragment getInstance() {
if (fragment == null) {
fragment = new MineFragment();
}
return fragment;
}
public void goMemberUrlWebActivity() {
if (TextUtils.isEmpty(this.memberUrl)) {
return;
}
startActivity(CommonWebViewActivity.class).with(Progress.URL, this.memberUrl).go();
}
private void initH5Test() {
((FragmentMineBinding) this.bind).f849p.setVisibility(0);
((FragmentMineBinding) this.bind).f849p.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
H5TestUtil.a(MineFragment.this.getContext(), new H5TestUtil.onConfirmListener() {
@Override
public void a(String str) {
MineFragment.this.startActivity(CommonWebViewActivity.class).with(Progress.URL, str).go();
}
});
}
});
}
private void initListener() {
((FragmentMineBinding) this.bind).c.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
MineFragment.this.lambda$initListener$0(view);
}
});
((FragmentMineBinding) this.bind).g.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
MineFragment.this.lambda$initListener$1(view);
}
});
((FragmentMineBinding) this.bind).e.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
MineFragment.this.lambda$initListener$2(view);
}
});
((FragmentMineBinding) this.bind).f.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
MineFragment.this.lambda$initListener$3(view);
}
});
((FragmentMineBinding) this.bind).i.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
MineFragment.this.lambda$initListener$4(view);
}
});
((FragmentMineBinding) this.bind).f850q.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
MineFragment.this.lambda$initListener$5(view);
}
});
((FragmentMineBinding) this.bind).f851r.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
MineFragment.this.lambda$initListener$6(view);
}
});
((FragmentMineBinding) this.bind).f848o.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
MineFragment.this.lambda$initListener$7(view);
}
});
((FragmentMineBinding) this.bind).f852s.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
MineFragment.this.lambda$initListener$8(view);
}
});
((FragmentMineBinding) this.bind).f853t.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
MineFragment.this.lambda$initListener$9(view);
}
});
((FragmentMineBinding) this.bind).b.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
MineFragment.this.lambda$initListener$10(view);
}
});
((FragmentMineBinding) this.bind).f856w.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
MineFragment.this.lambda$initListener$11(view);
}
});
((FragmentMineBinding) this.bind).f843j.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
MineFragment.this.lambda$initListener$12(view);
}
});
LiveEventBus.get("openEditor").observe(this, new Observer() {
public final void onChanged(Object obj) {
MineFragment.this.lambda$initListener$13(obj);
}
});
}
public void lambda$initListener$0(View view) {
if (LoginInfoCache.c() != null) {
showEditNickNameDialog(0);
} else {
startActivity(LoginActivity.class).go();
}
}
public void lambda$initListener$1(View view) {
SensorsHelper.c("personalCenter", "Service");
if (this.mAppServiceInfo != null) {
showContactServiceDialog();
} else {
((MineViewModel) this.vm).d();
}
}
public void lambda$initListener$10(View view) {
SensorsHelper.c("personalCenter", "SafeCenter");
if (LoginInfoCache.c() != null) {
startActivity(PersonalCenterActivity.class).go();
} else {
startActivity(LoginActivity.class).go();
}
}
public void lambda$initListener$11(View view) {
SensorsHelper.c("personalCenter", "Logout");
showLogoutConfirmDialog();
}
public void lambda$initListener$12(View view) {
goMemberUrlWebActivity();
}
public void lambda$initListener$13(Object obj) {
showEditNickNameDialog(1);
}
public void lambda$initListener$2(View view) {
if (LoginInfoCache.c() == null) {
startActivity(LoginActivity.class).go();
} else {
SensorsHelper.c("personalCenter", "MessageCenter");
startActivity(MessageCenterActivity.class).go();
}
}
public void lambda$initListener$3(View view) {
if (LoginInfoCache.c() == null) {
startActivity(LoginActivity.class).go();
return;
}
startActivity(CommonWebViewActivity.class).with(Progress.URL, Constants.e + Constants.h + "?token=" + LoginInfoCache.e()).go();
}
public void lambda$initListener$4(View view) {
if (LoginInfoCache.c() == null) {
startActivity(LoginActivity.class).go();
return;
}
SensorsHelper.c("personalCenter", "Bank");
startActivity(CommonWebViewActivity.class).with(Progress.URL, Constants.e + Constants.g + "?token=" + LoginInfoCache.e()).go();
}
public void lambda$initListener$5(View view) {
SensorsHelper.c("personalCenter", "PrivacyAgreement");
startActivity(CommonWebViewActivity.class).with(Progress.URL, Constants.e + Constants.f909j).go();
}
public void lambda$initListener$6(View view) {
SensorsHelper.c("personalCenter", "UserAgreement");
startActivity(CommonWebViewActivity.class).with(Progress.URL, Constants.e + Constants.f910k).go();
}
public void lambda$initListener$7(View view) {
SensorsHelper.c("personalCenter", "Help");
startActivity(CommonWebViewActivity.class).with(Progress.URL, Constants.e + Constants.f + "?token=" + LoginInfoCache.e()).go();
}
public void lambda$initListener$8(View view) {
if (LoginInfoCache.c() == null) {
startActivity(LoginActivity.class).go();
return;
}
SensorsHelper.c("personalCenter", "Suggestion");
startActivity(CommonWebViewActivity.class).with(Progress.URL, Constants.e + Constants.i + "?token=" + LoginInfoCache.e()).go();
}
public void lambda$initListener$9(View view) {
SensorsHelper.c("personalCenter", "Whatsapp");
if (AppUtils.isAppInstalled("com.whatsapp")) {
startWhatsApp(this.mAppServiceInfo.whatsApp);
} else {
XToastUtils.c("Whatsapp no instalado");
}
}
public void lambda$observeViewModel$14(PageInfo pageInfo) {
if (pageInfo != null) {
int i = pageInfo.total;
if (i <= 0) {
((FragmentMineBinding) this.bind).f858y.setVisibility(4);
} else {
((FragmentMineBinding) this.bind).f858y.setText(i);
((FragmentMineBinding) this.bind).f858y.setVisibility(0);
}
}
}
public void lambda$observeViewModel$15(AppServiceInfo appServiceInfo) {
if (appServiceInfo == null) {
((FragmentMineBinding) this.bind).g.setVisibility(8);
return;
}
if (StringUtils.isTrimEmpty(appServiceInfo.serviceEmail) && StringUtils.isTrimEmpty(appServiceInfo.servicePhoneNo)) {
((FragmentMineBinding) this.bind).g.setVisibility(8);
return;
}
this.mAppServiceInfo = appServiceInfo;
if (TextUtils.isEmpty(appServiceInfo.whatsApp)) {
((FragmentMineBinding) this.bind).f853t.setVisibility(8);
} else {
((FragmentMineBinding) this.bind).f853t.setVisibility(0);
}
}
public void lambda$observeViewModel$16(AppUserInfo appUserInfo, View view) {
if (LoginInfoCache.c() != null) {
startActivity(CommonWebViewActivity.class).with(Progress.URL, appUserInfo.getReservationManagePage()).go();
} else {
startActivity(LoginActivity.class).go();
}
}
public void lambda$observeViewModel$17(final AppUserInfo appUserInfo) {
if (appUserInfo == null) {
((FragmentMineBinding) this.bind).f854u.setVisibility(8);
return;
}
if (StringUtils.isEmpty(appUserInfo.getReservationManagePage())) {
((FragmentMineBinding) this.bind).f854u.setVisibility(8);
} else {
((FragmentMineBinding) this.bind).f854u.setVisibility(0);
((FragmentMineBinding) this.bind).f854u.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
MineFragment.this.lambda$observeViewModel$16(appUserInfo, view);
}
});
}
updateMember(appUserInfo);
}
public void lambda$observeViewModel$18(Boolean bool) {
dismissLoading();
LoginInfoCache.a();
LiveEventBus.get("logout").post(new LogOutBean());
if (bool.booleanValue()) {
startActivity(LoginActivity.class).go();
}
}
public void lambda$showContactServiceDialog$20(View view) {
SensorsHelper.c("CustomerService", "Back");
SensorsHelper.a("CustomerService");
this.contactServiceBottomDialog.dismiss();
}
public void lambda$showContactServiceDialog$21(View view) {
SensorsHelper.c("CustomerService", "Phone");
startActivity(IntentUtils.getDialIntent(this.mAppServiceInfo.servicePhoneNo));
}
public void lambda$showContactServiceDialog$22(View view) {
SensorsHelper.c("CustomerService", "Email");
Intent intent = new Intent("android.intent.action.SENDTO");
intent.setData(Uri.parse("mailto:" + this.mAppServiceInfo.serviceEmail));
if (intent.resolveActivity(getActivity().getPackageManager()) != null) {
startActivity(intent);
}
}
public void lambda$showEditNickNameDialog$19(int i, String str) {
LoginInfo c = LoginInfoCache.c();
c.nickname = str;
LoginInfoCache.g(c);
((FragmentMineBinding) this.bind).f855v.setText(str);
showModifyNickSuccessDialog(i);
}
private void observeViewModel() {
((MineViewModel) this.vm).b.observe(this, new Observer() {
public final void onChanged(Object obj) {
MineFragment.this.lambda$observeViewModel$14((PageInfo) obj);
}
});
((MineViewModel) this.vm).d.observe(this, new Observer() {
public final void onChanged(Object obj) {
MineFragment.this.lambda$observeViewModel$15((AppServiceInfo) obj);
}
});
((MineViewModel) this.vm).f.observe(this, new Observer() {
public final void onChanged(Object obj) {
MineFragment.this.lambda$observeViewModel$17((AppUserInfo) obj);
}
});
((MineViewModel) this.vm).e.observe(this, new Observer() {
public final void onChanged(Object obj) {
MineFragment.this.lambda$observeViewModel$18((Boolean) obj);
}
});
}
private void refreshUi() {
((FragmentMineBinding) this.bind).f844k.setBackground(getActivity().getResources().getDrawable(R$drawable.lv1, null));
setProgressVisible(false);
((FragmentMineBinding) this.bind).f845l.setText("Completar el primer préstamo para obtener \nun nivel de membresía");
((FragmentMineBinding) this.bind).f843j.setText("Ir a pedir");
}
private void requestData() {
LoginInfo c = LoginInfoCache.c();
((MineViewModel) this.vm).f();
if (c != null) {
((FragmentMineBinding) this.bind).f855v.setText(c.nickname);
((MineViewModel) this.vm).g();
((MineViewModel) this.vm).d();
((MineViewModel) this.vm).e();
((FragmentMineBinding) this.bind).f856w.setVisibility(0);
} else {
((FragmentMineBinding) this.bind).f855v.setText("No se ha iniciado sesión");
((FragmentMineBinding) this.bind).f856w.setVisibility(4);
refreshUi();
}
((FragmentMineBinding) this.bind).f859z.setText("V" + AppUtils.getAppVersionName());
}
public void requestLogout() {
showLoading();
ThreadUtils.executeBySingle(new ThreadUtils.SimpleTask<Object>() {
public RequestHeader doInBackground() {
LoginInfoCache.f(LoginInfoCache.b());
RequestHeader requestHeader = new RequestHeader();
requestHeader.setAdid(Constant.c);
requestHeader.setAppMac(MyDeviceInfoUtils.b());
requestHeader.setDeviceBrand(Build.BRAND);
requestHeader.setDeviceCpuArchitecture(Build.CPU_ABI2);
requestHeader.setDeviceDiskStorageSpace(SDCardUtils.getExternalTotalSize() + "");
requestHeader.setDeviceModel(DeviceUtils.getModel());
requestHeader.setDeviceNo(DeviceUtils.getUniqueDeviceId());
requestHeader.setDeviceOs("Android");
requestHeader.setDeviceOsImage(StaticC.c + "*" + StaticC.d);
requestHeader.setDeviceProvidersName(PhoneUtils.getSimOperatorName());
requestHeader.setDeviceStorageSpace(SDCardUtils.getInternalTotalSize() + "");
requestHeader.setDeviceSystemLanguage(LanguageUtils.getSystemLanguage().toString());
requestHeader.setDeviceWifiSsid("");
requestHeader.setGaid(VelozApplication.getInstance().getGaid());
LocationEntity a = LocationCache.a();
if (a != null) {
requestHeader.setGpsLatitude(a.getLatitude());
requestHeader.setGpsLongitude(a.getLongitude());
Address a2 = GeoCoderHelper.a(MineFragment.this.getActivity(), Double.valueOf(a.getLatitude()), Double.valueOf(a.getLongitude()));
if (a2 != null) {
requestHeader.setGpsAddressCity(a2.getLocality());
requestHeader.setGpsAddressProvince(a2.getAdminArea());
requestHeader.setGpsAddressStreet(a2.getThoroughfare());
}
}
requestHeader.setMobileOsVersion(DeviceUtils.getSDKVersionName());
return requestHeader;
}
public void onSuccess(Object obj) {
((MineViewModel) ((BaseFragment) MineFragment.this).vm).c((RequestHeader) obj);
}
});
}
private void setProgressColor(int i, Drawable drawable) {
LayerDrawable layerDrawable = (LayerDrawable) ((FragmentMineBinding) this.bind).f846m.getProgressDrawable();
ScaleDrawable scaleDrawable = (ScaleDrawable) layerDrawable.getDrawable(1);
if (drawable != null) {
scaleDrawable.setDrawable(drawable);
} else {
((GradientDrawable) scaleDrawable.getDrawable()).setColor(ContextCompat.getColor(getContext(), i));
}
layerDrawable.invalidateSelf();
}
private void setProgressVisible(boolean z2) {
((FragmentMineBinding) this.bind).f846m.setVisibility(z2 ? 0 : 8);
}
private void showContactServiceDialog() {
if (getActivity() == null || getActivity().isDestroyed()) {
return;
}
SensorsHelper.b("CustomerService");
if (this.contactServiceBottomDialog == null) {
this.contactServiceBottomDialog = new MyBottomSheetDialog(getActivity(), R$style.BottomSheetDialogStyle);
}
RelativeLayout relativeLayout = (RelativeLayout) LayoutInflater.from(getActivity()).inflate(R$layout.layout_bottom_contact_service, (ViewGroup) null);
relativeLayout.findViewById(R$id.ibtn_close).setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
MineFragment.this.lambda$showContactServiceDialog$20(view);
}
});
LinearLayout linearLayout = (LinearLayout) relativeLayout.findViewById(R$id.rl_contact_phone);
TextView textView = (TextView) relativeLayout.findViewById(R$id.tv_contact_phone);
if (StringUtils.isTrimEmpty(this.mAppServiceInfo.servicePhoneNo)) {
linearLayout.setVisibility(8);
} else {
linearLayout.setVisibility(0);
textView.setText(this.mAppServiceInfo.servicePhoneNo);
}
linearLayout.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
MineFragment.this.lambda$showContactServiceDialog$21(view);
}
});
LinearLayout linearLayout2 = (LinearLayout) relativeLayout.findViewById(R$id.rl_contact_email);
TextView textView2 = (TextView) relativeLayout.findViewById(R$id.tv_contact_email);
if (StringUtils.isTrimEmpty(this.mAppServiceInfo.serviceEmail)) {
linearLayout2.setVisibility(8);
} else {
linearLayout2.setVisibility(0);
textView2.setText(this.mAppServiceInfo.serviceEmail);
}
linearLayout2.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
MineFragment.this.lambda$showContactServiceDialog$22(view);
}
});
this.contactServiceBottomDialog.setContentView(relativeLayout);
this.contactServiceBottomDialog.setCancelable(false);
this.contactServiceBottomDialog.setCanceledOnTouchOutside(false);
this.contactServiceBottomDialog.show();
}
private void showEditNickNameDialog(final int i) {
if (getActivity() == null || getActivity().isDestroyed()) {
return;
}
if (this.modifyNickDialog == null) {
this.modifyNickDialog = new ModifyNickDialog();
}
this.modifyNickDialog.setOnClickListener(new ModifyNickDialog.OnClickListener() {
@Override
public final void a(String str) {
MineFragment.this.lambda$showEditNickNameDialog$19(i, str);
}
});
getActivity().showDialogAllowingStateLoss(this.modifyNickDialog);
}
private void showLogoutConfirmDialog() {
if (getActivity() == null || getActivity().isDestroyed()) {
return;
}
LogoutConfirmDialog logoutConfirmDialog = new LogoutConfirmDialog();
this.logoutConfirmDialog = logoutConfirmDialog;
logoutConfirmDialog.setOnClickListener(new LogoutConfirmDialog.OnClickListener() {
@Override
public void a() {
}
@Override
public void b(Dialog dialog) {
MineFragment.this.requestLogout();
dialog.dismiss();
}
});
LogoutConfirmDialog logoutConfirmDialog2 = this.logoutConfirmDialog;
if (logoutConfirmDialog2 == null || logoutConfirmDialog2.isVisible()) {
return;
}
getActivity().showDialog(this.logoutConfirmDialog);
}
private void showModifyNickSuccessDialog(int i) {
ModifyNickSuccessDialog modifyNickSuccessDialog = new ModifyNickSuccessDialog(i);
this.modifyNickSuccessDialog = modifyNickSuccessDialog;
modifyNickSuccessDialog.setOnGetRewardClickListener(new ModifyNickSuccessDialog.OnGetRewardClickListener() {
@Override
public void a() {
MineFragment.this.goMemberUrlWebActivity();
}
});
getActivity().showDialog(this.modifyNickSuccessDialog);
}
private void updateMember(AppUserInfo appUserInfo) {
if (getActivity() == null || getActivity().isDestroyed() || appUserInfo == null) {
return;
}
this.memberUrl = appUserInfo.getMemberLevelBtnUrl();
if (appUserInfo.getMemberLevel() == null) {
refreshUi();
return;
}
setProgressVisible(true);
switch (appUserInfo.getMemberLevel().intValue()) {
case 1:
((FragmentMineBinding) this.bind).f844k.setBackground(getActivity().getResources().getDrawable(R$drawable.lv1, null));
setProgressColor(R$color.color_v1, null);
break;
case 2:
((FragmentMineBinding) this.bind).f844k.setBackground(getActivity().getResources().getDrawable(R$drawable.lv2, null));
setProgressColor(R$color.color_v2, null);
break;
case 3:
((FragmentMineBinding) this.bind).f844k.setBackground(getActivity().getResources().getDrawable(R$drawable.lv3, null));
setProgressColor(R$color.color_v3, null);
break;
case 4:
((FragmentMineBinding) this.bind).f844k.setBackground(getActivity().getResources().getDrawable(R$drawable.lv4, null));
setProgressColor(R$color.color_v4, null);
break;
case 5:
((FragmentMineBinding) this.bind).f844k.setBackground(getActivity().getResources().getDrawable(R$drawable.lv5, null));
setProgressColor(R$color.color_v5, null);
break;
case 6:
((FragmentMineBinding) this.bind).f844k.setBackground(getActivity().getResources().getDrawable(R$drawable.lv6, null));
setProgressColor(R$color.color_v6, null);
break;
case 7:
((FragmentMineBinding) this.bind).f844k.setBackground(getActivity().getResources().getDrawable(R$drawable.lv7, null));
setProgressVisible(false);
((FragmentMineBinding) this.bind).f845l.setText("Ha alcanzado el nivel más alto. En el futuro habrá nuevos niveles disponibles.");
((FragmentMineBinding) this.bind).f845l.setTextColor(ContextCompat.getColor(getContext(), R$color.white));
break;
}
((FragmentMineBinding) this.bind).f843j.setText("Detalles");
if (appUserInfo.getProgressPercent() != null) {
((FragmentMineBinding) this.bind).f846m.setProgress(appUserInfo.getProgressPercent().intValue());
}
if (appUserInfo.getNextMemberLevel() != null) {
((FragmentMineBinding) this.bind).f845l.setText("Faltan " + appUserInfo.getGrowValue() + "% puntos para subir al Lv." + appUserInfo.getNextMemberLevel());
}
}
@Override
public void lazyLoad() {
if (LoginInfoCache.c() != null) {
((MineViewModel) this.vm).e();
}
}
@Override
public int myView() {
return R$layout.fragment_mine;
}
public void onHiddenChanged(boolean z2) {
super.onHiddenChanged(z2);
}
@Override
public void onResume() {
super.onResume();
requestData();
if (LoginInfoCache.c() == null) {
((FragmentMineBinding) this.bind).f844k.setVisibility(8);
} else {
((FragmentMineBinding) this.bind).f844k.setVisibility(0);
}
}
public void startWhatsApp(String str) {
try {
Intent intent = new Intent("android.intent.action.VIEW", Uri.parse("https://api.whatsapp.com/send?phone=" + str));
intent.setPackage("com.whatsapp");
startActivity(intent);
} catch (Exception e) {
LogUtils.e(new Object[]{"WhatsApp not Installed"});
e.printStackTrace();
}
}
@Override
public void myCreate(FragmentMineBinding fragmentMineBinding, MineViewModel mineViewModel) {
initListener();
observeViewModel();
fragmentMineBinding.a(mineViewModel);
}
}