Merge branch 'qa_light' of http://gitlab.zhidaoauto.com/ecos/yycp-service/Launcher into qa_light
This commit is contained in:
15
.idea/codeStyles/Project.xml
generated
15
.idea/codeStyles/Project.xml
generated
@@ -3,9 +3,18 @@
|
||||
<JetCodeStyleSettings>
|
||||
<option name="PACKAGES_TO_USE_STAR_IMPORTS">
|
||||
<value>
|
||||
<package name="java.util" withSubpackages="false" static="false" />
|
||||
<package name="kotlinx.android.synthetic" withSubpackages="true" static="false" />
|
||||
<package name="io.ktor" withSubpackages="true" static="false" />
|
||||
<package name="java.util" alias="false" withSubpackages="false" />
|
||||
<package name="kotlinx.android.synthetic" alias="false" withSubpackages="true" />
|
||||
<package name="io.ktor" alias="false" withSubpackages="true" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="PACKAGES_IMPORT_LAYOUT">
|
||||
<value>
|
||||
<package name="" alias="false" withSubpackages="true" />
|
||||
<package name="java" alias="false" withSubpackages="true" />
|
||||
<package name="javax" alias="false" withSubpackages="true" />
|
||||
<package name="kotlin" alias="false" withSubpackages="true" />
|
||||
<package name="" alias="true" withSubpackages="true" />
|
||||
</value>
|
||||
</option>
|
||||
</JetCodeStyleSettings>
|
||||
|
||||
@@ -50,6 +50,8 @@ public class EntrancePresenter extends Presenter<EntranceView> implements Weathe
|
||||
|
||||
private IMogoNetwork mNetWork;
|
||||
|
||||
private boolean isResumed = false;
|
||||
|
||||
public EntrancePresenter(Context context, EntranceView view) {
|
||||
super(view);
|
||||
mWeatherModel = new WeatherModel( getContext() );
|
||||
@@ -91,6 +93,10 @@ public class EntrancePresenter extends Presenter<EntranceView> implements Weathe
|
||||
@Override
|
||||
public void onResume( @NonNull LifecycleOwner owner ) {
|
||||
super.onResume( owner );
|
||||
isResumed = true;
|
||||
if (userInfo != null) {
|
||||
mView.renderUserInfo(userInfo);
|
||||
}
|
||||
if(ExtensionsConfig.needRequestUserInfo()){
|
||||
// 相当于每次onResume都会请求一下个人信息,目的是能够相对及时的同步手机端的个人信息修改
|
||||
requestUserInfo();
|
||||
@@ -100,6 +106,7 @@ public class EntrancePresenter extends Presenter<EntranceView> implements Weathe
|
||||
@Override
|
||||
public void onPause( @NonNull LifecycleOwner owner ) {
|
||||
super.onPause( owner );
|
||||
isResumed = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -128,11 +135,13 @@ public class EntrancePresenter extends Presenter<EntranceView> implements Weathe
|
||||
@Override
|
||||
public void onSuccess(UserInfoResponse userInfoBaseResponse) {
|
||||
userInfo = userInfoBaseResponse.getResult();
|
||||
if(userInfo!=null) {
|
||||
Logger.d(TAG, "获取个人信息成功: " + userInfo);
|
||||
mView.renderUserInfo(userInfo);
|
||||
}else{
|
||||
Logger.e(TAG,"获取个人信息失败");
|
||||
if(isResumed) {
|
||||
if (userInfo != null) {
|
||||
Logger.d(TAG, "获取个人信息成功: " + userInfo);
|
||||
mView.renderUserInfo(userInfo);
|
||||
} else {
|
||||
Logger.e(TAG, "获取个人信息失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<gradient
|
||||
android:angle="270"
|
||||
android:endColor="#2A2B38"
|
||||
android:startColor="#3F4057" />
|
||||
android:angle="0"
|
||||
android:endColor="@color/tanlu_dialog_endcolor"
|
||||
android:startColor="@color/tanlu_dialog_startcolor" />
|
||||
<corners android:radius="@dimen/tanlu_dialog_radius" />
|
||||
|
||||
</shape>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#50526E"/>
|
||||
<solid android:color="@color/tanlu_dialog_bt_right_color"/>
|
||||
<corners android:bottomRightRadius="@dimen/tanlu_dialog_radius" />
|
||||
</shape>
|
||||
@@ -2,8 +2,8 @@
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<gradient
|
||||
android:angle="0"
|
||||
android:endColor="#5CC1FF"
|
||||
android:startColor="#3E7FFC" />
|
||||
android:endColor="@color/tanlu_dialog_bt_endcolor"
|
||||
android:startColor="@color/tanlu_dialog_bt_startcolor" />
|
||||
<corners android:bottomLeftRadius="@dimen/tanlu_dialog_radius" />
|
||||
|
||||
</shape>
|
||||
@@ -29,7 +29,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="抱歉,无法获取到相关数据"
|
||||
android:textColor="@color/white"
|
||||
android:textColor="@color/tanlu_dialog_textcolor"
|
||||
android:textSize="@dimen/tanlu_dialog_content_size" />
|
||||
|
||||
<TextView
|
||||
@@ -38,7 +38,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="分享失败"
|
||||
android:textColor="@color/white"
|
||||
android:textColor="@color/tanlu_dialog_textcolor"
|
||||
android:textSize="@dimen/tanlu_dialog_content_size" />
|
||||
|
||||
<LinearLayout
|
||||
@@ -57,7 +57,7 @@
|
||||
android:background="@drawable/tanlu_dialog_button_bg"
|
||||
android:gravity="center"
|
||||
android:text="重新分享"
|
||||
android:textColor="@color/white"
|
||||
android:textColor="@color/tanlu_dialog_bt_press_text_color"
|
||||
android:textSize="@dimen/tanlu_dialog_content_size"
|
||||
android:textStyle="bold" />
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
android:background="@drawable/tanlu_dialog_bottom_button_right_bg"
|
||||
android:gravity="center"
|
||||
android:text="取消"
|
||||
android:textColor="@color/white"
|
||||
android:textColor="@color/tanlu_dialog_bt_defalt_text_color"
|
||||
android:textSize="@dimen/tanlu_dialog_content_size"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="由于网络原因上传失败"
|
||||
android:textColor="@color/white"
|
||||
android:textColor="@color/tanlu_dialog_textcolor"
|
||||
android:textSize="@dimen/tanlu_dialog_content_size" />
|
||||
|
||||
<TextView
|
||||
@@ -29,7 +29,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="系统将在网络恢复时自动上传"
|
||||
android:textColor="@color/white"
|
||||
android:textColor="@color/tanlu_dialog_textcolor"
|
||||
android:textSize="@dimen/tanlu_dialog_content_size" />
|
||||
|
||||
<!--网络弹框-->
|
||||
|
||||
@@ -41,4 +41,13 @@
|
||||
<color name="color_59FFFFFF">#59FFFFFF</color>
|
||||
<color name="tanlu_white">#FFFFFF</color>
|
||||
|
||||
<color name="tanlu_dialog_textcolor">#FFFFFF</color>
|
||||
<color name="tanlu_dialog_startcolor">#3F4057</color>
|
||||
<color name="tanlu_dialog_endcolor">#2A2B38</color>
|
||||
<color name="tanlu_dialog_bt_defalt_text_color">#FFFFFF</color>
|
||||
<color name="tanlu_dialog_bt_press_text_color">#FFFFFF</color>
|
||||
<color name="tanlu_dialog_bt_startcolor">#3E7FFC</color>
|
||||
<color name="tanlu_dialog_bt_endcolor">#5CC1FF</color>
|
||||
<color name="tanlu_dialog_bt_right_color">#50526E</color>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -100,6 +100,7 @@ public class V2XScenarioHistoryIllegalParkVH extends V2XBaseViewHolder<V2XHistor
|
||||
v2XHistoryScenarioData.setEventJsonData(mOldScenarioData.getEventJsonData());
|
||||
v2XHistoryScenarioData.setDispose(true);
|
||||
V2XSQLiteUtils.updateScenarioHistoryData(mOldScenarioData, v2XHistoryScenarioData);
|
||||
mOldScenarioData.setDispose(true);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
@@ -159,7 +159,6 @@ public class V2XScenarioHistoryOtherSeekHelpVH extends V2XBaseViewHolder<V2XHist
|
||||
@Override
|
||||
public void delayedCloseWindow() {
|
||||
try {
|
||||
|
||||
hideControlButton(View.GONE);
|
||||
// 进行数据库存储
|
||||
V2XHistoryScenarioData v2XHistoryScenarioData = new V2XHistoryScenarioData();
|
||||
@@ -168,6 +167,7 @@ public class V2XScenarioHistoryOtherSeekHelpVH extends V2XBaseViewHolder<V2XHist
|
||||
v2XHistoryScenarioData.setEventJsonData(mOldScenarioData.getEventJsonData());
|
||||
v2XHistoryScenarioData.setDispose(true);
|
||||
V2XSQLiteUtils.updateScenarioHistoryData(mOldScenarioData, v2XHistoryScenarioData);
|
||||
mOldScenarioData.setDispose(true);
|
||||
|
||||
V2XEventPanelFragment.Companion.getInstance().hidePanel();
|
||||
} catch (Exception e) {
|
||||
|
||||
@@ -105,7 +105,9 @@ public class V2XScenarioHistoryRoadEventVH extends V2XBaseViewHolder<V2XHistoryS
|
||||
v2XHistoryScenarioData.setTriggerTime(mOldScenarioData.getTriggerTime());
|
||||
v2XHistoryScenarioData.setEventJsonData(mOldScenarioData.getEventJsonData());
|
||||
v2XHistoryScenarioData.setDispose(true);
|
||||
V2XSQLiteUtils.updateScenarioHistoryData(mOldScenarioData,v2XHistoryScenarioData);
|
||||
V2XSQLiteUtils.updateScenarioHistoryData(mOldScenarioData, v2XHistoryScenarioData);
|
||||
|
||||
mOldScenarioData.setDispose(true);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ class V2XEventPanelFragment : MvpFragment<V2XEventPanelFragment, EventPanelPrese
|
||||
// 打开出行动态TAB
|
||||
private val mCheckHistoryEventCb = V2XVoiceCallbackListener { command: String?, intent: Intent? ->
|
||||
try {
|
||||
rbScenarioHistory?.isChecked=true
|
||||
rbScenarioHistory?.isChecked = true
|
||||
} catch (e: java.lang.Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
@@ -60,7 +60,7 @@ class V2XEventPanelFragment : MvpFragment<V2XEventPanelFragment, EventPanelPrese
|
||||
// 打开周边事件TAB
|
||||
private val mCheckSurroundingCb = V2XVoiceCallbackListener { command: String?, intent: Intent? ->
|
||||
try {
|
||||
rbSurroundingEvent?.isChecked=true
|
||||
rbSurroundingEvent?.isChecked = true
|
||||
} catch (e: java.lang.Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
@@ -69,7 +69,7 @@ class V2XEventPanelFragment : MvpFragment<V2XEventPanelFragment, EventPanelPrese
|
||||
// 打开我的分享TAB
|
||||
private val mCheckShearEventCb = V2XVoiceCallbackListener { command: String?, intent: Intent? ->
|
||||
try {
|
||||
rbShareEvents?.isChecked=true
|
||||
rbShareEvents?.isChecked = true
|
||||
} catch (e: java.lang.Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
@@ -126,9 +126,11 @@ class V2XEventPanelFragment : MvpFragment<V2XEventPanelFragment, EventPanelPrese
|
||||
|
||||
mV2XEventPanelHistoryCountView = V2XEventPanelHistoryCountView(context)
|
||||
mV2XEventPanelHistoryCountView!!.setOnClickListener {
|
||||
if (!isPanelShow()) {
|
||||
TrackUtils.trackV2xHistoryEvent(1)
|
||||
showPanel()
|
||||
if (clPanelContainer != null) {
|
||||
if (!isPanelShow()) {
|
||||
TrackUtils.trackV2xHistoryEvent(1)
|
||||
showPanel()
|
||||
}
|
||||
}
|
||||
}
|
||||
V2XServiceManager.getMogoEntranceButtonController().addBottomLayerView(mV2XEventPanelHistoryCountView)
|
||||
|
||||
@@ -24,6 +24,8 @@ public class HeartLikeView extends LinearLayout {
|
||||
private AnimatorSet mAnimatorSet;
|
||||
private OnClickCallListener mOnClickCallListener;
|
||||
|
||||
private boolean isAnimator = false;
|
||||
|
||||
public HeartLikeView(Context context) {
|
||||
this(context, null);
|
||||
}
|
||||
@@ -38,35 +40,39 @@ public class HeartLikeView extends LinearLayout {
|
||||
mIllegalParkingLike = findViewById(R.id.ivIllegalParkingLike);
|
||||
|
||||
setOnClickListener(v -> {
|
||||
if (mAnimatorSet == null) {
|
||||
mAnimatorSet = (AnimatorSet) AnimatorInflater.loadAnimator(getContext(),
|
||||
R.anim.v2x_like_heart_animation);
|
||||
mAnimatorSet.setTarget(mIllegalParkingLike);
|
||||
}
|
||||
mAnimatorSet.addListener(new Animator.AnimatorListener() {
|
||||
@Override
|
||||
public void onAnimationStart(Animator animation) {
|
||||
|
||||
if (!isAnimator) {
|
||||
isAnimator = true;
|
||||
if (mAnimatorSet == null) {
|
||||
mAnimatorSet = (AnimatorSet) AnimatorInflater.loadAnimator(getContext(),
|
||||
R.anim.v2x_like_heart_animation);
|
||||
mAnimatorSet.setTarget(mIllegalParkingLike);
|
||||
}
|
||||
mAnimatorSet.addListener(new Animator.AnimatorListener() {
|
||||
@Override
|
||||
public void onAnimationStart(Animator animation) {
|
||||
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
if (mOnClickCallListener != null) {
|
||||
mOnClickCallListener.onClicked(HeartLikeView.this);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationCancel(Animator animation) {
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
isAnimator = false;
|
||||
if (mOnClickCallListener != null) {
|
||||
mOnClickCallListener.onClicked(HeartLikeView.this);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@Override
|
||||
public void onAnimationCancel(Animator animation) {
|
||||
|
||||
@Override
|
||||
public void onAnimationRepeat(Animator animation) {
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
mAnimatorSet.start();
|
||||
@Override
|
||||
public void onAnimationRepeat(Animator animation) {
|
||||
|
||||
}
|
||||
});
|
||||
mAnimatorSet.start();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ public class HeartUnLikeView extends LinearLayout {
|
||||
private ImageView mIllegalParkingUnLike;
|
||||
private AnimatorSet mAnimatorSet;
|
||||
private OnClickCallListener mOnClickCallListener;
|
||||
private boolean isAnimator = false;
|
||||
|
||||
public HeartUnLikeView(Context context) {
|
||||
this(context, null);
|
||||
@@ -38,35 +39,40 @@ public class HeartUnLikeView extends LinearLayout {
|
||||
mIllegalParkingUnLike = findViewById(R.id.ivIllegalParkingUnLike);
|
||||
|
||||
setOnClickListener(v -> {
|
||||
if (mAnimatorSet == null) {
|
||||
mAnimatorSet = (AnimatorSet) AnimatorInflater.loadAnimator(getContext(),
|
||||
R.anim.v2x_unlike_heart_animation);
|
||||
mAnimatorSet.setTarget(mIllegalParkingUnLike);
|
||||
}
|
||||
mAnimatorSet.addListener(new Animator.AnimatorListener() {
|
||||
@Override
|
||||
public void onAnimationStart(Animator animation) {
|
||||
if (!isAnimator) {
|
||||
isAnimator = true;
|
||||
|
||||
if (mAnimatorSet == null) {
|
||||
mAnimatorSet = (AnimatorSet) AnimatorInflater.loadAnimator(getContext(),
|
||||
R.anim.v2x_unlike_heart_animation);
|
||||
mAnimatorSet.setTarget(mIllegalParkingUnLike);
|
||||
}
|
||||
mAnimatorSet.addListener(new Animator.AnimatorListener() {
|
||||
@Override
|
||||
public void onAnimationStart(Animator animation) {
|
||||
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
if (mOnClickCallListener != null) {
|
||||
mOnClickCallListener.onClicked(HeartUnLikeView.this);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationCancel(Animator animation) {
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
isAnimator = false;
|
||||
if (mOnClickCallListener != null) {
|
||||
mOnClickCallListener.onClicked(HeartUnLikeView.this);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@Override
|
||||
public void onAnimationCancel(Animator animation) {
|
||||
|
||||
@Override
|
||||
public void onAnimationRepeat(Animator animation) {
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
mAnimatorSet.start();
|
||||
@Override
|
||||
public void onAnimationRepeat(Animator animation) {
|
||||
|
||||
}
|
||||
});
|
||||
mAnimatorSet.start();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -3,4 +3,13 @@
|
||||
<color name="tanlu_white_light">#333333</color>
|
||||
<color name="color_99FFFFFF_light">#666666</color>
|
||||
|
||||
<color name="tanlu_dialog_textcolor_light">#333333</color>
|
||||
<color name="tanlu_dialog_startcolor_light">#F5F5F5</color>
|
||||
<color name="tanlu_dialog_endcolor_light">#FFFFFF</color>
|
||||
<color name="tanlu_dialog_bt_defalt_text_color_light">#333333</color>
|
||||
<color name="tanlu_dialog_bt_press_text_color_light">#2896FF</color>
|
||||
<color name="tanlu_dialog_bt_startcolor_light">#FFFFFF</color>
|
||||
<color name="tanlu_dialog_bt_endcolor_light">#FFFFFF</color>
|
||||
<color name="tanlu_dialog_bt_right_color_light">#E8E8E8</color>
|
||||
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user