Merge branch 'dev' into demo/shunyi_v2v_merge

This commit is contained in:
wangcongtao
2020-09-14 14:11:03 +08:00
28 changed files with 184 additions and 110 deletions

View File

@@ -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() );
@@ -71,9 +73,12 @@ public class EntrancePresenter extends Presenter<EntranceView> implements Weathe
if ( weatherInfo == null ) {
return;
}
String temp = getContext().getResources().getString( R.string.module_ext_str_weather_temp_format, weatherInfo.getTemperature() );
Phenomena phenomena = Phenomena.getById( weatherInfo.getPhenomena() );
String desc = phenomena == null ? "" : phenomena.nameCn;
if ( phenomena == null ) {
return;
}
String temp = getContext().getResources().getString( R.string.module_ext_str_weather_temp_format, weatherInfo.getTemperature() );
String desc = phenomena.nameCn;
int resId = phenomena.resId;
mView.renderWeatherInfo( temp, desc, resId );
}
@@ -88,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();
@@ -97,6 +106,7 @@ public class EntrancePresenter extends Presenter<EntranceView> implements Weathe
@Override
public void onPause( @NonNull LifecycleOwner owner ) {
super.onPause( owner );
isResumed = false;
}
@Override
@@ -125,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, "获取个人信息失败");
}
}
}

View File

@@ -5,6 +5,7 @@ import android.os.Bundle
import android.view.View
import androidx.fragment.app.Fragment
import com.alibaba.android.arouter.facade.annotation.Route
import com.mogo.commons.debug.DebugConfig
import com.mogo.map.listener.IMogoMapListener
import com.mogo.map.location.IMogoLocationListener
import com.mogo.map.marker.IMogoMarkerClickListener
@@ -56,11 +57,12 @@ class MogoGuideProvider : IMogoModuleProvider {
}
override fun init(context: Context?) {
if (isDeviceOfD()) {
GuideBizManager.init()
} else {
Logger.d("MogoGuideProvider", "device type is not D")
}
Logger.d("MogoGuideProvider", "init====")
// if (DebugConfig.isLoadGuideModule()) {
GuideBizManager.init()
// } else {
// Logger.d("MogoGuideProvider", "device type is not D")
// }
}

View File

@@ -112,6 +112,11 @@ class GuideFragment : MvpFragment<GuideConstract.View, GuidePresenter>(), GuideC
GuideBizManager.invokeAuthorize()
}
override fun onDestroyView() {
closeGuideFragment()
super.onDestroyView()
}
override fun onDestroy() {
super.onDestroy()
invokeAuthorize()

View File

@@ -7,7 +7,7 @@ import com.mogo.service.analytics.IMogoAnalytics
object AnalyticsUtil {
const val INVOKE_TRACK_PLAY_PASS_ID = "mogu_play_pass"
const val INVOKE_TRACK_PLAY_PASS_ID = "v2x_play_pass"
const val INVOKE_TRACK_PASS_TIME = "pass_time"
const val INVOKE_TRACK_PLAY_TIME = "play_time"

View File

@@ -49,6 +49,7 @@ import com.mogo.utils.storage.SharedPrefsMgr;
import org.jetbrains.annotations.NotNull;
import org.json.JSONObject;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@@ -483,6 +484,7 @@ public class ShareControl implements IMogoShareManager, IMogoIntentListener,
config = GsonUtil.jsonFromObject(btnList);
Logger.d(TAG, "获取分享框成功:" + config);
} else {
config = GsonUtil.jsonFromObject(new ArrayList<FixableButton>());
Logger.d(TAG, "获取分享框成功但是data没有内容");
}
} else {

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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" />
<!--网络弹框-->

View File

@@ -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>

View File

@@ -82,13 +82,11 @@ public class V2XSurroundingAdapter extends RecyclerView.Adapter<V2XSurroundingVi
});
//数据绑定
Glide.with(mContext)
.load(getTypeRes(surroundingConstruction.getPoiType()))
.into(mBgImageView);
// Glide.with(mContext)
// .load(getTypeSmallRes(surroundingConstruction.getPoiType()))
// .into(mTypeImageView);
// .load(getTypeRes(surroundingConstruction.getPoiType()))
// .into(mBgImageView);
mBgImageView.setBackgroundResource(getTypeRes(surroundingConstruction.getPoiType()));
RequestOptions requestOptions = new RequestOptions()
.placeholder(R.drawable.v2x_icon_live_logo)

View File

@@ -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)

View File

@@ -7,9 +7,9 @@
<ImageView
android:id="@+id/iv_event_bg"
android:scaleType="fitXY"
android:src="@drawable/mogo_image_nongwu_nor"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<!-- android:src="@drawable/mogo_image_nongwu_nor"-->
<RelativeLayout
android:layout_alignParentBottom="true"

View File

@@ -31,9 +31,7 @@
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerInParent="true"
android:gravity="left"
android:paddingRight="@dimen/dp_24"
android:paddingLeft="@dimen/dp_24"
android:paddingRight="@dimen/dp_28"
android:text="100"
android:textColor="#FFFFFF"
android:textSize="@dimen/dp_34" />
@@ -54,9 +52,8 @@
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_toLeftOf="@id/road_case_useless"
android:gravity="center"
android:paddingRight="@dimen/dp_24"
android:paddingLeft="@dimen/dp_24"
android:gravity="left"
android:paddingRight="@dimen/dp_28"
android:text="100"
android:textColor="#FFFFFF"
android:textSize="@dimen/dp_34" />

View File

@@ -56,7 +56,7 @@
<dimen name="module_v2x_surrounding_item_bottom_left_textsize">20px</dimen>
<dimen name="module_v2x_surrounding_item_bottom_right_textsize">16px</dimen>
<dimen name="module_v2x_des_index_width">17px</dimen>
<dimen name="module_v2x_des_index_height">15.4px</dimen>
<dimen name="module_v2x_des_index_height">14px</dimen>
<dimen name="module_v2x_panel_width">82px</dimen>
<dimen name="module_v2x_panel_icon_cor">16px</dimen>
<dimen name="share_empty_icon_width">117px</dimen>

View File

@@ -57,8 +57,8 @@
<dimen name="module_v2x_surrounding_top_textsize">18px</dimen>
<dimen name="module_v2x_surrounding_item_bottom_left_textsize">20px</dimen>
<dimen name="module_v2x_surrounding_item_bottom_right_textsize">16px</dimen>
<dimen name="module_v2x_des_index_width">16px</dimen>
<dimen name="module_v2x_des_index_height">20px</dimen>
<dimen name="module_v2x_des_index_width">20px</dimen>
<dimen name="module_v2x_des_index_height">16px</dimen>
<dimen name="module_v2x_panel_width">82px</dimen>
<dimen name="module_v2x_panel_icon_cor">16px</dimen>
<dimen name="share_empty_icon_width">117px</dimen>