Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
wangcongtao
2020-11-10 20:34:47 +08:00
34 changed files with 158 additions and 68 deletions

View File

@@ -3,4 +3,5 @@
<color name="module_commons_dlg_bkg">#7f000000</color>
<color name="module_commons_wm_dialog_text_textColor">#FFFFFF</color>
<color name="v2x_FFF_666">#FFFFFF</color>
<color name="module_commons_FFF_333">#FFFFFF</color>
</resources>

View File

@@ -146,8 +146,8 @@
android:background="@drawable/module_ext_dw_common_corner_bkg"
android:gravity="center"
android:text="前方\n实况"
android:textColor="#FFFFFF"
android:textSize="@dimen/module_ext_navi_exit_textSize"
android:textColor="@color/module_commons_FFF_333"
android:textSize="@dimen/v2x_cancel_help_text_size"
android:textStyle="bold"
android:visibility="gone"
tools:visibility="visible" />
@@ -160,8 +160,8 @@
android:background="@drawable/module_ext_dw_common_corner_bkg"
android:gravity="center"
android:text="取消\n求助"
android:textColor="#FFFFFF"
android:textSize="@dimen/module_ext_navi_exit_textSize"
android:textColor="@color/module_commons_FFF_333"
android:textSize="@dimen/v2x_cancel_help_text_size"
android:textStyle="bold"
android:visibility="gone"
tools:visibility="visible" />

View File

@@ -52,6 +52,7 @@
<dimen name="module_ext_button_container_marginLeft">32px</dimen>
<dimen name="module_ext_button_container_marginBottom">60px</dimen>
<dimen name="module_ext_navi_exit_textSize">32px</dimen>
<dimen name="v2x_cancel_help_text_size">30px</dimen>
<dimen name="module_entrance_id_button_marginTop">20px</dimen>
<!-- module_ext_layout_extensions.xml-->

View File

@@ -52,6 +52,7 @@
<dimen name="module_ext_button_container_marginLeft">32px</dimen>
<dimen name="module_ext_button_container_marginBottom">60px</dimen>
<dimen name="module_ext_navi_exit_textSize">32px</dimen>
<dimen name="v2x_cancel_help_text_size">30px</dimen>
<dimen name="module_entrance_id_button_marginTop">20px</dimen>
<!-- module_ext_layout_extensions.xml-->

View File

@@ -53,6 +53,7 @@
<dimen name="module_ext_button_container_marginLeft">20px</dimen>
<dimen name="module_ext_button_container_marginBottom">30px</dimen>
<dimen name="module_ext_navi_exit_textSize">16px</dimen>
<dimen name="v2x_cancel_help_text_size">14px</dimen>
<dimen name="module_entrance_id_button_marginTop">8px</dimen>
<!-- module_ext_layout_extensions.xml-->
@@ -171,4 +172,5 @@
<dimen name="module_ext_seek_help_notice_text_margin_start">10px</dimen>
<dimen name="module_ext_seek_help_notice_number_text_size">22px</dimen>
<dimen name="module_ext_seek_help_notice_bg_margin_top">16px</dimen>
</resources>

View File

@@ -43,6 +43,7 @@ class GuideFragment : MvpFragment<GuideConstract.View, GuidePresenter>(), GuideC
adapter = GuideAdapter(this)
moduleGuideViewPager.adapter = adapter
(moduleGuideViewPager.getChildAt(0) as RecyclerView).layoutManager!!.isItemPrefetchEnabled = false
@Suppress("DEPRECATION")
moduleGuideIndicator.setSliderColor(context!!.resources.getColor(R.color.module_guide_indicator_dark), context!!.resources.getColor(R.color.module_guide_indicator_white))
.setSliderWidth(context!!.resources.getDimension(R.dimen.dp_22))
.setSlideMode(IndicatorSlideMode.NORMAL)

View File

