opt ui and save car info

This commit is contained in:
lixiaopeng
2022-04-12 18:29:53 +08:00
parent 7735408c80
commit dcd73b0bb7
3 changed files with 19 additions and 10 deletions

View File

@@ -6,6 +6,7 @@ import android.util.Log;
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
import com.mogo.commons.constants.SharedPrefsConstants;
import com.mogo.eagle.core.data.bindingcar.BindingcarInfo;
import com.mogo.eagle.core.data.bindingcar.CarInfo;
import com.mogo.eagle.core.data.bindingcar.ModifyBindingcarInfo;
import com.mogo.eagle.core.function.api.bindingcar.BindingcarCallBack;
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
@@ -13,6 +14,7 @@ import com.mogo.eagle.core.network.MoGoRetrofitFactory;
import com.mogo.eagle.core.network.utils.GsonUtil;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
import com.mogo.eagle.core.utilcode.util.GsonUtils;
import com.mogo.module.common.constants.HostConst;
import io.reactivex.Observer;
@@ -79,7 +81,7 @@ public class BindingcarNetWorkManager {
CallerHmiManager.INSTANCE.showModifyBindingcarDialog();
}
SharedPrefsMgr.getInstance(context).putString(SharedPrefsConstants.CAR_MODE_TYPE, info.data.getSeries());
SharedPrefsMgr.getInstance(context).putString(SharedPrefsConstants.CAR_INFO, GsonUtils.toJson(info.data));
}
}

View File

@@ -1,13 +1,13 @@
package com.mogo.eagle.core.function.hmi.ui.turnlight
import android.animation.AnimatorSet
import android.animation.ObjectAnimator
import android.content.Context
import android.util.AttributeSet
import android.util.Log
import android.view.LayoutInflater
import android.view.View
import android.view.animation.AlphaAnimation
import android.view.animation.Animation
import android.view.animation.LinearInterpolator
import android.widget.ImageView
import androidx.constraintlayout.widget.ConstraintLayout
import com.mogo.eagle.core.data.config.FunctionBuildConfig
@@ -175,12 +175,19 @@ class TurnLightViewStatus @JvmOverloads constructor(
//实现图片闪烁效果
private fun setAnimation(imageView: ImageView) {
val animation = AlphaAnimation(1.0f, 0f)
animation.duration = 500
animation.interpolator = LinearInterpolator()
animation.repeatCount = Animation.INFINITE
animation.repeatMode = Animation.REVERSE
imageView.startAnimation(animation)
val animationSet = AnimatorSet()
val valueAnimator = ObjectAnimator.ofFloat(imageView, "alpha",0f, 1.0f)
val valueAnimatorDisappare = ObjectAnimator.ofFloat(imageView, "alpha",1.0f, 0f)
valueAnimator.duration = 1000
valueAnimatorDisappare.duration = 800
valueAnimator.repeatCount = -1
valueAnimatorDisappare.repeatCount = -1
animationSet.playTogether(valueAnimatorDisappare, valueAnimator)
animationSet.start()
}
private fun stopAnimate() {

View File

@@ -12,7 +12,7 @@ public class SharedPrefsConstants {
public static final String LOCATION_LATITUDE = "location_latitude";
public static final String LOCATION_LONGITUDE = "location_longitude";
public static final String CAR_MODE_TYPE = "car_mode_type";
public static final String CAR_INFO = "car_info";
public static final String MAC_ADDRESS = "mac_address";
}