[6.7.0-tmp]

This commit is contained in:
EmArrow
2024-09-10 18:56:10 +08:00
parent cd9b7885c1
commit e61c5d362a
7 changed files with 86 additions and 11 deletions

View File

@@ -0,0 +1,23 @@
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 TabSwitchView @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
) : ConstraintLayout(context, attrs, defStyleAttr) {
init {
LayoutInflater.from(context).inflate(R.layout.view_tab_switch, this, true)
initView()
}
private fun initView() {
}
}

View File

@@ -1,5 +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" />
<item android:drawable="@drawable/icon_tab_car_info_open" android:state_checked="true"/>
</selector>

View File

@@ -11,6 +11,7 @@
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
android:elevation="10dp"
android:layout_height="wrap_content"/>
<androidx.constraintlayout.widget.ConstraintLayout
@@ -27,7 +28,8 @@
android:id="@+id/clBoneTab"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:elevation="10dp"
android:layout_marginTop="@dimen/dp_385"
android:elevation="20dp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />

View File

@@ -17,7 +17,7 @@
<ToggleButton
android:id="@+id/tbCarInfo"
android:layout_width="0dp"
android:layout_width="@dimen/dp_220"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@drawable/selector_tab_car_info"

View File

@@ -0,0 +1,50 @@
<?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_220"
android:layout_height="@dimen/dp_140">
<ToggleButton
android:id="@+id/tbTabClick"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:checked="false"
android:gravity="center"
android:textOff=""
android:textOn="" />
<ImageView
android:id="@+id/ivTabDefault"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scaleType="center"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/ivTabClick"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/ivTabClickBg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<View
id
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</androidx.constraintlayout.widget.ConstraintLayout>