diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml index 0d156937bb..663459aa50 100644 --- a/.idea/codeStyles/Project.xml +++ b/.idea/codeStyles/Project.xml @@ -3,18 +3,9 @@ - diff --git a/app/regroup.gradle b/app/regroup.gradle index a30fe32197..84cd73d13d 100644 --- a/app/regroup.gradle +++ b/app/regroup.gradle @@ -3,7 +3,7 @@ afterEvaluate { def independent = ["em3", "em1", "d80x", "d82x", "bydauto"] - def launcher = ["f80x", "em4"] + def launcher = ["f80x", "em4", "e8xx"] it.getTasks().iterator().forEachRemaining { def task = it diff --git a/gradle.properties b/gradle.properties index 57bdb8d90b..0a7bd019ea 100644 --- a/gradle.properties +++ b/gradle.properties @@ -65,12 +65,12 @@ MOGO_BASE_SERVICES_SDK_VERSION = 1.2.1.22 # 探路 MOGO_MODULE_TANLU_VERSION=1.3.1.24 # 车聊聊 -CARCHATTING_VERSION=1.5.3 +CARCHATTING_VERSION=1.6.5 # 车聊聊接口 CARCHATTINGPROVIDER_VERSION=1.3.4 # 视频引导 MOGO_MODULE_GUIDESHOW_VERSION=1.0.2-SNAPSHOT -# 视频引导接口 +## 视频引导接口 MOGO_MODULE_GUIDESHOW_PROVIDER_VERSION=1.0.2-SNAPSHOT # 在线车辆F diff --git a/libraries/tanlulib/src/main/java/com/zhidao/roadcondition/service/CosStatusController.kt b/libraries/tanlulib/src/main/java/com/zhidao/roadcondition/service/CosStatusController.kt index 502e6b1c5a..b46e500568 100644 --- a/libraries/tanlulib/src/main/java/com/zhidao/roadcondition/service/CosStatusController.kt +++ b/libraries/tanlulib/src/main/java/com/zhidao/roadcondition/service/CosStatusController.kt @@ -4,7 +4,6 @@ import android.content.Intent import android.util.Log import com.google.gson.Gson import com.mogo.commons.AbsMogoApplication -import com.mogo.commons.debug.DebugConfig import com.mogo.utils.TipToast import com.zhidao.cosupload.DbPriorityConfig import com.zhidao.cosupload.callback.CosStatusCallback @@ -14,7 +13,10 @@ import com.zhidao.roadcondition.event.GetImageSuccessEvent import com.zhidao.roadcondition.event.LatLngStickyEventBus import com.zhidao.roadcondition.model.proxy.INFO_TYPE_IMG import com.zhidao.roadcondition.model.proxy.INFO_TYPE_VIDEO -import com.zhidao.roadcondition.util.* +import com.zhidao.roadcondition.util.CarNet_Cos_Upload +import com.zhidao.roadcondition.util.LocationUtil +import com.zhidao.roadcondition.util.deletePicFile +import com.zhidao.roadcondition.util.trackNormalEvent /** * @description cos上传操作 @@ -24,10 +26,8 @@ import com.zhidao.roadcondition.util.* */ class CosStatusController : CosStatusCallback { val TAG: String = this.javaClass.simpleName - //存储单次请求的视频和缩略图url var videoAndThumbMap: MutableMap = mutableMapOf() - //图片上传的eventId lateinit var mPicEventId: String private var isRetry = false //是否重试上传过图片 @@ -80,46 +80,40 @@ class CosStatusController : CosStatusCallback { Log.d(TAG, "uploadCosFailed = $localPath") trackUploadCos(2) //语音播报 1:上报路况,2:交通检查,3:封路 默认 mType 应该为null -// if (CarCorderController.mType.equals(TANLU_ROAD_CONGESTION) || CarCorderController.mType.equals( -// TANLU_TRAFFIC_CHECK -// ) || CarCorderController.mType.equals(TANLU_ROAD_CLOSURE) -// || CarCorderController.mType.equals(TANLU_ROAD_CURRENT) || CarCorderController.mType.equals( -// TANLU_ROAD_PONDING -// ) || CarCorderController.mType.equals(TANLU_ROAD_ICING) -// || CarCorderController.mType.equals(TANLU_ROAD_HEAVY_FOG) || CarCorderController.mType.equals( -// TANLU_ROAD_ACCIDENT -// ) || CarCorderController.mType.equals(TANLU_ROAD_WORK) -// ) { + if (CarCorderController.mType.equals(TANLU_ROAD_CONGESTION) || CarCorderController.mType.equals( + TANLU_TRAFFIC_CHECK + ) || CarCorderController.mType.equals(TANLU_ROAD_CLOSURE) + || CarCorderController.mType.equals(TANLU_ROAD_CURRENT) || CarCorderController.mType.equals( + TANLU_ROAD_PONDING + ) || CarCorderController.mType.equals(TANLU_ROAD_ICING) + || CarCorderController.mType.equals(TANLU_ROAD_HEAVY_FOG) || CarCorderController.mType.equals( + TANLU_ROAD_ACCIDENT + ) || CarCorderController.mType.equals(TANLU_ROAD_WORK) + ) { // VoiceController.speakVoice("cos上报失败") - Log.d(TAG, "uploadCosFailed mType = $mType") + Log.d(TAG, "uploadCosFailed mType = $mType") + if (entity?.isCustom && mFromType != UPLOAD_FROM_STRATEGY_ACCIDENT_AUTO) { + sendGetInfoFailedReceiver("100") + } + } if (!isRetry) { isRetry = true - taskAsync(5_000) { - //去掉重试 - try { - uploadFile(mutableListOf(localPath as String), entity, mType, mainInfoId, mFromType, mLongitude, mLatitude) - } catch (e: Exception) { - e.printStackTrace() - } - } +// taskAsync(30_000) { //去掉重试 +// try { +// uploadFile(mutableListOf(localPath as String), entity, mType) +// } catch (e: Exception) { +// e.printStackTrace() +// } +// } } else { - //重试一次,如果还失败就提示 - if (entity?.isCustom && mFromType != UPLOAD_FROM_STRATEGY_ACCIDENT_AUTO) { - if(DebugConfig.isLauncher()) { - // 只有Launcher上报的时候,失败会提示,独立app不会提示 - sendGetInfoFailedReceiver("100") - } - } - if (localPath!!.endsWith("mp4") || localPath!!.contains("Thumbnail")) { CosCallbackMapController.uploadFailed?.invoke() } CosCallbackMapController.unregisterCallback(localPath) InformationUploadController.release(entity?.id) - deletePicFile(localPath) +// deletePicFile(localPath) } - } override fun uploadCosCompleted( @@ -165,7 +159,7 @@ class CosStatusController : CosStatusCallback { trackUploadCos(5) } } else { - //上传图片成功, 如果是上报路况,直接上传 + //上传图片成功, 如果是上报路况,直接上传,TODO Log.d(TAG, "uploadCosCompleted 分享成功 ---- mType = $mType") sendInformationDirectly( INFO_TYPE_IMG, @@ -218,9 +212,9 @@ class CosStatusController : CosStatusCallback { latitude = latitude ) { success -> CosCallbackMapController.unregisterCallbacks(map) - CosCallbackMapController.mainService?.let { - CosCallbackMapController.mainService?.sendCustomResult(success) - } +// CosCallbackMapController.mainService?.let { +// CosCallbackMapController.mainService?.sendCustomResult(success) +// } Log.d(TAG, "type = $type ----success = $success") if (success) { //分享成功,并打点,如果是上报拥堵,需要takeVideo @@ -237,6 +231,7 @@ class CosStatusController : CosStatusCallback { TipToast.shortTip("分享失败,请检查网络") } } + } } } @@ -251,5 +246,6 @@ class CosStatusController : CosStatusCallback { AbsMogoApplication.getApp().applicationContext ) } + } diff --git a/libraries/tanlulib/src/main/java/com/zhidao/roadcondition/service/MainService.kt b/libraries/tanlulib/src/main/java/com/zhidao/roadcondition/service/MainService.kt index 87ac502a8b..bdd3f12d19 100644 --- a/libraries/tanlulib/src/main/java/com/zhidao/roadcondition/service/MainService.kt +++ b/libraries/tanlulib/src/main/java/com/zhidao/roadcondition/service/MainService.kt @@ -66,11 +66,11 @@ class MainService : Service() { private var mLatitude: Double = 0.0 //发送主动上报结果广播给外部 - fun sendCustomResult(result: Boolean) { - var intent = Intent(customResultAction) - intent.putExtra("isSuccess", result) - sendBroadcast(intent) - } +// fun sendCustomResult(result: Boolean) { +// var intent = Intent(customResultAction) +// intent.putExtra("isSuccess", result) +// sendBroadcast(intent) +// } override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int { Log.d(TAG, "onStartCommand -----------> ") diff --git a/modules/mogo-module-apps/src/main/java/com/mogo/module/apps/model/AppsModel.java b/modules/mogo-module-apps/src/main/java/com/mogo/module/apps/model/AppsModel.java index 7bf13bcf63..ca43439031 100644 --- a/modules/mogo-module-apps/src/main/java/com/mogo/module/apps/model/AppsModel.java +++ b/modules/mogo-module-apps/src/main/java/com/mogo/module/apps/model/AppsModel.java @@ -25,7 +25,7 @@ import java.util.concurrent.atomic.AtomicBoolean; * 加载并保存 app 列表 */ public class AppsModel { - + private static final String TAG = "AppsModel"; private static volatile AppsModel sInstance; @@ -57,7 +57,6 @@ public class AppsModel { if ( mPagedApps != null ) { mPagedApps.clear(); } - mPagedApps = null; mContext = null; mAppFilter = null; sInstance = null; @@ -88,7 +87,7 @@ public class AppsModel { continue; } int page = counter++ / AppsConst.TOTAL_SIZE_EACH_PAGE; - if ( !mPagedApps.containsKey( page ) ) { + if ( mPagedApps.get( page ) == null ) { mPagedApps.put( page, new ArrayList<>() ); } String appName = getApplicationName( packageManager, packageInfo ); @@ -116,9 +115,12 @@ public class AppsModel { if ( TextUtils.isEmpty( packageName ) ) { return; } - if ( mPagedApps.isEmpty() ) { + if ( mPagedApps == null || mPagedApps.isEmpty() ) { return; } + if ( mAppFilter == null ) { + mAppFilter = new AppFilterImpl( mContext ); + } try { final PackageManager packageManager = mContext.getPackageManager(); PackageInfo packageInfo = packageManager.getPackageInfo( packageName, 0 ); @@ -129,7 +131,7 @@ public class AppsModel { Drawable appIcon = packageInfo.applicationInfo.loadIcon( packageManager ); AppInfo appInfo = new AppInfo( appName, packageName, versionName, versionCode, appIcon, AppEnumHelper.getCustomizedAppIconResId( packageName ) ); int pageIndex = getPageIndex( packageName, true ); - if ( !mPagedApps.containsKey( pageIndex ) ) { + if ( mPagedApps.get( pageIndex ) == null ) { mPagedApps.put( pageIndex, new ArrayList<>() ); } mPagedApps.get( pageIndex ).add( appInfo ); @@ -183,6 +185,9 @@ public class AppsModel { if ( TextUtils.isEmpty( packageName ) ) { return; } + if ( mPagedApps == null || mPagedApps.isEmpty() ) { + return; + } try { int pageIndex = getPageIndex( packageName, false ); if ( pageIndex == -1 ) { @@ -200,7 +205,7 @@ public class AppsModel { continue; } int page = counter++ / AppsConst.TOTAL_SIZE_EACH_PAGE + pageIndex; - if ( !mPagedApps.containsKey( page ) ) { + if ( mPagedApps.get( page ) == null ) { mPagedApps.put( page, new ArrayList<>() ); } mPagedApps.get( page ).add( appInfo ); diff --git a/modules/mogo-module-common/src/main/res/values-xhdpi/dimens.xml b/modules/mogo-module-common/src/main/res/values-xhdpi/dimens.xml index 1770c16984..ca1346e002 100644 --- a/modules/mogo-module-common/src/main/res/values-xhdpi/dimens.xml +++ b/modules/mogo-module-common/src/main/res/values-xhdpi/dimens.xml @@ -1053,5 +1053,6 @@ 42px 48px -10px + 10px diff --git a/modules/mogo-module-common/src/main/res/values/dimens.xml b/modules/mogo-module-common/src/main/res/values/dimens.xml index 1e2c7b1cdc..170c5a430d 100644 --- a/modules/mogo-module-common/src/main/res/values/dimens.xml +++ b/modules/mogo-module-common/src/main/res/values/dimens.xml @@ -1044,4 +1044,5 @@ 22.9688px 26.2500px -8px + 8px diff --git a/modules/mogo-module-extensions/src/main/res/layout/module_ext_layout_entrance.xml b/modules/mogo-module-extensions/src/main/res/layout/module_ext_layout_entrance.xml index b84ccdcde8..581046b9c9 100644 --- a/modules/mogo-module-extensions/src/main/res/layout/module_ext_layout_entrance.xml +++ b/modules/mogo-module-extensions/src/main/res/layout/module_ext_layout_entrance.xml @@ -81,7 +81,7 @@ android:id="@+id/module_entrance_id_move2_current_location" android:layout_width="@dimen/module_ext_operation_panel_width" android:layout_height="@dimen/module_ext_operation_panel_move2_height" - android:background="@drawable/module_ext_dw_common_corner_bkg" + android:background="@drawable/module_ext_shadow_bkg" android:scaleType="centerInside" android:src="@drawable/module_map_ic_move2_current_location" app:layout_constraintBottom_toBottomOf="parent" @@ -92,6 +92,7 @@ android:layout_width="@dimen/module_ext_operation_panel_share_width" android:layout_height="@dimen/module_ext_operation_panel_share_height" android:layout_marginBottom="@dimen/module_ext_operation_panel_share_marginBottom" + android:layout_marginEnd="@dimen/module_common_shadow_width_pos" android:background="@drawable/module_ext_dw_upload_road_condition_bkg" app:layout_constraintBottom_toTopOf="@+id/module_entrance_id_move2_current_location" app:layout_constraintRight_toRightOf="@+id/module_entrance_id_move2_current_location" diff --git a/modules/mogo-module-extensions/src/main/res/layout/module_ext_layout_extensions.xml b/modules/mogo-module-extensions/src/main/res/layout/module_ext_layout_extensions.xml index d4118d06e7..f1ac9dc491 100644 --- a/modules/mogo-module-extensions/src/main/res/layout/module_ext_layout_extensions.xml +++ b/modules/mogo-module-extensions/src/main/res/layout/module_ext_layout_extensions.xml @@ -13,7 +13,6 @@ android:paddingStart="@dimen/module_ext_weather_container_paddingLeft" android:paddingEnd="@dimen/module_ext_weather_container_paddingRight" android:visibility="invisible" - android:translationY="@dimen/module_common_shadow_width" app:layout_goneMarginLeft="@dimen/module_ext_notice_margin_start" app:layout_constraintTop_toTopOf="parent" app:layout_constraintLeft_toRightOf="@+id/module_ext_id_msg" @@ -43,7 +42,6 @@ android:layout_width="@dimen/module_ext_height" android:layout_height="@dimen/module_ext_height" android:layout_marginStart="@dimen/module_ext_notice_margin_start" - android:translationY="@dimen/module_common_shadow_width" android:layout_marginEnd="@dimen/module_ext_msg_marginRight" android:background="@drawable/module_ext_shadow_bkg" android:visibility="gone" @@ -73,8 +71,10 @@ 26px + 66px + 10px + 2px + 2px \ No newline at end of file diff --git a/modules/mogo-module-extensions/src/main/res/values-xhdpi-1920x1000/dimens.xml b/modules/mogo-module-extensions/src/main/res/values-xhdpi-1920x1000/dimens.xml index 0304873cfe..d34d1a739a 100644 --- a/modules/mogo-module-extensions/src/main/res/values-xhdpi-1920x1000/dimens.xml +++ b/modules/mogo-module-extensions/src/main/res/values-xhdpi-1920x1000/dimens.xml @@ -30,17 +30,17 @@ 32px 2px - 120px + 140px 32px 60px 92px 24px 48px 2px - 120px - 120px + 140px + 140px 120px - 30px + 20px 30px 32px 32px @@ -146,4 +146,8 @@ 40px 45px + 120px + 30px + 20px + 20px \ No newline at end of file diff --git a/modules/mogo-module-extensions/src/main/res/values-xhdpi/dimens.xml b/modules/mogo-module-extensions/src/main/res/values-xhdpi/dimens.xml index 6e8de9e26f..c06db31dd1 100644 --- a/modules/mogo-module-extensions/src/main/res/values-xhdpi/dimens.xml +++ b/modules/mogo-module-extensions/src/main/res/values-xhdpi/dimens.xml @@ -30,17 +30,17 @@ 32px 2px - 120px + 140px 32px 60px 92px 24px 48px 2px - 120px + 140px 120px 120px - 30px + 20px 30px 32px 32px @@ -145,7 +145,11 @@ 20px 34px - 175px - 30px + 161px + 10px 45px + 120px + 30px + 20px + 20px \ No newline at end of file diff --git a/modules/mogo-module-extensions/src/main/res/values/dimens.xml b/modules/mogo-module-extensions/src/main/res/values/dimens.xml index 2f344bce6f..37328f34fd 100644 --- a/modules/mogo-module-extensions/src/main/res/values/dimens.xml +++ b/modules/mogo-module-extensions/src/main/res/values/dimens.xml @@ -30,17 +30,17 @@ 20px 1px - 66px + 82px 20px 34.5px 58px 17px 31.4px 1.2px - 66px + 82px 66px 66px - 16px + 8px 16px 34.5px 20px @@ -60,7 +60,7 @@ 32px 32px - 90px + 78px 22px 28px @@ -151,7 +151,10 @@ 10px 19px - 16px + 0px 26px - + 66px + 10px + 2px + 2px \ No newline at end of file diff --git a/modules/mogo-module-main/src/main/res/layout/module_main_activity_main.xml b/modules/mogo-module-main/src/main/res/layout/module_main_activity_main.xml index a9cf9fe2a5..592d7824ff 100644 --- a/modules/mogo-module-main/src/main/res/layout/module_main_activity_main.xml +++ b/modules/mogo-module-main/src/main/res/layout/module_main_activity_main.xml @@ -48,6 +48,12 @@ android:layout_marginLeft="@dimen/module_main_id_entrance_fragment_container_marginLeft" android:padding="@dimen/module_main_entrance_fragment_container_padding" /> + + + - - - 30px 830px 800px - 30px + 20px 30px 340px diff --git a/modules/mogo-module-main/src/main/res/values/dimens.xml b/modules/mogo-module-main/src/main/res/values/dimens.xml index abb5b70e10..adabf11063 100644 --- a/modules/mogo-module-main/src/main/res/values/dimens.xml +++ b/modules/mogo-module-main/src/main/res/values/dimens.xml @@ -17,12 +17,12 @@ 319px 110px - 16px + 10px 15px 460px 444px 350px - 16px + 10px 16px 658px 8px diff --git a/modules/mogo-module-media/src/main/java/com/mogo/module/media/widget/AnimCircleImageView.java b/modules/mogo-module-media/src/main/java/com/mogo/module/media/widget/AnimCircleImageView.java index 6a0a8daab1..2217bbdab2 100644 --- a/modules/mogo-module-media/src/main/java/com/mogo/module/media/widget/AnimCircleImageView.java +++ b/modules/mogo-module-media/src/main/java/com/mogo/module/media/widget/AnimCircleImageView.java @@ -17,9 +17,12 @@ import android.util.Log; import android.widget.ImageView; import com.mogo.module.common.utils.CarSeries; +import com.mogo.skin.support.IMogoSkinCompatSupportable; +import com.mogo.skin.support.helper.MogoSkinCompatHelperDelegate; +import com.mogo.skin.support.helper.MogoSkinCompatImageHelperDelegate; @SuppressLint("AppCompatCustomView") -public class AnimCircleImageView extends ImageView { +public class AnimCircleImageView extends ImageView implements IMogoSkinCompatSupportable { Drawable mDrawbleSrc; Context context; Bitmap mBitmapOut; @@ -28,6 +31,10 @@ public class AnimCircleImageView extends ImageView { int defaultHeight; int diameter; int radius; + PaintFlagsDrawFilter drawFilter = new PaintFlagsDrawFilter(0, Paint.ANTI_ALIAS_FLAG|Paint.FILTER_BITMAP_FLAG); + Paint mPaint = new Paint(Paint.ANTI_ALIAS_FLAG | Paint.DITHER_FLAG); + + MogoSkinCompatImageHelperDelegate imageHelper; int currentDegree; int savedDegree; @@ -47,6 +54,7 @@ public class AnimCircleImageView extends ImageView { public AnimCircleImageView(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); + imageHelper = new MogoSkinCompatImageHelperDelegate(this); this.context = context; init(); } @@ -76,6 +84,8 @@ public class AnimCircleImageView extends ImageView { @Override public void setImageResource(int resId) { super.setImageResource(resId); + Log.d("AnimCircle", "setImageResource: " + MogoSkinCompatHelperDelegate.isSupport()); + imageHelper.setImageResource(resId); mDrawbleSrc = getDrawable(); output = null; } @@ -106,23 +116,27 @@ public class AnimCircleImageView extends ImageView { @Override protected void onDraw(Canvas canvas) { - Log.d("AnimCircle", "onDraw===="); +// Log.d("AnimCircle", "onDraw===="); try { - if (mDrawbleSrc == null) + if (mDrawbleSrc == null) { return; + } - if (getWidth() == 0 || getHeight() == 0) + if (getWidth() == 0 || getHeight() == 0) { return; + } - if (mDrawbleSrc.getClass() == NinePatchDrawable.class) + if (mDrawbleSrc.getClass() == NinePatchDrawable.class) { return; + } if (output == null) { defaultHeight = getHeight(); defaultWidth = getWidth(); diameter = (defaultHeight > defaultWidth ? defaultWidth : defaultHeight); radius = diameter / 2; - mBitmapOut = getCuttedPicture(mDrawbleSrc); +// mBitmapOut = getCuttedPicture(mDrawbleSrc); + mBitmapOut = ((BitmapDrawable) mDrawbleSrc).getBitmap(); Paint paint = new Paint(); Rect rect = new Rect(0, 0, mBitmapOut.getWidth(), @@ -147,9 +161,9 @@ public class AnimCircleImageView extends ImageView { if (isRotateEnable) { currentDegree = (currentDegree + mRotateAngleStep) % 360; canvas.save(); - canvas.setDrawFilter(new PaintFlagsDrawFilter(0, Paint.ANTI_ALIAS_FLAG|Paint.FILTER_BITMAP_FLAG)); + canvas.setDrawFilter(drawFilter); canvas.rotate(currentDegree, defaultWidth / 2, defaultHeight / 2); - canvas.drawBitmap(output, defaultWidth / 2 - radius, defaultHeight / 2 - radius, null); + canvas.drawBitmap(output, defaultWidth / 2 - radius, defaultHeight / 2 - radius, mPaint); canvas.restore(); if (isRotateEnable) { removeCallbacks(loopInvalidate); @@ -158,9 +172,9 @@ public class AnimCircleImageView extends ImageView { } } else { canvas.save(); - canvas.setDrawFilter(new PaintFlagsDrawFilter(0, Paint.ANTI_ALIAS_FLAG|Paint.FILTER_BITMAP_FLAG)); + canvas.setDrawFilter(drawFilter); canvas.rotate(currentDegree, defaultWidth / 2, defaultHeight / 2); - canvas.drawBitmap(output, defaultWidth / 2 - radius, defaultHeight / 2 - radius, null); + canvas.drawBitmap(output, defaultWidth / 2 - radius, defaultHeight / 2 - radius, mPaint); canvas.restore(); } } catch (Exception e) { @@ -185,10 +199,12 @@ public class AnimCircleImageView extends ImageView { x = mBitmapScaled.getWidth() / 2 - radius; y = mBitmapScaled.getHeight() / 2 - radius; - if (x < 0) + if (x < 0) { x = 0; - if (y < 0) + } + if (y < 0) { y = 0; + } Bitmap mBitmapCropped = Bitmap.createBitmap(mBitmapScaled, x, y, diameter, diameter); return mBitmapCropped; } @@ -200,5 +216,10 @@ public class AnimCircleImageView extends ImageView { public void setDelayMilliseconds(int delayMilliseconds) { this.delayMilliseconds = delayMilliseconds; } + + @Override + public void applySkin() { + imageHelper.applySkin(); + } } diff --git a/modules/mogo-module-media/src/main/java/com/mogo/module/media/window/MediaWindow2.java b/modules/mogo-module-media/src/main/java/com/mogo/module/media/window/MediaWindow2.java index be8aba16ba..ccb2cb0cc8 100644 --- a/modules/mogo-module-media/src/main/java/com/mogo/module/media/window/MediaWindow2.java +++ b/modules/mogo-module-media/src/main/java/com/mogo/module/media/window/MediaWindow2.java @@ -12,6 +12,7 @@ import android.widget.TextView; import com.mogo.commons.debug.DebugConfig; import com.mogo.commons.voice.AIAssist; import com.mogo.commons.voice.IMogoVoiceCmdCallBack; +import com.mogo.module.common.glide.SkinAbleBitmapTarget; import com.mogo.module.media.MediaConstants; import com.mogo.module.media.R; import com.mogo.module.media.ServiceMediaHandler; @@ -92,6 +93,11 @@ public class MediaWindow2 implements IMusicView { return; } + if(!ServiceMediaHandler.getIMogoStatusManager().isMainPageOnResume()){ + Log.d(TAG, "not in front"); + return; + } + if (!mHasAddWindow) { mHasAddWindow = true; mWindowView = @@ -199,10 +205,14 @@ public class MediaWindow2 implements IMusicView { if (mCircleImg != null) { if(mMediaInfoData!=null&&mMediaInfoData.getMediaImg()!=null&&!mMediaInfoData.getMediaImg().isEmpty()) { + int size = + mContext.getResources().getDimensionPixelSize(R.dimen.module_media_pop_window_anim_img_size); + Logger.d(TAG, "overload: " + size); com.bumptech.glide.request.RequestOptions options = new com.bumptech.glide.request.RequestOptions() - .placeholder(R.drawable.module_media_default_music_img); - GlideApp.with(mContext).applyDefaultRequestOptions(options).load(mMediaInfoData.getMediaImg()).into(mCircleImg); + .placeholder(R.drawable.module_media_default_music_img).error(R.drawable.module_media_default_music_img).override(size, size); + GlideApp.with(mContext).asBitmap().apply(options).load(mMediaInfoData.getMediaImg()).into(new SkinAbleBitmapTarget(mCircleImg, options)); +// GlideApp.with(mContext).applyDefaultRequestOptions(options).load(mMediaInfoData.getMediaImg()).into(new SkinAbleBitmapTarget(mCircleImg, options)); }else{ mCircleImg.setImageResource(R.drawable.module_media_default_music_img); } diff --git a/modules/mogo-module-media/src/main/res/drawable-ldpi/module_media_window_alert_bg.9.png b/modules/mogo-module-media/src/main/res/drawable-ldpi/module_media_window_alert_bg.9.png new file mode 100644 index 0000000000..24567d76fc Binary files /dev/null and b/modules/mogo-module-media/src/main/res/drawable-ldpi/module_media_window_alert_bg.9.png differ diff --git a/modules/mogo-module-media/src/main/res/drawable-mdpi/module_media_window_alert_bg.9.png b/modules/mogo-module-media/src/main/res/drawable-mdpi/module_media_window_alert_bg.9.png new file mode 100644 index 0000000000..24567d76fc Binary files /dev/null and b/modules/mogo-module-media/src/main/res/drawable-mdpi/module_media_window_alert_bg.9.png differ diff --git a/modules/mogo-module-media/src/main/res/drawable-xhdpi/module_media_default_music_img.png b/modules/mogo-module-media/src/main/res/drawable-xhdpi/module_media_default_music_img.png index 4aab1a19b3..df81e5d06d 100644 Binary files a/modules/mogo-module-media/src/main/res/drawable-xhdpi/module_media_default_music_img.png and b/modules/mogo-module-media/src/main/res/drawable-xhdpi/module_media_default_music_img.png differ diff --git a/modules/mogo-module-media/src/main/res/drawable-xhdpi/module_media_window_alert_bg.9.png b/modules/mogo-module-media/src/main/res/drawable-xhdpi/module_media_window_alert_bg.9.png new file mode 100644 index 0000000000..96ddb81326 Binary files /dev/null and b/modules/mogo-module-media/src/main/res/drawable-xhdpi/module_media_window_alert_bg.9.png differ diff --git a/modules/mogo-module-media/src/main/res/drawable/module_media_window_alert_bg.xml b/modules/mogo-module-media/src/main/res/drawable/module_media_window_alert_bg.xml deleted file mode 100644 index 372926f342..0000000000 --- a/modules/mogo-module-media/src/main/res/drawable/module_media_window_alert_bg.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-media/src/main/res/values-xhdpi/dimens.xml b/modules/mogo-module-media/src/main/res/values-xhdpi/dimens.xml index a07744e59d..f31888dd72 100644 --- a/modules/mogo-module-media/src/main/res/values-xhdpi/dimens.xml +++ b/modules/mogo-module-media/src/main/res/values-xhdpi/dimens.xml @@ -1,6 +1,6 @@ - 881px + 872px 1067px @@ -61,11 +61,11 @@ 4px 6px - 580px - 120px + 600px + 140px 112px 30px - 90px + 80px 230px 14px 35px diff --git a/modules/mogo-module-media/src/main/res/values/dimens.xml b/modules/mogo-module-media/src/main/res/values/dimens.xml index 372e5babff..9f6a51ce93 100644 --- a/modules/mogo-module-media/src/main/res/values/dimens.xml +++ b/modules/mogo-module-media/src/main/res/values/dimens.xml @@ -1,6 +1,6 @@ - 470px + 462px 573px @@ -61,11 +61,11 @@ 2px 3.2px - 322px - 66.7px + 332px + 76.7px 60px 18px - 48px + 44px 123px 10px 18px diff --git a/modules/mogo-module-push/src/main/res/drawable-ldpi/module_push_message_background.9.png b/modules/mogo-module-push/src/main/res/drawable-ldpi/module_push_message_background.9.png index a4c313e353..bf455a0ea2 100644 Binary files a/modules/mogo-module-push/src/main/res/drawable-ldpi/module_push_message_background.9.png and b/modules/mogo-module-push/src/main/res/drawable-ldpi/module_push_message_background.9.png differ diff --git a/modules/mogo-module-push/src/main/res/drawable-mdpi/module_push_message_background.9.png b/modules/mogo-module-push/src/main/res/drawable-mdpi/module_push_message_background.9.png index a4c313e353..bf455a0ea2 100644 Binary files a/modules/mogo-module-push/src/main/res/drawable-mdpi/module_push_message_background.9.png and b/modules/mogo-module-push/src/main/res/drawable-mdpi/module_push_message_background.9.png differ diff --git a/modules/mogo-module-push/src/main/res/drawable-xhdpi/module_push_message_background.9.png b/modules/mogo-module-push/src/main/res/drawable-xhdpi/module_push_message_background.9.png index 1de561aa65..d4a8803684 100644 Binary files a/modules/mogo-module-push/src/main/res/drawable-xhdpi/module_push_message_background.9.png and b/modules/mogo-module-push/src/main/res/drawable-xhdpi/module_push_message_background.9.png differ diff --git a/modules/mogo-module-push/src/main/res/drawable/module_push_message_background.9.png b/modules/mogo-module-push/src/main/res/drawable/module_push_message_background.9.png index a4c313e353..80ab4b841f 100644 Binary files a/modules/mogo-module-push/src/main/res/drawable/module_push_message_background.9.png and b/modules/mogo-module-push/src/main/res/drawable/module_push_message_background.9.png differ diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerManager.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerManager.java index 26e612592d..701215fb6c 100644 --- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerManager.java +++ b/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerManager.java @@ -977,9 +977,11 @@ public class MapMarkerManager implements IMogoMarkerClickListener, return; } if ( mLastDataResult != null ) { - MarkerServiceHandler.getMarkerManager().removeMarkers( ModuleNames.CARD_TYPE_ROAD_CONDITION ); - drawMarkerByCurrentType( mLastDataResult ); - mLastCheckMarker = null; + runOnTargetThread( ()->{ + MarkerServiceHandler.getMarkerManager().removeMarkers( ModuleNames.CARD_TYPE_ROAD_CONDITION ); + drawMarkerByCurrentType( mLastDataResult ); + mLastCheckMarker = null; + } ); } break; } diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/TanluListWindow.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/TanluListWindow.java index fe3450625c..cc757b123b 100644 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/TanluListWindow.java +++ b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/TanluListWindow.java @@ -204,7 +204,7 @@ public class TanluListWindow extends RelativeLayout implements IMogoMarkerClickL LinearLayoutManager layoutManager = new LinearLayoutManager(mContext, LinearLayoutManager.VERTICAL, false); mLoopRecyclerView.setLayoutManager(layoutManager); - mTanluSlideAdapter = new TanluSlideAdapterNew(mContext, mAnalytics, mTanluModelData, mogoImageloader); + mTanluSlideAdapter = new TanluSlideAdapterNew(mContext, mAnalytics, mTanluModelData, mogoImageloader, mMogoRegisterCenter); mLoopRecyclerView.setAdapter(mTanluSlideAdapter); //保证滑动单页显示 diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/recycler/TanluSlideAdapterNew.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/recycler/TanluSlideAdapterNew.java index d88eb7c9e9..de39f21bd8 100644 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/recycler/TanluSlideAdapterNew.java +++ b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/recycler/TanluSlideAdapterNew.java @@ -5,6 +5,7 @@ import android.animation.AnimatorInflater; import android.animation.AnimatorSet; import android.content.Context; import android.text.TextUtils; +import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -18,6 +19,7 @@ import androidx.recyclerview.widget.RecyclerView; import com.bumptech.glide.Glide; import com.bumptech.glide.request.RequestOptions; import com.mogo.commons.debug.DebugConfig; +import com.mogo.map.uicontroller.EnumMapUI; import com.mogo.module.common.entity.MarkerExploreWay; import com.mogo.module.common.glide.SkinAbleBitmapTarget; import com.mogo.module.tanlu.R; @@ -30,9 +32,13 @@ import com.mogo.module.tanlu.model.event.StartPlayInfo; import com.mogo.module.tanlu.model.event.VoiceControlUpInfo; import com.mogo.module.tanlu.util.ChartUtil; import com.mogo.module.tanlu.video.SimpleCoverVideoPlayer; +import com.mogo.module.tanlu.view.RoundLayout; +import com.mogo.service.adas.IMogoADASControlStatusChangedListener; import com.mogo.service.analytics.IMogoAnalytics; import com.mogo.service.imageloader.IMogoImageloader; import com.mogo.service.imageloader.MogoImageView; +import com.mogo.service.module.IMogoRegisterCenter; +import com.mogo.skin.support.SkinMode; import com.mogo.utils.TipToast; import com.mogo.utils.logger.Logger; import com.shuyu.gsyvideoplayer.builder.GSYVideoOptionBuilder; @@ -57,7 +63,7 @@ import static com.mogo.module.tanlu.util.Utils.handleDistance; * @description * @since 2020/3/11 */ -public class TanluSlideAdapterNew extends RecyclerView.Adapter { +public class TanluSlideAdapterNew extends RecyclerView.Adapter implements IMogoADASControlStatusChangedListener { private List markerExploreWayList = new ArrayList<>(); private static final String TAG = "TanluSlideAdapterNew"; private Context mContext; @@ -66,7 +72,7 @@ public class TanluSlideAdapterNew extends RecyclerView.Adapter list = new HashMap<>(); - public TanluSlideAdapterNew(Context context, IMogoAnalytics analytics, TanluModelData tanluModelData, IMogoImageloader mogoImageloader) { + public TanluSlideAdapterNew(Context context, IMogoAnalytics analytics, TanluModelData tanluModelData, IMogoImageloader mogoImageloader, + IMogoRegisterCenter mogoRegisterCenter) { this.mContext = context; this.mAnalytics = analytics; this.mTanluModelData = tanluModelData; this.mogoImageloader = mogoImageloader; + mogoRegisterCenter.registerADASControlStatusChangedListener( TAG, this ); + EventBus.getDefault().register(this); } @@ -121,6 +131,7 @@ public class TanluSlideAdapterNew extends RecyclerView.Adapter "); + mRoundLayout.setBackgroundResource(R.drawable.shape_tanlu_top_bg); + break; + + case Type_Light: + Log.d("liyz", "Type_Light ---------> "); + mRoundLayout.setBackgroundResource(R.drawable.shape_tanlu_top_bg_light); + break; + } + } + + @Override + public void onCarStatusChanged(boolean visible) { + + } } diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/video/SimpleCoverVideoPlayer.kt b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/video/SimpleCoverVideoPlayer.kt index 95bfc5700e..3096e93c88 100644 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/video/SimpleCoverVideoPlayer.kt +++ b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/video/SimpleCoverVideoPlayer.kt @@ -8,6 +8,7 @@ import android.view.View import android.widget.ImageView import com.bumptech.glide.Glide import com.bumptech.glide.request.RequestOptions +import com.mogo.module.common.glide.SkinAbleBitmapTarget import com.mogo.module.tanlu.R import com.shuyu.gsyvideoplayer.GSYVideoManager import com.shuyu.gsyvideoplayer.utils.GSYVideoType @@ -57,13 +58,12 @@ class SimpleCoverVideoPlayer : StandardGSYVideoPlayer { fun loadCoverImage(url: String, mContext: Context) { //加载图片 val requestOptions = RequestOptions() - .placeholder(R.drawable.tanlu_normal_image) +// .placeholder(R.drawable.tanlu_normal_image) .error(R.drawable.tanlu_normal_image) - Glide.with(mContext) + Glide.with(mContext).asBitmap() .load(url) .apply(requestOptions) - .into(coverImage) - + .into(SkinAbleBitmapTarget(coverImage, requestOptions)) } diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/view/RoundLayout.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/view/RoundLayout.java index 9ca0a4784f..5912f8c56a 100644 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/view/RoundLayout.java +++ b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/view/RoundLayout.java @@ -8,7 +8,11 @@ import android.graphics.RectF; import android.util.AttributeSet; import android.widget.RelativeLayout; +import androidx.annotation.DrawableRes; + import com.mogo.module.tanlu.R; +import com.mogo.skin.support.IMogoSkinCompatSupportable; +import com.mogo.skin.support.helper.MogoSkinCompatBackgroundHelperDelegate; /** * author : donghongyu @@ -17,29 +21,34 @@ import com.mogo.module.tanlu.R; * desc : * version: 1.0 */ -public class RoundLayout extends RelativeLayout { +public class RoundLayout extends RelativeLayout implements IMogoSkinCompatSupportable { private float roundLayoutRadius = 14f; private Path roundPath; private RectF rectF; + private MogoSkinCompatBackgroundHelperDelegate mBackgroundTintHelper; public RoundLayout(Context context) { this(context, null); } - public RoundLayout(Context context, AttributeSet attrs, int defStyleAttr) { - this(context, attrs); + public RoundLayout(Context context, AttributeSet attrs) { + this(context, attrs, 0); } - public RoundLayout(Context context, AttributeSet attrs) { - super(context, attrs); + public RoundLayout(Context context, AttributeSet attrs, int defStyleAttr) { + super(context, attrs, defStyleAttr); TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.RoundLayout); roundLayoutRadius = typedArray.getDimensionPixelSize(R.styleable.RoundLayout_roundLayoutRadius, (int) roundLayoutRadius); typedArray.recycle(); init(); + + mBackgroundTintHelper = new MogoSkinCompatBackgroundHelperDelegate(this); + mBackgroundTintHelper.loadFromAttributes(attrs, defStyleAttr); } + private void init() { setWillNotDraw(false);//如果你继承的是ViewGroup,注意此行,否则draw方法是不会回调的; roundPath = new Path(); @@ -58,6 +67,15 @@ public class RoundLayout extends RelativeLayout { postInvalidate(); } + + @Override + public void setBackgroundResource(@DrawableRes int resId) { + super.setBackgroundResource(resId); + if (mBackgroundTintHelper != null) { + mBackgroundTintHelper.onSetBackgroundResource(resId); + } + } + @Override protected void onLayout(boolean changed, int l, int t, int r, int b) { super.onLayout(changed, l, t, r, b); @@ -72,5 +90,13 @@ public class RoundLayout extends RelativeLayout { } super.draw(canvas); } + + @Override + public void applySkin() { + if (mBackgroundTintHelper != null) { + mBackgroundTintHelper.applySkin(); + } + } + } diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/tanlu_default_black_logo.png b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/tanlu_default_black_logo.png deleted file mode 100644 index 5480b6d165..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/tanlu_default_black_logo.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/tanlu_icon_logo.png b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/tanlu_icon_logo.png new file mode 100644 index 0000000000..957c298fd6 Binary files /dev/null and b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/tanlu_icon_logo.png differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/tanlu_default_black_logo.png b/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/tanlu_default_black_logo.png deleted file mode 100644 index 5480b6d165..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/tanlu_default_black_logo.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/tanlu_icon_logo.png b/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/tanlu_icon_logo.png new file mode 100644 index 0000000000..957c298fd6 Binary files /dev/null and b/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/tanlu_icon_logo.png differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi-1920x1000/tanlu_default_black_logo.png b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi-1920x1000/tanlu_default_black_logo.png deleted file mode 100644 index e02a57044f..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi-1920x1000/tanlu_default_black_logo.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi-1920x1000/tanlu_icon_logo.png b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi-1920x1000/tanlu_icon_logo.png new file mode 100644 index 0000000000..dabf25dbbb Binary files /dev/null and b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi-1920x1000/tanlu_icon_logo.png differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi-1920x1000/tanlu_top_bg.9.png b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi-1920x1000/tanlu_top_bg.9.png new file mode 100644 index 0000000000..f5010b2c44 Binary files /dev/null and b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi-1920x1000/tanlu_top_bg.9.png differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_default_black_logo.png b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_default_black_logo.png deleted file mode 100644 index e02a57044f..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_default_black_logo.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_icon_logo.png b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_icon_logo.png new file mode 100644 index 0000000000..dabf25dbbb Binary files /dev/null and b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_icon_logo.png differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_top_bg.9.png b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_top_bg.9.png new file mode 100644 index 0000000000..f5010b2c44 Binary files /dev/null and b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_top_bg.9.png differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable/shape_tanlu_top_bg.xml b/modules/mogo-module-tanlu/src/main/res/drawable/shape_tanlu_top_bg.xml new file mode 100644 index 0000000000..7ef399ca1a --- /dev/null +++ b/modules/mogo-module-tanlu/src/main/res/drawable/shape_tanlu_top_bg.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/drawable/shape_tanlu_top_bg_light.xml b/modules/mogo-module-tanlu/src/main/res/drawable/shape_tanlu_top_bg_light.xml new file mode 100644 index 0000000000..4eba256888 --- /dev/null +++ b/modules/mogo-module-tanlu/src/main/res/drawable/shape_tanlu_top_bg_light.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/drawable/tanlu_alert_window_bg.xml b/modules/mogo-module-tanlu/src/main/res/drawable/tanlu_alert_window_bg.xml new file mode 100644 index 0000000000..7ae04a2bed --- /dev/null +++ b/modules/mogo-module-tanlu/src/main/res/drawable/tanlu_alert_window_bg.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/layout/tanlu_item_main_media_recycler_new.xml b/modules/mogo-module-tanlu/src/main/res/layout/tanlu_item_main_media_recycler_new.xml index 81c7cc2c7d..eb9842f999 100644 --- a/modules/mogo-module-tanlu/src/main/res/layout/tanlu_item_main_media_recycler_new.xml +++ b/modules/mogo-module-tanlu/src/main/res/layout/tanlu_item_main_media_recycler_new.xml @@ -2,29 +2,18 @@ - - - - - - - - - - + android:layout_height="wrap_content"> + + android:background="@drawable/shape_tanlu_top_bg"> - - + android:scaleType="center" + app:miv_failureHolder="@drawable/tanlu_icon_logo" + app:miv_overlayImageId="@drawable/tanlu_icon_logo" + app:miv_placeHolder="@drawable/tanlu_icon_logo" /> - + + + + + + + + @@ -141,16 +137,16 @@ android:layout_width="@dimen/tanlu_image_size" android:layout_height="@dimen/tanlu_image_size" android:layout_marginRight="@dimen/tanlu_module_margin_left" - android:visibility="gone" - android:src="@drawable/selector_chat_btn" /> + android:src="@drawable/selector_chat_btn" + android:visibility="gone" /> + android:gravity="center"> diff --git a/modules/mogo-module-tanlu/src/main/res/layout/tanlu_main_media_recycler_new.xml b/modules/mogo-module-tanlu/src/main/res/layout/tanlu_main_media_recycler_new.xml index e4c7898356..409302fbaf 100644 --- a/modules/mogo-module-tanlu/src/main/res/layout/tanlu_main_media_recycler_new.xml +++ b/modules/mogo-module-tanlu/src/main/res/layout/tanlu_main_media_recycler_new.xml @@ -1,14 +1,16 @@ + android:background="@drawable/tanlu_alert_window_bg"> - + android:layout_height="match_parent" + tools:listitem="@layout/tanlu_item_main_media_recycler_new" + /> \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/values-mdpi/dimens.xml b/modules/mogo-module-tanlu/src/main/res/values-mdpi/dimens.xml new file mode 100644 index 0000000000..7716b8ccc7 --- /dev/null +++ b/modules/mogo-module-tanlu/src/main/res/values-mdpi/dimens.xml @@ -0,0 +1,99 @@ + + + + 52px + 52px + 48px + 48px + 72px + 5px + + 56px + 56px + 96px + 96px + 90px + 700px + 10px + + 72px + 25px + 25px + 16px + 48px + 22px + 700px + + + 5px + 15px + 2px + 19px + 136px + 44px + 2px + 109px + 10px + 23px + 30px + 28px + 16px + 22px + 26px + + + 6px + + 400px + 150px + 80px + 32px + + 260px + 44px + + + 18px + 14px + 15px + 13px + 16px + + + 418px + 278px + 69px + 22px + 36px + 18px + 32px + + 20px + 56px + 23px + + 10px + 8px + + + 642px + 186px + 176px + 250px + 172px + 45px + + 13px + 8px + 7px + 17px + 3px + 18px + 26px + + 28px + 56px + 6px + 16px + + \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/values-xhdpi-1920x1000/dimens.xml b/modules/mogo-module-tanlu/src/main/res/values-xhdpi-1920x1000/dimens.xml index f67c962818..4062891c80 100644 --- a/modules/mogo-module-tanlu/src/main/res/values-xhdpi-1920x1000/dimens.xml +++ b/modules/mogo-module-tanlu/src/main/res/values-xhdpi-1920x1000/dimens.xml @@ -25,7 +25,7 @@ 40px 800px - 14px + 11px 28px 4px 32px @@ -77,22 +77,23 @@ 1233px - 300px + 326px + 306px 480px - 270px + 290px 80px - 20px - 15px - 25px - 15px - 5px + 19px + 12px + 24px + 30px + 9px 27px 46px 50px 90px - 6px + 10px 30px diff --git a/modules/mogo-module-tanlu/src/main/res/values-xhdpi/dimens.xml b/modules/mogo-module-tanlu/src/main/res/values-xhdpi/dimens.xml index bfd073df5f..88af7354b4 100644 --- a/modules/mogo-module-tanlu/src/main/res/values-xhdpi/dimens.xml +++ b/modules/mogo-module-tanlu/src/main/res/values-xhdpi/dimens.xml @@ -25,7 +25,7 @@ 40px 800px - 30px + 11px 28px 4px 32px @@ -77,22 +77,23 @@ 1060px - 350px - 480px - 320px + 330px + 306px + 421px + 290px 80px - 23px - 15px - 25px + 19px + 13px + 24px 15px - 10px + 9px 27px 46px 50px 98px - 6px + 10px 30px diff --git a/modules/mogo-module-tanlu/src/main/res/values/colors.xml b/modules/mogo-module-tanlu/src/main/res/values/colors.xml index ff1c78b482..e3dc6f20f6 100644 --- a/modules/mogo-module-tanlu/src/main/res/values/colors.xml +++ b/modules/mogo-module-tanlu/src/main/res/values/colors.xml @@ -38,6 +38,7 @@ #99666666 #999999 #99FFFFFF + #99FFFFFF #59FFFFFF #FFFFFF @@ -51,5 +52,7 @@ #50526E #5E6079 #3F4057 + #555A75 + #F5F5F5 diff --git a/modules/mogo-module-tanlu/src/main/res/values/dimens.xml b/modules/mogo-module-tanlu/src/main/res/values/dimens.xml index a39e44cd6d..7716b8ccc7 100644 --- a/modules/mogo-module-tanlu/src/main/res/values/dimens.xml +++ b/modules/mogo-module-tanlu/src/main/res/values/dimens.xml @@ -25,7 +25,7 @@ 700px - 10px + 5px 15px 2px 19px @@ -77,22 +77,23 @@ 642px - 194px - 266px - 194px + 186px + 176px + 250px + 172px 45px - 16px + 13px 8px - 13px - 15px - 10px + 7px + 17px + 3px 18px 26px 28px 56px - 3px + 6px 16px \ No newline at end of file diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/SpacesItemDecoration.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/SpacesItemDecoration.java index 005984f991..f0e2739521 100644 --- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/SpacesItemDecoration.java +++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/SpacesItemDecoration.java @@ -20,13 +20,6 @@ public class SpacesItemDecoration extends RecyclerView.ItemDecoration { @Override public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) { - outRect.left = space; - outRect.right = space; outRect.bottom = space; - - // Add top margin only for the first item to avoid double space between items - if (parent.getChildPosition(view) == 0) { - outRect.top = space; - } } } diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/adapter/V2XSurroundingAdapter.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/adapter/V2XSurroundingAdapter.java index 82f1820538..fff99105fd 100644 --- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/adapter/V2XSurroundingAdapter.java +++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/adapter/V2XSurroundingAdapter.java @@ -87,16 +87,16 @@ public class V2XSurroundingAdapter extends RecyclerView.Adapter try { - rbScenarioHistory?.isChecked = true + mRbScenarioHistory?.isChecked = true } catch (e: java.lang.Exception) { e.printStackTrace() } @@ -60,7 +71,7 @@ class V2XEventPanelFragment : MvpFragment try { - rbSurroundingEvent?.isChecked = true + mRbSurroundingEvent?.isChecked = true } catch (e: java.lang.Exception) { e.printStackTrace() } @@ -69,7 +80,7 @@ class V2XEventPanelFragment : MvpFragment try { - rbShareEvents?.isChecked = true + mRbShareEvents?.isChecked = true } catch (e: java.lang.Exception) { e.printStackTrace() } @@ -92,48 +103,75 @@ class V2XEventPanelFragment : MvpFragment + mRgTabSelect?.setOnCheckedChangeListener { group, checkedId -> when (checkedId) { R.id.rbScenarioHistory -> { + // 更改选中是否加粗 + mRbScenarioHistory?.typeface = Typeface.defaultFromStyle(Typeface.BOLD) + mRbSurroundingEvent?.typeface = Typeface.defaultFromStyle(Typeface.NORMAL) + mRbShareEvents?.typeface = Typeface.defaultFromStyle(Typeface.NORMAL) + TrackUtils.trackV2xHistoryEvent(2) - vpEventPanel.setCurrentItem(0, false) + mVpEventPanel?.setCurrentItem(0, false) } R.id.rbSurroundingEvent -> { + // 更改选中是否加粗 + mRbScenarioHistory?.typeface = Typeface.defaultFromStyle(Typeface.NORMAL) + mRbSurroundingEvent?.typeface = Typeface.defaultFromStyle(Typeface.BOLD) + mRbShareEvents?.typeface = Typeface.defaultFromStyle(Typeface.NORMAL) + TrackUtils.trackV2xHistoryEvent(3) - vpEventPanel.setCurrentItem(1, false) + mVpEventPanel?.setCurrentItem(1, false) } R.id.rbShareEvents -> { + // 更改选中是否加粗 + mRbScenarioHistory?.typeface = Typeface.defaultFromStyle(Typeface.NORMAL) + mRbSurroundingEvent?.typeface = Typeface.defaultFromStyle(Typeface.NORMAL) + mRbShareEvents?.typeface = Typeface.defaultFromStyle(Typeface.BOLD) + TrackUtils.trackV2xHistoryEvent(4) - vpEventPanel.setCurrentItem(2, false) + mVpEventPanel?.setCurrentItem(2, false) } } } - btnHidePanels.setOnClickListener { + mBtnHidePanels?.setOnClickListener { TrackUtils.trackV2xHistoryEvent(5) hidePanel() } mV2XEventPanelHistoryCountView = V2XEventPanelHistoryCountView(context) mV2XEventPanelHistoryCountView!!.setOnClickListener { - if (clPanelContainer != null) { + if (mClPanelContainer == null) { + mClPanelContainer = mRootView.findViewById(R.id.clPanelContainer); + } + if (mClPanelContainer != null) { if (!isPanelShow()) { TrackUtils.trackV2xHistoryEvent(1) showPanel() } } } - V2XServiceManager.getMogoEntranceButtonController().addBottomLayerView(mV2XEventPanelHistoryCountView) + V2XServiceManager.getMogoEntranceButtonController() + .addBottomLayerView(mV2XEventPanelHistoryCountView) changeEventCount() } catch (e: Exception) { e.printStackTrace() @@ -151,7 +189,7 @@ class V2XEventPanelFragment : MvpFragment - + - - + \ No newline at end of file diff --git a/modules/mogo-module-v2x/src/main/res/drawable/v2x_alert_window_bg.xml b/modules/mogo-module-v2x/src/main/res/drawable/v2x_alert_window_bg.xml index 376de58348..c771e691e5 100644 --- a/modules/mogo-module-v2x/src/main/res/drawable/v2x_alert_window_bg.xml +++ b/modules/mogo-module-v2x/src/main/res/drawable/v2x_alert_window_bg.xml @@ -1,11 +1,38 @@ - - - - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/modules/mogo-module-v2x/src/main/res/drawable/v2x_panel_color_bg.xml b/modules/mogo-module-v2x/src/main/res/drawable/v2x_panel_color_bg.xml index 2c862044c3..8c81ded7de 100644 --- a/modules/mogo-module-v2x/src/main/res/drawable/v2x_panel_color_bg.xml +++ b/modules/mogo-module-v2x/src/main/res/drawable/v2x_panel_color_bg.xml @@ -3,5 +3,5 @@ - + \ No newline at end of file diff --git a/modules/mogo-module-v2x/src/main/res/layout/item_v2x_event_detail.xml b/modules/mogo-module-v2x/src/main/res/layout/item_v2x_event_detail.xml index 7e587aa3dc..022db7da53 100644 --- a/modules/mogo-module-v2x/src/main/res/layout/item_v2x_event_detail.xml +++ b/modules/mogo-module-v2x/src/main/res/layout/item_v2x_event_detail.xml @@ -5,29 +5,29 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/v2x_alert_window_bg" - android:paddingStart="@dimen/dp_15" - android:paddingTop="@dimen/dp_15" - android:paddingBottom="@dimen/dp_15" - app:roundLayoutRadius="@dimen/dp_40"> + android:paddingTop="@dimen/dp_20" + android:paddingBottom="@dimen/dp_20" + app:roundLayoutRadius="@dimen/dp_30"> + app:roundLayoutRadius="@dimen/dp_18"> + app:miv_failureHolder="@drawable/v2x_icon_live_logo" + app:miv_overlayImageId="@drawable/v2x_icon_live_logo" + app:miv_placeHolder="@drawable/v2x_icon_live_logo" /> @@ -77,7 +77,7 @@ android:id="@+id/ivEventDistanceLogo" android:layout_width="@dimen/dp_35" android:layout_height="@dimen/dp_35" - android:layout_marginTop="@dimen/dp_20" + android:layout_marginTop="@dimen/dp_5" android:src="@drawable/v2x_icon_help_navi" app:layout_constraintStart_toStartOf="@id/tvEventTypeTitle" app:layout_constraintTop_toBottomOf="@+id/tvEventAddress" /> @@ -112,7 +112,7 @@ android:id="@+id/ivEventHead" android:layout_width="@dimen/dp_55" android:layout_height="@dimen/dp_55" - android:layout_marginEnd="@dimen/dp_33" + android:layout_marginEnd="@dimen/dp_28" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="@+id/tvEventTypeTitle" app:miv_borderColor="#4cffffff" @@ -122,77 +122,87 @@ app:miv_shape="circle" app:miv_shapeBorderWidth="@dimen/dp_4" /> - + app:layout_constraintTop_toBottomOf="@+id/ivEventDistanceLogo"> - + - + - + - + + + + + + - \ No newline at end of file diff --git a/modules/mogo-module-v2x/src/main/res/layout/item_v2x_event_detail_stub_live.xml b/modules/mogo-module-v2x/src/main/res/layout/item_v2x_event_detail_stub_live.xml index 20bacf4ae4..dd7f9200b1 100644 --- a/modules/mogo-module-v2x/src/main/res/layout/item_v2x_event_detail_stub_live.xml +++ b/modules/mogo-module-v2x/src/main/res/layout/item_v2x_event_detail_stub_live.xml @@ -7,7 +7,7 @@ android:background="@drawable/v2x_alert_window_bg" android:gravity="center" app:roundLayoutRadius="@dimen/dp_40" - tools:layout_height="@dimen/dp_382"> + tools:layout_height="@dimen/module_v2x_event_window_height"> + android:paddingTop="@dimen/dp_40" + android:paddingBottom="@dimen/dp_40">