From c81e1bb564b5a20073cf81171a4c21e234a92260 Mon Sep 17 00:00:00 2001 From: zhongchao Date: Mon, 31 Jul 2023 16:11:37 +0800 Subject: [PATCH] [3.4.0] code opt of array and non use code --- .../bus/passenger/view/ConsultVideoPlayer.kt | 4 +- .../common/module/map/CommonAmapNaviVIew.kt | 104 +++++++++--------- .../module/wigets/MineGradientDrawable.kt | 4 +- .../passenger/widget/ConsultVideoPlayer.kt | 4 +- 4 files changed, 58 insertions(+), 58 deletions(-) diff --git a/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/view/ConsultVideoPlayer.kt b/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/view/ConsultVideoPlayer.kt index 73c5ba7cb7..02b27b0bca 100644 --- a/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/view/ConsultVideoPlayer.kt +++ b/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/view/ConsultVideoPlayer.kt @@ -93,8 +93,8 @@ class ConsultVideoPlayer : StandardGSYVideoPlayer { // layoutParams.height = 320 // mTopContainer.layoutParams = layoutParams val background = layoutBottom.background as GradientDrawable - val x = arrayOf(12f, 12f,12f, 12f,12f, 12f,12f, 12f) - background.cornerRadii = x.toFloatArray() + val x = floatArrayOf(12f, 12f,12f, 12f,12f, 12f,12f, 12f) + background.cornerRadii = x layoutBottom.background = background //fullscreenButton.setPadding(0,0,0,0) diff --git a/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/map/CommonAmapNaviVIew.kt b/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/map/CommonAmapNaviVIew.kt index 887729704f..bc16c9fb2b 100644 --- a/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/map/CommonAmapNaviVIew.kt +++ b/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/map/CommonAmapNaviVIew.kt @@ -193,57 +193,57 @@ class CommonAmapNaviVIew @JvmOverloads constructor( amapNaviView.onDestroy() } - var array = arrayOf( - "直行车道", - "左转车道", - "左转或直行车道", - "右转车道", - "右转或直行车道", - "左掉头车道", - "左转或者右转车道", - " 左转或右转或直行车道", - "右转掉头车道", - "直行或左转掉头车道", - "直行或右转掉头车道", - "左转或左掉头车道", - "右转或右掉头车道", - "直行并且车道扩展", - "左转+左掉头+扩展", - "不可以选择该车道", - "直行+左转+左掉头车道", - "右转+左掉头", - "左转+右转+左掉头", - "直行+右转+左掉头", - "左转+右掉头", - "公交车道", - "空车道", - "可变车道" - ) +// var array = arrayOf( +// "直行车道", +// "左转车道", +// "左转或直行车道", +// "右转车道", +// "右转或直行车道", +// "左掉头车道", +// "左转或者右转车道", +// " 左转或右转或直行车道", +// "右转掉头车道", +// "直行或左转掉头车道", +// "直行或右转掉头车道", +// "左转或左掉头车道", +// "右转或右掉头车道", +// "直行并且车道扩展", +// "左转+左掉头+扩展", +// "不可以选择该车道", +// "直行+左转+左掉头车道", +// "右转+左掉头", +// "左转+右转+左掉头", +// "直行+右转+左掉头", +// "左转+右掉头", +// "公交车道", +// "空车道", +// "可变车道" +// ) - var actions = arrayOf( - "直行", - "左转", - "左转或直行", - "右转", - "右转或这行", - "左掉头", - "左转或者右转", - " 左转或右转或直行", - "右转掉头", - "直行或左转掉头", - "直行或右转掉头", - "左转或左掉头", - "右转或右掉头", - "直行并且车道扩展", - "左转+左掉头+扩展", - "不可以选择", - "直行+左转+左掉头", - "右转+左掉头", - "左转+右转+左掉头", - "直行+右转+左掉头", - "左转+右掉头", - "公交车道", - "空车道", - "可变车道" - ) +// var actions = arrayOf( +// "直行", +// "左转", +// "左转或直行", +// "右转", +// "右转或这行", +// "左掉头", +// "左转或者右转", +// " 左转或右转或直行", +// "右转掉头", +// "直行或左转掉头", +// "直行或右转掉头", +// "左转或左掉头", +// "右转或右掉头", +// "直行并且车道扩展", +// "左转+左掉头+扩展", +// "不可以选择", +// "直行+左转+左掉头", +// "右转+左掉头", +// "左转+右转+左掉头", +// "直行+右转+左掉头", +// "左转+右掉头", +// "公交车道", +// "空车道", +// "可变车道" +// ) } \ No newline at end of file diff --git a/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/wigets/MineGradientDrawable.kt b/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/wigets/MineGradientDrawable.kt index ba24620c67..9d2d711134 100644 --- a/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/wigets/MineGradientDrawable.kt +++ b/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/wigets/MineGradientDrawable.kt @@ -17,7 +17,7 @@ class MineGradientDrawable(colorStart: Int = Color.BLUE,colorEnd:Int = Color.RED private var colorWith = 4f private var transparentWidth = 4f - private var index = arrayOf(0.53,0.76,0.92) + private var index = doubleArrayOf(0.53,0.76,0.92) private var tartHeight = 0 private var heightDex = 0 @@ -29,7 +29,7 @@ class MineGradientDrawable(colorStart: Int = Color.BLUE,colorEnd:Int = Color.RED this.colorEnd = colorEnd this.tartHeight = height mPaint.isAntiAlias = true - index.forEachIndexed { index, d -> + index.forEachIndexed { _, d -> currendDex += (1-d)/2 } } diff --git a/OCH/mogo-och-taxi-passenger/src/main/java/com/mogo/och/taxi/passenger/widget/ConsultVideoPlayer.kt b/OCH/mogo-och-taxi-passenger/src/main/java/com/mogo/och/taxi/passenger/widget/ConsultVideoPlayer.kt index 853386009a..06e713a990 100644 --- a/OCH/mogo-och-taxi-passenger/src/main/java/com/mogo/och/taxi/passenger/widget/ConsultVideoPlayer.kt +++ b/OCH/mogo-och-taxi-passenger/src/main/java/com/mogo/och/taxi/passenger/widget/ConsultVideoPlayer.kt @@ -98,8 +98,8 @@ class ConsultVideoPlayer : StandardGSYVideoPlayer { layoutParams.height = 320 mTopContainer.layoutParams = layoutParams val background = layoutBottom.background as GradientDrawable - val x = arrayOf(12f, 12f,12f, 12f,12f, 12f,12f, 12f) - background.cornerRadii = x.toFloatArray() + val x = floatArrayOf(12f, 12f,12f, 12f,12f, 12f,12f, 12f) + background.cornerRadii = x layoutBottom.background = background