@@ -30,6 +30,7 @@ class GuideStageFiveFragment : MvpFragment<IView, Presenter<IView>> {
override fun initViews() {
if(!DebugConfig.isLauncher()){
@Suppress("DEPRECATION")
moduleGuidePageFive.background = context!!.resources!!.getDrawable(R.mipmap.module_guide_item_stage_five)
}
}

View File

@@ -30,6 +30,7 @@ class GuideStageFourFragment : MvpFragment<IView, Presenter<IView>> {
override fun initViews() {
if(!DebugConfig.isLauncher()){
@Suppress("DEPRECATION")
moduleGuidePageFour.background = context!!.resources!!.getDrawable(R.mipmap.module_guide_item_stage_four)
}
}

View File

@@ -31,6 +31,7 @@ class GuideStageOneFragment : MvpFragment<IView, Presenter<IView>> {
override fun initViews() {
containerFragment?.visibleRight()
if(!DebugConfig.isLauncher()){
@Suppress("DEPRECATION")
moduleGuidePageOne.background = context!!.resources!!.getDrawable(R.mipmap.module_guide_item_stage_one)
}
}

View File

@@ -30,6 +30,7 @@ class GuideStageThreeFragment : MvpFragment<IView, Presenter<IView>> {
override fun initViews() {
if(!DebugConfig.isLauncher()){
@Suppress("DEPRECATION")
moduleGuidePageThree.background = context!!.resources!!.getDrawable(R.mipmap.module_guide_item_stage_three)
}
}

View File

@@ -30,6 +30,7 @@ class GuideStageTwoFragment : MvpFragment<IView, Presenter<IView>> {
override fun initViews() {
if(!DebugConfig.isLauncher()){
@Suppress("DEPRECATION")
moduleGuidePageTwo.background = context!!.resources!!.getDrawable(R.mipmap.module_guide_item_stage_two)
}
}

View File

@@ -1,3 +1,5 @@
@file:Suppress("DEPRECATION")
package com.zhidao.mogo.module.left.panel
import android.content.Context

View File

@@ -1,3 +1,5 @@
@file:Suppress("DEPRECATION")
package com.mogo.module.push.utils
import android.util.ArrayMap

View File

@@ -2,6 +2,7 @@ package com.mogo.module.push.view
import android.animation.Animator
import android.animation.ObjectAnimator
import android.annotation.SuppressLint
import android.content.Context
import android.graphics.PixelFormat
import android.os.Build
@@ -87,7 +88,7 @@ class FloatView constructor(
}
private fun turnNextMessage() {
pushViewModel?.pushBean?.apply {
pushViewModel.pushBean?.apply {
showTimeout = 0
updateTimer()
}
@@ -123,17 +124,17 @@ class FloatView constructor(
pushTimer.text = if (bean.showTimeout > 99) "" else "${bean.showTimeout}s"
// image
if (bean.imageUrl.isNullOrEmpty() && bean.QRCode.isNullOrEmpty()) {
if (bean.imageUrl.isEmpty() && bean.QRCode.isEmpty()) {
pushImage.gone()
} else if (!bean.imageUrl.isNullOrEmpty()) {
var params = pushImage.layoutParams
} else if (bean.imageUrl.isNotEmpty()) {
val params = pushImage.layoutParams
params.width = getImgWidth()
params.height = getImgHeight()
pushImage.layoutParams = params
pushImage.visible()
GlideApp.with(this).load(bean.imageUrl).into(pushImage)
} else if (!bean.QRCode.isNullOrEmpty()) {
var params = pushImage.layoutParams
} else if (bean.QRCode.isNotEmpty()) {
val params = pushImage.layoutParams
params.width = getQrImgWidth()
params.height = getQrImgHeight()
pushImage.layoutParams = params
@@ -167,7 +168,7 @@ class FloatView constructor(
}
// content
if (bean.content.isNullOrEmpty()) {
if (bean.content.isEmpty()) {
pushContent.gone()
} else {
pushContent.text = bean.content
@@ -175,7 +176,7 @@ class FloatView constructor(
}
// tts
if (!bean?.tts?.isNullOrEmpty()) {
if (bean.tts.isNotEmpty()) {
AIAssist.getInstance(context).speakTTSVoice(bean.tts)
}
}
@@ -185,6 +186,7 @@ class FloatView constructor(
abstract fun getQrImgWidth(): Int
abstract fun getQrImgHeight(): Int
@SuppressLint("SetTextI18n")
override fun timer(time: Int) {
Logger.d(TAG, "time = $time")
pushTimer.text = "${time}s"
@@ -211,7 +213,7 @@ class FloatView constructor(
private var topViewStatusListener = object : IMogoTopViewStatusListener {
override fun onViewRemoved(view: View?) {
isAddWindow = false
if (pushViewModel?.pushBean?.showTimeout ?: 0 > 0) {
if (pushViewModel.pushBean?.showTimeout ?: 0 > 0) {
if (getApis(context).statusManagerApi.isV2XShow) {
// 被中断的消息,需要再次被显示一次
uiHandler.removeCallbacks(delayClosePush)
@@ -332,7 +334,7 @@ class FloatView constructor(
override fun setBean(bean: PushBean) {
super.setBean(bean)
var paddingBottom: Int = 0
var paddingBottom = 0
if (pushButton.isVisible) {
paddingBottom =
context.resources.getDimensionPixelSize(R.dimen.module_push_content_paddingBottom_vertical)
@@ -467,7 +469,7 @@ class FloatView constructor(
private fun updateTimer() {
uiHandler.removeCallbacks(delayClosePush)
var time = pushViewModel.pushBean?.showTimeout ?: 0
val time = pushViewModel.pushBean?.showTimeout ?: 0
if (time > 0) {
pushViewModel.pushBean!!.showTimeout--
pushViewController?.timer(time)

View File

@@ -81,7 +81,7 @@ class ChoosePathFragment : BaseFragment(), IMogoNaviListener, IMogoVoiceCmdCallB
}
override fun onCalculateSuccess() {
var calculatedStrategies = SearchApisHolder.getNaviApis().calculatedStrategies
val calculatedStrategies = SearchApisHolder.getNaviApis().calculatedStrategies
if (calculatedStrategies != null && calculatedStrategies.size > 0) {
mAdapter.setDatas(calculatedStrategies)
mAdapter.selectTag = calculatedStrategies[0].tagId
@@ -143,14 +143,14 @@ class ChoosePathFragment : BaseFragment(), IMogoNaviListener, IMogoVoiceCmdCallB
return R.layout.fragment_search_category
}
var mogoTip: MogoLatLng? = null
private var mogoTip: MogoLatLng? = null
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
mogoTip = arguments?.getParcelable<MogoLatLng>(AMapConstants.KEY_PARCELABLE)
mogoTip = arguments?.getParcelable(AMapConstants.KEY_PARCELABLE)
}
// 是否开启导航
var isStartedNavi = false
private var isStartedNavi = false
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
@@ -167,7 +167,7 @@ class ChoosePathFragment : BaseFragment(), IMogoNaviListener, IMogoVoiceCmdCallB
SearchApisHolder.getRegisterCenterApis().registerMogoNaviListener(AMapConstants.PATH_FRAGMENT_CHOOSE_PATH, this)
var arrayList = ArrayList<MogoCalculatePath>()
val arrayList = ArrayList<MogoCalculatePath>()
mAdapter = CalculatePathAdapter(activity, arrayList)
rv_search_result.layoutManager = LinearLayoutManager(activity, LinearLayoutManager.VERTICAL, false)
@@ -185,7 +185,7 @@ class ChoosePathFragment : BaseFragment(), IMogoNaviListener, IMogoVoiceCmdCallB
}
mAdapter.setOnClickListener {
var item = it.getTag(R.id.tag_item) as MogoCalculatePath
val item = it.getTag(R.id.tag_item) as MogoCalculatePath
selectPath(item)
}
@@ -202,7 +202,7 @@ class ChoosePathFragment : BaseFragment(), IMogoNaviListener, IMogoVoiceCmdCallB
}
private fun registerRetryVoice() {
AIAssist.getInstance(context).registerUnWakeupCommand("retry", arrayOf<String>("重试"), this)
AIAssist.getInstance(context).registerUnWakeupCommand("retry", arrayOf("重试"), this)
}
private fun unregisterRetryVoice() {
@@ -229,7 +229,7 @@ class ChoosePathFragment : BaseFragment(), IMogoNaviListener, IMogoVoiceCmdCallB
private fun selectPath(item: MogoCalculatePath?) {
item?.let {
mAdapter.setSelectTag(item.tagId)
mAdapter.selectTag = item.tagId
if (SearchApisHolder.getNaviApis().itemClickInteraction != null) {
SearchApisHolder.getNaviApis().itemClickInteraction.onItemClicked(item.tagId)
}
@@ -265,11 +265,10 @@ class ChoosePathFragment : BaseFragment(), IMogoNaviListener, IMogoVoiceCmdCallB
}
private fun choosePath(intent: Intent?) {
var dataJsonStr = intent?.getStringExtra("data") ?: ""
val dataJsonStr = intent?.getStringExtra("data") ?: ""
try {
var jsonObj = JSONObject(dataJsonStr)
var routePlan = jsonObj.optString("route_choice", " ")
when (routePlan) {
val jsonObj = JSONObject(dataJsonStr)
when (jsonObj.optString("route_choice", " ")) {
"fastest" -> {
// 时间最短
selectItem(mTimeShortestPosition)
@@ -282,19 +281,18 @@ class ChoosePathFragment : BaseFragment(), IMogoNaviListener, IMogoVoiceCmdCallB
}
}
} catch (e: Exception) {
e.printStackTrace()
}
}
companion object {
@JvmField
val TAG: String = "ChoosePathFragment"
const val TAG: String = "ChoosePathFragment"
fun newInstance(searchPoi: MogoLatLng): Fragment {
var bundle = Bundle()
val bundle = Bundle()
bundle.putParcelable(AMapConstants.KEY_PARCELABLE, searchPoi)
var choosePathFragment = ChoosePathFragment()
val choosePathFragment = ChoosePathFragment()
choosePathFragment.arguments = bundle
return choosePathFragment
}

View File

@@ -1,3 +1,5 @@
@file:Suppress("DEPRECATION")
package com.mogo.module.share
import android.content.Context

View File

@@ -61,6 +61,7 @@ object UploadHelper {
// 没网就直接提示失败
Logger.e("UploadHelper", "upload not net ")
AIAssist.getInstance(context).speakTTSVoice("分享失败,请检查网络")
@Suppress("DEPRECATION")
TipToast.tip("分享失败,请检查网络", TipDrawable(context.resources.getDrawable(R.drawable.module_share_upload_fail)))
}
}

View File

@@ -1,3 +1,5 @@
@file:Suppress("DEPRECATION")
package com.zhidao.mogo.module.splash
import android.content.Context

View File

@@ -22,7 +22,7 @@ android {
}
}
ndk {
abiFilters "armeabi", "armeabi-v7a", "arm64-v8a"
abiFilters "armeabi-v7a"
}
}

View File

@@ -54,7 +54,7 @@ public class V2XSeekHelpButton implements IV2XButton {
tv = V2XServiceManager.getMogoEntranceButtonController().getButton(ButtonIndex.BUTTON2);
tv.setText("取消\n求助");
tv.setVisibility(View.VISIBLE);
tv.setBackgroundResource(R.drawable.bg_v2x_event_live_show);
tv.setBackgroundResource(R.drawable.bg_v2x_cancel_help);
tv.setOnClickListener(v -> {
//调用取消求助接口
// TODO: 2020/5/18 回调,显示对话框

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape android:shape="rectangle">
<gradient android:angle="135" android:endColor="#3A435E" android:startColor="#525B7B" android:type="linear" />
<corners android:radius="@dimen/dp_26" />
</shape>
</item>
<item>
<shape android:shape="rectangle">
<gradient android:angle="135" android:endColor="#3A435E" android:startColor="#525B7B" android:type="linear" />
<corners android:radius="@dimen/dp_26" />
</shape>
</item>
</selector>

View File

@@ -33,7 +33,7 @@
android:layout_alignTop="@+id/road_case_style"
android:paddingRight="@dimen/dp_28"
android:text="100"
android:textColor="#FFFFFF"
android:textColor="@color/v2x_FFF_333"
android:textSize="@dimen/dp_26" />
<ImageView
@@ -56,7 +56,7 @@
android:gravity="left"
android:paddingRight="@dimen/dp_28"
android:text="100"
android:textColor="#FFFFFF"
android:textColor="@color/v2x_FFF_333"
android:textSize="@dimen/dp_26" />
<ImageView