[6.7.0][状态栏改版] 代码提交
1
.java-version
Normal file
@@ -0,0 +1 @@
|
||||
11.0.16
|
||||
@@ -36,6 +36,7 @@ import com.mogo.och.common.module.biz.login.LoginStatusManager
|
||||
import com.mogo.och.common.module.biz.provider.CommonService
|
||||
import com.mogo.och.common.module.constant.OchCommonConst
|
||||
import com.mogo.och.common.module.manager.logchainanalytic.OchChainLogManager
|
||||
import me.jessyan.autosize.utils.AutoSizeUtils
|
||||
|
||||
/**
|
||||
* 网约车小巴业务实现入口
|
||||
@@ -262,7 +263,7 @@ abstract class FacadeProvider : IMoGoFunctionProvider, ILoginCallback {
|
||||
statusBarView.tag = "status_bar"
|
||||
val statusBarLP = FrameLayout.LayoutParams(
|
||||
ViewGroup.LayoutParams.MATCH_PARENT,
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT,
|
||||
AutoSizeUtils.dp2px(it, 72.0f),
|
||||
)
|
||||
statusBarLP.topMargin = 0
|
||||
statusBarLP.gravity = Gravity.TOP
|
||||
|
||||
12
build.gradle
@@ -6,9 +6,10 @@ buildscript {
|
||||
apply from: rootProject.file('gradle/ext.gradle')
|
||||
repositories {
|
||||
mavenLocal()
|
||||
maven { url 'https://nexus.zhidaoauto.com/repository/maven-snapshot/' }
|
||||
maven { url 'https://nexus.zhidaoauto.com/repository/maven-releases/' }
|
||||
maven { url 'https://nexus.zhidaoauto.com/repository/maven-public/' }
|
||||
maven { url 'http://127.0.0.1:9921/nexus/content/groups/zhidao_group/' }
|
||||
// maven { url 'https://nexus.zhidaoauto.com/repository/maven-snapshot/' }
|
||||
// maven { url 'https://nexus.zhidaoauto.com/repository/maven-releases/' }
|
||||
// maven { url 'https://nexus.zhidaoauto.com/repository/maven-public/' }
|
||||
maven { url 'https://storage.zego.im/maven' }
|
||||
maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' }
|
||||
maven { url 'https://maven.aliyun.com/repository/public' }
|
||||
@@ -52,8 +53,9 @@ buildscript {
|
||||
allprojects {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
maven { url 'http://nexus.zhidaoauto.com/repository/maven-releases/' }
|
||||
maven { url 'http://nexus.zhidaoauto.com/repository/maven-public/' }
|
||||
maven { url 'http://127.0.0.1:9921/nexus/content/groups/zhidao_group/' }
|
||||
// maven { url 'https://nexus.zhidaoauto.com/repository/maven-releases/' }
|
||||
// maven { url 'https://nexus.zhidaoauto.com/repository/maven-public/' }
|
||||
maven { url 'https://storage.zego.im/maven' }
|
||||
maven { url 'https://maven.aliyun.com/repository/public' }
|
||||
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
|
||||
|
||||
@@ -15,10 +15,10 @@ internal class StatusModel : ViewModel() {
|
||||
val DEFAULTS = Pair(null, ArrayList<Status>().also {
|
||||
it += OverViewStatus()
|
||||
it += FSMStatus(FSMStateCode.UnKnown, "")
|
||||
it += RTKStatus("", -1)
|
||||
it += IpcStatus(CallerAutoPilotStatusListenerManager.isConnect())
|
||||
it += CanStatus(false)
|
||||
// it += TracingStatus(UNKNOWN)
|
||||
it += RTKStatus("", -1)
|
||||
// it += NetStatus(false)
|
||||
// it += GpsStatus(enabled = false, isGranted = false)
|
||||
it += SteerStatus(0f)
|
||||
|
||||
@@ -61,7 +61,7 @@ internal class StatusView(private val model: StatusModel, ctx: Context): Constra
|
||||
itx.addItemDecoration(
|
||||
CommonDividerItemDecoration.Builder()
|
||||
.spanCountTBCare(false)
|
||||
.horizontalInnerSpace(10.PX)
|
||||
.horizontalInnerSpace(30.PX)
|
||||
.build()
|
||||
)
|
||||
}
|
||||
|
||||
@@ -9,8 +9,6 @@ import androidx.core.content.ContextCompat
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.utilcode.kotlin.onClick
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_DEVA
|
||||
import com.zhjt.mogo_core_function_devatools.R
|
||||
import com.zhjt.mogo_core_function_devatools.R.drawable
|
||||
import com.zhjt.mogo_core_function_devatools.status.entity.CanStatus
|
||||
@@ -21,58 +19,53 @@ import com.zhjt.mogo_core_function_devatools.status.entity.IpcStatus
|
||||
import com.zhjt.mogo_core_function_devatools.status.entity.OverViewStatus
|
||||
import com.zhjt.mogo_core_function_devatools.status.entity.RTKStatus
|
||||
import com.zhjt.mogo_core_function_devatools.status.entity.Status
|
||||
import com.zhjt.mogo_core_function_devatools.status.entity.TracingStatus
|
||||
import com.zhjt.mogo_core_function_devatools.status.entity.TracingStatus.Tracing.MAP_DATA_EXIST
|
||||
import com.zhjt.mogo_core_function_devatools.status.entity.TracingStatus.Tracing.MAP_DATA_NOT_EXIST
|
||||
import com.zhjt.mogo_core_function_devatools.status.entity.TracingStatus.Tracing.MAP_TRA_TYPE
|
||||
import com.zhjt.mogo_core_function_devatools.status.entity.TracingStatus.Tracing.ROUTE_FAILED
|
||||
import com.zhjt.mogo_core_function_devatools.status.entity.TracingStatus.Tracing.ROUTE_LOADED
|
||||
import com.zhjt.mogo_core_function_devatools.status.entity.TracingStatus.Tracing.TRACK_FINDED
|
||||
import com.zhjt.mogo_core_function_devatools.status.entity.TracingStatus.Tracing.TRACK_LOADED
|
||||
import com.zhjt.mogo_core_function_devatools.status.entity.TracingStatus.Tracing.TRACK_LOAD_FAIL
|
||||
import com.zhjt.mogo_core_function_devatools.status.entity.TracingStatus.Tracing.TRACK_NOT_EXIST
|
||||
import com.zhjt.mogo_core_function_devatools.status.entity.TracingStatus.Tracing.UNKNOWN
|
||||
import com.zhjt.mogo_core_function_devatools.status.ui.adapter.StatusAdapter.StatusViewHolder
|
||||
import me.jessyan.autosize.AutoSizeCompat
|
||||
|
||||
internal class StatusAdapter(val ctx: Context, var data: List<Status>): RecyclerView.Adapter<StatusViewHolder>() {
|
||||
internal class StatusAdapter(val ctx: Context, var data: List<Status>) : RecyclerView.Adapter<StatusViewHolder>() {
|
||||
|
||||
companion object {
|
||||
const val TAG = "StatusAdapter"
|
||||
private const val ITEM_TYPE_NORMAL = 1
|
||||
private const val ITEM_TYPE_OVER_VIEW = 2
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): StatusViewHolder =
|
||||
StatusViewHolder(LayoutInflater.from(ctx).inflate(R.layout.layout_status_bar_item, parent, false))
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): StatusViewHolder {
|
||||
if (viewType == ITEM_TYPE_NORMAL) {
|
||||
return NormalViewHolder(LayoutInflater.from(parent.context).inflate(R.layout.layout_status_bar_item, parent, false))
|
||||
}
|
||||
return OverViewHolder(LayoutInflater.from(parent.context).inflate(R.layout.layout_status_bar_over_item, parent, false))
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: StatusViewHolder, position: Int) {
|
||||
AutoSizeCompat.autoConvertDensityOfGlobal(holder.itemView.resources)
|
||||
holder.bind(data[position])
|
||||
}
|
||||
|
||||
override fun getItemViewType(position: Int): Int {
|
||||
if (position < 0 || position >= data.size) {
|
||||
return super.getItemViewType(position)
|
||||
}
|
||||
val status = data[position]
|
||||
if (status is OverViewStatus) {
|
||||
return ITEM_TYPE_OVER_VIEW
|
||||
}
|
||||
return ITEM_TYPE_NORMAL
|
||||
}
|
||||
|
||||
override fun getItemCount(): Int = data.size
|
||||
|
||||
internal class StatusViewHolder(item: View) : RecyclerView.ViewHolder(item) {
|
||||
internal abstract class StatusViewHolder(item: View) : RecyclerView.ViewHolder(item) {
|
||||
abstract fun bind(status: Status)
|
||||
}
|
||||
|
||||
internal class NormalViewHolder(item: View) : StatusViewHolder(item) {
|
||||
|
||||
private val iv: ImageView by lazy {
|
||||
itemView.findViewById(R.id.iv)
|
||||
}
|
||||
|
||||
fun bind(status: Status) {
|
||||
if (status !is OverViewStatus) {
|
||||
itemView.setOnClickListener(null)
|
||||
itemView.isClickable = false
|
||||
if (iv.drawable != null) {
|
||||
iv.setImageDrawable(null)
|
||||
}
|
||||
} else {
|
||||
if (iv.background != null) {
|
||||
iv.background = null
|
||||
}
|
||||
itemView.onClick {
|
||||
CallerHmiManager.showStatusSummaryDialog()
|
||||
}
|
||||
}
|
||||
when(status) {
|
||||
override fun bind(status: Status) {
|
||||
when (status) {
|
||||
is IpcStatus -> {
|
||||
if (status.enabled) {
|
||||
iv.background = ContextCompat.getDrawable(itemView.context, drawable.icon_dev_status_ipc_enable)
|
||||
@@ -80,6 +73,7 @@ internal class StatusAdapter(val ctx: Context, var data: List<Status>): Recycler
|
||||
iv.background = ContextCompat.getDrawable(itemView.context, drawable.icon_dev_status_ipc_disable)
|
||||
}
|
||||
}
|
||||
|
||||
is CanStatus -> {
|
||||
if (status.enabled) {
|
||||
iv.background = ContextCompat.getDrawable(itemView.context, drawable.icon_dev_status_can_enable)
|
||||
@@ -87,152 +81,94 @@ internal class StatusAdapter(val ctx: Context, var data: List<Status>): Recycler
|
||||
iv.background = ContextCompat.getDrawable(itemView.context, drawable.icon_dev_status_can_disable)
|
||||
}
|
||||
}
|
||||
// is NetStatus -> {
|
||||
// if (status.enabled) {
|
||||
// iv.background = ContextCompat.getDrawable(itemView.context, drawable.icon_dev_status_net_enable)
|
||||
|
||||
// is GpsStatus -> {
|
||||
// if (status.enabled && status.isGranted) {
|
||||
// iv.background = ContextCompat.getDrawable(itemView.context, drawable.icon_dev_status_gps_enable)
|
||||
// } else {
|
||||
// iv.background = ContextCompat.getDrawable(itemView.context, drawable.icon_dev_status_net_disable)
|
||||
// iv.background = ContextCompat.getDrawable(itemView.context, drawable.icon_dev_status_gps_disable)
|
||||
// }
|
||||
// }
|
||||
is GpsStatus -> {
|
||||
if (status.enabled && status.isGranted) {
|
||||
iv.background = ContextCompat.getDrawable(itemView.context, drawable.icon_dev_status_gps_enable)
|
||||
} else {
|
||||
iv.background = ContextCompat.getDrawable(itemView.context, drawable.icon_dev_status_gps_disable)
|
||||
}
|
||||
}
|
||||
is TracingStatus -> {
|
||||
when(status.state) {
|
||||
MAP_DATA_NOT_EXIST, MAP_DATA_EXIST, MAP_TRA_TYPE, ROUTE_FAILED, TRACK_LOAD_FAIL, TRACK_NOT_EXIST, TRACK_FINDED, UNKNOWN -> {
|
||||
iv.background = ContextCompat.getDrawable(itemView.context, drawable.icon_dev_status_trace_unkown)
|
||||
}
|
||||
TRACK_LOADED -> {
|
||||
iv.background = ContextCompat.getDrawable(itemView.context, drawable.icon_dev_status_track_enable)
|
||||
}
|
||||
ROUTE_LOADED -> {
|
||||
iv.background = ContextCompat.getDrawable(itemView.context, drawable.icon_dev_status_route_enable)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// is TracingStatus -> {
|
||||
// when (status.state) {
|
||||
// MAP_DATA_NOT_EXIST, MAP_DATA_EXIST, MAP_TRA_TYPE, ROUTE_FAILED, TRACK_LOAD_FAIL, TRACK_NOT_EXIST, TRACK_FINDED, UNKNOWN -> {
|
||||
// iv.background = ContextCompat.getDrawable(itemView.context, drawable.icon_dev_status_trace_unkown)
|
||||
// }
|
||||
//
|
||||
// TRACK_LOADED -> {
|
||||
// iv.background = ContextCompat.getDrawable(itemView.context, drawable.icon_dev_status_track_enable)
|
||||
// }
|
||||
//
|
||||
// ROUTE_LOADED -> {
|
||||
// iv.background = ContextCompat.getDrawable(itemView.context, drawable.icon_dev_status_route_enable)
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
is RTKStatus -> {
|
||||
when(status.desc) {
|
||||
"RTK" ->
|
||||
when(status.state) {
|
||||
0 -> iv.background = ContextCompat.getDrawable(itemView.context, drawable.icon_dev_status_rtk_good)
|
||||
1 -> iv.background = ContextCompat.getDrawable(itemView.context, drawable.icon_dev_status_rtk_not_credible)
|
||||
2 -> iv.background = ContextCompat.getDrawable(itemView.context, drawable.icon_dev_status_rtk_inaccurate)
|
||||
else -> iv.background = ContextCompat.getDrawable(itemView.context, drawable.icon_dev_status_rtk_error)
|
||||
}
|
||||
"SLAM" ->
|
||||
iv.background = ContextCompat.getDrawable(itemView.context, drawable.icon_dev_status_slam_good)
|
||||
"VSLAM" ->
|
||||
iv.background = ContextCompat.getDrawable(itemView.context, drawable.icon_dev_status_vslam_good)
|
||||
"VAL" ->
|
||||
iv.background = ContextCompat.getDrawable(itemView.context, drawable.icon_dev_status_val_good)
|
||||
else ->
|
||||
iv.background = ContextCompat.getDrawable(itemView.context, drawable.icon_dev_status_rtk_unknow)
|
||||
when (status.desc) {
|
||||
"RTK" -> when (status.state) {
|
||||
0 -> iv.background = ContextCompat.getDrawable(itemView.context, drawable.icon_dev_status_rtk_good)
|
||||
1 -> iv.background = ContextCompat.getDrawable(itemView.context, drawable.icon_dev_status_rtk_not_credible)
|
||||
2 -> iv.background = ContextCompat.getDrawable(itemView.context, drawable.icon_dev_status_rtk_inaccurate)
|
||||
else -> iv.background = ContextCompat.getDrawable(itemView.context, drawable.icon_dev_status_rtk_error)
|
||||
}
|
||||
|
||||
"SLAM" -> iv.background = ContextCompat.getDrawable(itemView.context, drawable.icon_dev_status_slam_good)
|
||||
"VSLAM" -> iv.background = ContextCompat.getDrawable(itemView.context, drawable.icon_dev_status_vslam_good)
|
||||
"VAL" -> iv.background = ContextCompat.getDrawable(itemView.context, drawable.icon_dev_status_val_good)
|
||||
else -> iv.background = ContextCompat.getDrawable(itemView.context, drawable.icon_dev_status_rtk_unknow)
|
||||
}
|
||||
}
|
||||
|
||||
is FSMStatus -> {
|
||||
when (status.state) {
|
||||
FSMStateCode.UnKnown -> {
|
||||
iv.background = ContextCompat.getDrawable(itemView.context, drawable.icon_dev_status_fsm_not_connected)
|
||||
CallerHmiManager.dismissFSMStatusDetailWindow()
|
||||
}
|
||||
|
||||
FSMStateCode.NotExist -> {
|
||||
iv.background = ContextCompat.getDrawable(itemView.context, drawable.icon_dev_status_fsm_not_exist)
|
||||
CallerHmiManager.dismissFSMStatusDetailWindow()
|
||||
}
|
||||
|
||||
FSMStateCode.ExistNormal -> {
|
||||
iv.background = ContextCompat.getDrawable(itemView.context, drawable.icon_dev_status_fsm_normal)
|
||||
CallerHmiManager.dismissFSMStatusDetailWindow()
|
||||
}
|
||||
|
||||
FSMStateCode.ExistError -> {
|
||||
iv.background = ContextCompat.getDrawable(itemView.context, drawable.icon_dev_status_fsm_error)
|
||||
CallerHmiManager.showFSMStatusDetailWindow("FSM异常:", "#FF3B3B", status.desc)
|
||||
}
|
||||
}
|
||||
}
|
||||
is OverViewStatus -> {
|
||||
if (status.hasException) {
|
||||
iv.scaleType = ImageView.ScaleType.FIT_CENTER
|
||||
iv.setImageResource(drawable.icon_red_warning)
|
||||
} else {
|
||||
iv.scaleType = ImageView.ScaleType.FIT_CENTER
|
||||
iv.setImageResource(drawable.icon_grey_warning)
|
||||
}
|
||||
}
|
||||
|
||||
else -> throw IllegalStateException()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal class OverViewHolder(item: View) : StatusViewHolder(item) {
|
||||
|
||||
private val iv: ImageView by lazy {
|
||||
itemView.findViewById(R.id.iv)
|
||||
}
|
||||
|
||||
init {
|
||||
itemView.onClick {
|
||||
CallerHmiManager.showStatusSummaryDialog()
|
||||
}
|
||||
}
|
||||
|
||||
private fun getText(status: Status): String = when (status) {
|
||||
is CanStatus -> "CAN:${if (status.enabled) "状态正常" else "非正常连接"}"
|
||||
is GpsStatus -> "GPS:${if (status.enabled) "状态正常" else "非正常连接"}"
|
||||
is IpcStatus -> "工控机:${if (status.enabled) "状态正常" else "非正常连接"}"
|
||||
// is NetStatus -> "WIFI:${ if (status.enabled) "${status.name}" else "非正常连接" }"
|
||||
is RTKStatus -> when (status.desc) {
|
||||
"RTK" ->
|
||||
when (status.state) {
|
||||
0 -> "RTK定位,状态良好"
|
||||
1 -> "RTK定位,定位不可信"
|
||||
2 -> "RTK定位,误差增大到米级"
|
||||
else -> "RTK定位,状态异常"
|
||||
}
|
||||
|
||||
"SLAM" ->
|
||||
"SLAM定位,状态良好"
|
||||
|
||||
else ->
|
||||
"定位异常"
|
||||
}
|
||||
|
||||
is FSMStatus -> when (status.state) {
|
||||
FSMStateCode.UnKnown -> {
|
||||
"FSM:未知"
|
||||
}
|
||||
FSMStateCode.NotExist -> {
|
||||
"FSM:无FSM模块"
|
||||
}
|
||||
FSMStateCode.ExistNormal -> {
|
||||
"FSM:状态正常"
|
||||
}
|
||||
FSMStateCode.ExistError -> {
|
||||
"FSM:状态异常"
|
||||
}
|
||||
}
|
||||
|
||||
is TracingStatus -> {
|
||||
val extra = status.state.extra
|
||||
val extraDesc =
|
||||
if (extra != null && extra.isNotEmpty()) extra.values.joinToString(",") else ""
|
||||
CallerLogger.d(
|
||||
"$M_DEVA$TAG",
|
||||
"traceing_state: $status -> extra: $extraDesc :: extra: $extra"
|
||||
)
|
||||
when (status.state) {
|
||||
//"轨迹类型:${ if (status.state == TRACK_LOADED) "循迹" else if (status.state == ROUTE_LOADED) "自主算路" else "暂无轨迹" }"
|
||||
MAP_TRA_TYPE -> {
|
||||
"暂无轨迹"
|
||||
}
|
||||
|
||||
MAP_DATA_EXIST -> "地图数据存在,正在加载${if (extraDesc.isNotEmpty()) "\n[$extraDesc]" else ""}"
|
||||
MAP_DATA_NOT_EXIST -> "地图数据不存在${if (extraDesc.isNotEmpty()) "\n[$extraDesc]" else ""}"
|
||||
TRACK_FINDED -> "轨迹类型:循迹(已找到轨迹)${if (extraDesc.isNotEmpty()) "\n[$extraDesc]" else ""}"
|
||||
TRACK_LOADED -> "轨迹类型:循迹(加载成功)${if (extraDesc.isNotEmpty()) "\n[$extraDesc]" else ""}"
|
||||
TRACK_NOT_EXIST -> "轨迹类型:循迹(未找到轨迹)${if (extraDesc.isNotEmpty()) "\n[$extraDesc]" else ""}"
|
||||
TRACK_LOAD_FAIL -> "轨迹类型:循迹(加载失败)${if (extraDesc.isNotEmpty()) "\n[$extraDesc]" else ""}"
|
||||
ROUTE_LOADED -> "轨迹类型:自主算路(加载成功)${if (extraDesc.isNotEmpty()) "\n[$extraDesc]" else ""}"
|
||||
ROUTE_FAILED -> "轨迹类型:自主算路(加载失败)${if (extraDesc.isNotEmpty()) "\n[$extraDesc]" else ""}"
|
||||
UNKNOWN -> "暂无轨迹"
|
||||
}
|
||||
}
|
||||
|
||||
is OverViewStatus -> {
|
||||
""
|
||||
}
|
||||
|
||||
else -> {
|
||||
throw AssertionError()
|
||||
override fun bind(status: Status) {
|
||||
val over = status as OverViewStatus
|
||||
if (over.hasException) {
|
||||
iv.background = ContextCompat.getDrawable(itemView.context, drawable.icon_red_warning)
|
||||
} else {
|
||||
iv.background = ContextCompat.getDrawable(itemView.context, drawable.icon_grey_warning)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 997 B |
|
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 291 B After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 291 B After Width: | Height: | Size: 1.5 KiB |
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/iv"
|
||||
android:layout_width="@dimen/dp_115"
|
||||
android:layout_width="@dimen/dp_100"
|
||||
android:layout_height="@dimen/dp_46" />
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/iv"
|
||||
android:layout_width="@dimen/dp_51"
|
||||
android:layout_height="@dimen/dp_40" />
|
||||
@@ -24,7 +24,7 @@ class DemoModeView @JvmOverloads constructor(
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.view_demo_mode, this, true)
|
||||
background = this.context.getDrawable(R.drawable.demo_mode)
|
||||
background = this.context.getDrawable(R.drawable.icon_status_demo_close)
|
||||
setOnClickListener {
|
||||
HmiActionLog.hmiAction("SOP 演示模式开关", !FunctionBuildConfig.isDemoMode)
|
||||
FunctionBuildConfig.isDemoMode = !FunctionBuildConfig.isDemoMode
|
||||
@@ -50,9 +50,9 @@ class DemoModeView @JvmOverloads constructor(
|
||||
override fun updateFuncMode(tag: String, boolean: Boolean) {
|
||||
if(tag == FUNC_MODE_DEMO){
|
||||
background = if(FunctionBuildConfig.isDemoMode){
|
||||
this.context.getDrawable(R.drawable.demo_mode_open)
|
||||
this.context.getDrawable(R.drawable.icon_status_demo_open)
|
||||
}else{
|
||||
this.context.getDrawable(R.drawable.demo_mode)
|
||||
this.context.getDrawable(R.drawable.icon_status_demo_close)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ class RainModeView @JvmOverloads constructor(
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.view_demo_mode, this, true)
|
||||
background = this.context.getDrawable(R.drawable.rain_mode)
|
||||
background = this.context.getDrawable(R.drawable.icon_status_yutian_close)
|
||||
setOnClickListener {
|
||||
HmiActionLog.hmiAction("SOP 雨天模式开关", !FunctionBuildConfig.isRainMode)
|
||||
FunctionBuildConfig.isRainMode = !FunctionBuildConfig.isRainMode
|
||||
@@ -48,9 +48,9 @@ class RainModeView @JvmOverloads constructor(
|
||||
if(tag == FUNC_MODE_RAIN){
|
||||
ThreadUtils.runOnUiThread {
|
||||
background = if(FunctionBuildConfig.isRainMode){
|
||||
this.context.getDrawable(R.drawable.rain_mode_open)
|
||||
this.context.getDrawable(R.drawable.icon_status_yutian_open)
|
||||
}else{
|
||||
this.context.getDrawable(R.drawable.rain_mode)
|
||||
this.context.getDrawable(R.drawable.icon_status_yutian_close)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,10 +2,13 @@ package com.mogo.eagle.core.function.hmi.ui.widget
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.graphics.Color
|
||||
import android.graphics.drawable.ColorDrawable
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.FrameLayout
|
||||
import android.widget.LinearLayout
|
||||
import androidx.core.content.ContextCompat
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
@@ -21,12 +24,10 @@ import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.kotlin.scope
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.BarUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import kotlinx.android.synthetic.main.view_status_bar.view.routeDownloadFailMark
|
||||
import kotlinx.android.synthetic.main.view_status_bar.view.routeDownloadStatus
|
||||
import kotlinx.android.synthetic.main.view_status_bar.view.routeDownloadStatusRoot
|
||||
import kotlinx.android.synthetic.main.view_status_bar.view.ll_status_download
|
||||
import kotlinx.android.synthetic.main.view_status_bar.view.route_download_status
|
||||
import kotlinx.android.synthetic.main.view_status_bar.view.status_container
|
||||
import kotlinx.android.synthetic.main.view_status_bar.view.viewProgressTv
|
||||
import kotlinx.android.synthetic.main.view_status_bar.view.viewStatusBarLeft
|
||||
@@ -34,6 +35,7 @@ import kotlinx.android.synthetic.main.view_status_bar.view.viewStatusBarRight
|
||||
import kotlinx.android.synthetic.main.view_status_bar.view.viewTextClock
|
||||
import kotlinx.coroutines.Runnable
|
||||
import kotlinx.coroutines.launch
|
||||
import me.jessyan.autosize.utils.AutoSizeUtils
|
||||
import java.util.concurrent.CopyOnWriteArrayList
|
||||
import java.util.concurrent.atomic.AtomicLong
|
||||
|
||||
@@ -41,7 +43,7 @@ class StatusBarView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : LinearLayout(context, attrs, defStyleAttr), IMoGoSkinModeChangeListener, IViewControlListener,
|
||||
) : FrameLayout(context, attrs, defStyleAttr), IMoGoSkinModeChangeListener, IViewControlListener,
|
||||
IMoGoAutopilotStatusListener {
|
||||
|
||||
companion object {
|
||||
@@ -49,8 +51,8 @@ class StatusBarView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
init {
|
||||
orientation = HORIZONTAL
|
||||
LayoutInflater.from(context).inflate(R.layout.view_status_bar, this, true)
|
||||
background = ColorDrawable(Color.parseColor("#A6000000")) // 黑色的65%
|
||||
}
|
||||
|
||||
private val rightViewList = CopyOnWriteArrayList<String>()
|
||||
@@ -60,12 +62,6 @@ class StatusBarView @JvmOverloads constructor(
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
post {
|
||||
val params: ViewGroup.LayoutParams = getLayoutParams()
|
||||
params.height = BarUtils.getStatusBarHeight()
|
||||
layoutParams = params
|
||||
}
|
||||
|
||||
//添加view控制
|
||||
CallerHmiViewControlListenerManager.addListener(TAG, this)
|
||||
// 添加换肤监听
|
||||
@@ -76,44 +72,40 @@ class StatusBarView @JvmOverloads constructor(
|
||||
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
|
||||
updateStatusBarLeftView(true, FUNC_MODE_DEMO, DemoModeView(this.context))
|
||||
updateStatusBarLeftView(true, FUNC_MODE_RAIN, RainModeView(this.context))
|
||||
routeDownloadStatusRoot?.visibility = View.GONE
|
||||
route_download_status?.visibility = View.GONE
|
||||
CallerDevaToolsManager.registerRouteDownloadListener(TAG) { state ->
|
||||
when (state) {
|
||||
0 -> {
|
||||
routeDownloadStatusRoot?.visibility = View.GONE
|
||||
route_download_status?.visibility = View.GONE
|
||||
}
|
||||
|
||||
1 -> {
|
||||
routeDownloadStatusRoot?.visibility = View.VISIBLE
|
||||
routeDownloadStatus?.background = ContextCompat.getDrawable(
|
||||
route_download_status?.visibility = View.VISIBLE
|
||||
route_download_status?.background = ContextCompat.getDrawable(
|
||||
context,
|
||||
R.drawable.bg_autopilot_route_download_start
|
||||
R.drawable.icon_status_route_download_start
|
||||
)
|
||||
routeDownloadFailMark?.visibility = View.GONE
|
||||
}
|
||||
|
||||
2 -> {
|
||||
routeDownloadStatusRoot?.visibility = View.VISIBLE
|
||||
routeDownloadStatus?.background = ContextCompat.getDrawable(
|
||||
route_download_status?.visibility = View.VISIBLE
|
||||
route_download_status?.background = ContextCompat.getDrawable(
|
||||
context,
|
||||
R.drawable.bg_autopilot_route_download_success
|
||||
R.drawable.icon_status_route_download_complete
|
||||
)
|
||||
routeDownloadFailMark?.visibility = View.GONE
|
||||
UiThreadHandler.postDelayed(Runnable {
|
||||
routeDownloadStatusRoot?.visibility = View.GONE
|
||||
route_download_status?.visibility = View.GONE
|
||||
}, 3000)
|
||||
}
|
||||
|
||||
3 -> {
|
||||
routeDownloadStatusRoot?.visibility = View.VISIBLE
|
||||
routeDownloadStatus?.background = ContextCompat.getDrawable(
|
||||
route_download_status?.visibility = View.VISIBLE
|
||||
route_download_status?.background = ContextCompat.getDrawable(
|
||||
context,
|
||||
R.drawable.bg_autopilot_route_download_failed
|
||||
R.drawable.icon_status_route_download_failed
|
||||
)
|
||||
routeDownloadFailMark?.visibility = View.VISIBLE
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -131,12 +123,12 @@ class StatusBarView @JvmOverloads constructor(
|
||||
super.onAutopilotRouteLineId(lineId)
|
||||
if (lineId != this.lineId.get()) {
|
||||
this.lineId.set(lineId)
|
||||
routeDownloadStatusRoot?.scope?.launch {
|
||||
if ((routeDownloadStatusRoot?.visibility == View.VISIBLE) && AppIdentityModeUtils.isDriver(
|
||||
route_download_status?.scope?.launch {
|
||||
if ((route_download_status?.visibility == View.VISIBLE) && AppIdentityModeUtils.isDriver(
|
||||
FunctionBuildConfig.appIdentityMode
|
||||
)
|
||||
) {
|
||||
routeDownloadStatusRoot?.visibility = View.GONE
|
||||
route_download_status?.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -167,8 +159,10 @@ class StatusBarView @JvmOverloads constructor(
|
||||
if (leftViewList.contains(tag)) {
|
||||
return
|
||||
}
|
||||
val params = LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT)
|
||||
params.marginStart = AutoSizeUtils.dp2px(context, 30.0f)
|
||||
viewStatusBarLeft.addView(viewGroup, leftViewList.size, params)
|
||||
leftViewList.add(0, tag)
|
||||
viewStatusBarLeft.addView(viewGroup, 0)
|
||||
} else {
|
||||
leftViewList.forEachIndexed { index, s ->
|
||||
if (s == tag) {
|
||||
@@ -182,10 +176,10 @@ class StatusBarView @JvmOverloads constructor(
|
||||
@SuppressLint("SetTextI18n")
|
||||
override fun updateStatusBarDownloadView(insert: Boolean, tag: String, progress: Int) {
|
||||
if (insert) {
|
||||
viewProgressTv.visibility = VISIBLE
|
||||
ll_status_download.visibility = VISIBLE
|
||||
viewProgressTv.text = "$progress%"
|
||||
} else {
|
||||
viewProgressTv.visibility = GONE
|
||||
ll_status_download.visibility = GONE
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import android.net.wifi.WifiManager
|
||||
import android.os.Handler
|
||||
import android.os.Message
|
||||
import android.util.AttributeSet
|
||||
import android.util.Log
|
||||
import android.util.TypedValue
|
||||
import android.view.LayoutInflater
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
@@ -82,11 +83,12 @@ class WifiStateView @JvmOverloads constructor(
|
||||
resources.getDimension(R.dimen.dp_35)
|
||||
)
|
||||
a.recycle()
|
||||
viewStatusBarTag.setTextSize(TypedValue.COMPLEX_UNIT_PX,AutoSizeUtils.dp2px(context,txtSize).toFloat())
|
||||
// viewStatusBarTag.setTextSize(TypedValue.COMPLEX_UNIT_PX,AutoSizeUtils.dp2px(context,txtSize).toFloat())
|
||||
wifiManager =
|
||||
context.applicationContext.getSystemService(Context.WIFI_SERVICE) as WifiManager?
|
||||
wifiHandler = WifiHandler(this)
|
||||
val wifiInfo = wifiManager!!.connectionInfo
|
||||
Log.d(TAG, "wifi-info : $wifiInfo, ssid->: ${wifiInfo.ssid}")
|
||||
wifiName = wifiInfo.ssid.replace("\"","")
|
||||
}
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 756 B |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 680 B |
|
Before Width: | Height: | Size: 721 B |
@@ -3,7 +3,6 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:layout_marginLeft="@dimen/dp_10"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.BatteryView
|
||||
|
||||
@@ -6,11 +6,9 @@
|
||||
tools:parentTag="android.widget.LinearLayout"
|
||||
tools:orientation="horizontal"
|
||||
tools:background="@color/black">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivMoFangStatus"
|
||||
android:layout_width="@dimen/dp_65"
|
||||
android:layout_height="@dimen/dp_65"
|
||||
android:scaleType="fitXY"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:ignore="ContentDescription" />
|
||||
</merge>
|
||||
@@ -3,113 +3,115 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_72"
|
||||
tools:parentTag="android.widget.LinearLayout">
|
||||
|
||||
<TextClock
|
||||
android:id="@+id/viewTextClock"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_64"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="@dimen/dp_24"
|
||||
android:format12Hour="HH:mm"
|
||||
android:format24Hour="HH:mm"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/color_2C2E30"
|
||||
android:textSize="@dimen/dp_45"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<!--Wifi状态-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.WifiStateView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_54"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="@dimen/dp_18" />
|
||||
|
||||
<!--魔方连接状态-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.BlueToothView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="@dimen/dp_8" />
|
||||
tools:background="#A6000000"
|
||||
tools:parentTag="android.widget.FrameLayout">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/viewStatusBarLeft"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="end|center"
|
||||
android:orientation="horizontal"
|
||||
android:showDividers="middle"
|
||||
android:divider="@drawable/bg_divider_empty"
|
||||
android:layout_marginStart="@dimen/dp_8"/>
|
||||
|
||||
<!--app下载进度-->
|
||||
<TextView
|
||||
android:id="@+id/viewProgressTv"
|
||||
android:layout_width="@dimen/dp_96"
|
||||
android:layout_height="@dimen/dp_50"
|
||||
android:layout_gravity="center"
|
||||
android:visibility="gone"
|
||||
android:background="@drawable/app_download_bg"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:gravity="center"
|
||||
android:drawableLeft="@drawable/icon_download_guide"
|
||||
android:textColor="@color/background_debug"
|
||||
android:textSize="@dimen/dp_20" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/routeDownloadStatusRoot"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
tools:background="#2F4266">
|
||||
<View
|
||||
android:id="@+id/routeDownloadStatus"
|
||||
android:layout_width="@dimen/dp_70"
|
||||
android:layout_height="@dimen/dp_10"
|
||||
android:layout_gravity="center_vertical"
|
||||
tools:visibility="visible"
|
||||
tools:background="@drawable/bg_autopilot_route_download_failed"/>
|
||||
<TextView
|
||||
android:id="@+id/routeDownloadFailMark"
|
||||
android:orientation="horizontal">
|
||||
<TextClock
|
||||
android:id="@+id/viewTextClock"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/white"
|
||||
android:text="!"
|
||||
android:textStyle="bold"
|
||||
tools:visibility="visible"
|
||||
android:visibility="gone"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:textSize="@dimen/dp_28"/>
|
||||
</LinearLayout>
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="@dimen/dp_61"
|
||||
android:format12Hour="HH:mm"
|
||||
android:format24Hour="HH:mm"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="@dimen/dp_45"
|
||||
android:textStyle="bold" />
|
||||
|
||||
|
||||
|
||||
<Space
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="@dimen/dp_1"
|
||||
android:layout_weight="1"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/status_container"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginEnd="@dimen/dp_30"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/viewStatusBarRight"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginEnd="@dimen/dp_44"
|
||||
android:gravity="end|center"
|
||||
android:orientation="horizontal">
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.BatteryGroupView
|
||||
<!--Wifi状态-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.WifiStateView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="@dimen/dp_30" />
|
||||
|
||||
<!--魔方连接状态-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.BlueToothView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="@dimen/dp_30" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/viewStatusBarLeft"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
/>
|
||||
|
||||
<!--app下载进度-->
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_status_download"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:gravity="center_vertical"
|
||||
android:visibility="gone"
|
||||
android:layout_marginStart="@dimen/dp_30">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/icon_download_guide"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/viewProgressTv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/background_debug"
|
||||
android:textSize="@dimen/dp_30"
|
||||
tools:visibility="visible"
|
||||
tools:text="80%" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/route_download_status"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_30"
|
||||
android:visibility="gone"
|
||||
android:background="@drawable/icon_status_route_download_complete"
|
||||
android:layout_gravity="center_vertical"/>
|
||||
|
||||
<Space
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="@dimen/dp_1"
|
||||
android:layout_weight="1"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/status_container"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginEnd="@dimen/dp_30"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/viewStatusBarRight"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_40"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.BatteryGroupView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/icon_status_bar_logo"
|
||||
android:contentDescription="@null"/>
|
||||
</merge>
|
||||
@@ -2,27 +2,33 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/viewStatusBarTag"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_27"
|
||||
android:gravity="center_vertical"
|
||||
android:maxLength="15"
|
||||
android:textColor="@color/color_2C2E30"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:background="#A6000000"
|
||||
tools:layout_height="@dimen/dp_72">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/viewWifiStateBg"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@+id/viewStatusBarTag"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="MissingConstraints" />
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:ignore="MissingConstraints"
|
||||
tools:src="@drawable/wifi_light_state_five" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/viewStatusBarTag"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:maxLength="15"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="@dimen/dp_30"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginStart="@dimen/dp_6"
|
||||
app:layout_constraintStart_toEndOf="@+id/viewWifiStateBg"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="京888888" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 8.5 KiB |
|
After Width: | Height: | Size: 885 B |
|
After Width: | Height: | Size: 832 B |
|
After Width: | Height: | Size: 911 B |