[6.7.0-tmp] tmp

This commit is contained in:
EmArrow
2024-09-10 16:39:38 +08:00
parent 699db1ab9e
commit e308171fcd
13 changed files with 170 additions and 2 deletions

View File

@@ -0,0 +1,25 @@
package com.mogo.eagle.core.function.hmi.ui.bone
import android.content.Context
import android.util.AttributeSet
import android.view.LayoutInflater
import androidx.constraintlayout.widget.ConstraintLayout
import com.mogo.eagle.core.function.hmi.R
class BoneContainerView @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
) : ConstraintLayout(context, attrs, defStyleAttr) {
init {
LayoutInflater.from(context).inflate(R.layout.view_bone_container, this, true)
initView()
}
private fun initView() {
}
}

View File

@@ -0,0 +1,35 @@
package com.mogo.eagle.core.function.hmi.ui.bone
import android.content.Context
import android.util.AttributeSet
import android.view.LayoutInflater
import android.view.View
import androidx.constraintlayout.widget.ConstraintLayout
import com.mogo.eagle.core.function.hmi.R
import kotlinx.android.synthetic.main.view_bone_tab.view.clBoneTabChild
import kotlinx.android.synthetic.main.view_bone_tab.view.clCarInfo
import kotlinx.android.synthetic.main.view_bone_tab.view.tbCarInfo
class BoneTabLayout @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
) : ConstraintLayout(context, attrs, defStyleAttr) {
init {
LayoutInflater.from(context).inflate(R.layout.view_bone_tab, this, true)
initView()
}
private fun initView() {
tbCarInfo.setOnCheckedChangeListener { _, isChecked ->
if (isChecked){
clBoneTabChild.visibility = View.VISIBLE
clCarInfo.visibility = View.VISIBLE
}else{
clCarInfo.visibility = View.GONE
clBoneTabChild.visibility = View.GONE
}
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 189 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/icon_tab_car_info" android:state_checked="false" />
<item android:drawable="@drawable/icon_tab_car_info_open" android:state_checked="true" />
</selector>

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/bone_bg"
android:layout_gravity="center">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/clBoneBiz"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_385"
android:elevation="1dp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.mogo.eagle.core.function.hmi.ui.bone.BoneTabLayout
android:id="@+id/clBoneTab"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:elevation="10dp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="@dimen/dp_964"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_224"
android:layout_marginBottom="@dimen/dp_m_2"
android:background="@drawable/bone_tab_bg"
android:orientation="horizontal"
android:elevation="10dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent">
<ToggleButton
android:id="@+id/tbCarInfo"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@drawable/selector_tab_car_info"
android:checked="false"
android:gravity="center" />
<ToggleButton
android:id="@+id/tbMsgBox"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:checked="false"
android:gravity="center" />
<ToggleButton
android:id="@+id/tbReport"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:checked="false"
android:gravity="center" />
<ToggleButton
android:id="@+id/tbMoreInfo"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:checked="false"
android:gravity="center" />
</LinearLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/clBoneTabChild"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_1128"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
android:elevation="1dp"
app:layout_constraintTop_toTopOf="parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/clCarInfo"
android:background="@color/acc_default_txt_color"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>