|
@@ -11,7 +11,9 @@
|
|
|
|
|
|
<import type="android.view.View" />
|
|
<import type="android.view.View" />
|
|
|
|
|
|
- <import type="com.rdiot.yx485.net.ModeType"/>
|
|
|
|
|
|
+ <import type="com.rdiot.yx485.util.RoomUtils" />
|
|
|
|
+
|
|
|
|
+ <import type="com.rdiot.yx485.net.ModeType" />
|
|
</data>
|
|
</data>
|
|
|
|
|
|
<LinearLayout
|
|
<LinearLayout
|
|
@@ -27,480 +29,547 @@
|
|
app:zRightIcon="@mipmap/icon_more"
|
|
app:zRightIcon="@mipmap/icon_more"
|
|
app:zTitle="@string/room" />
|
|
app:zTitle="@string/room" />
|
|
|
|
|
|
-
|
|
|
|
- <!--模式按钮-->
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- <HorizontalScrollView
|
|
|
|
- android:id="@+id/hsv"
|
|
|
|
|
|
+ <com.rdiot.yx485.view.CustomScrollView
|
|
android:layout_width="match_parent"
|
|
android:layout_width="match_parent"
|
|
- android:layout_height="wrap_content"
|
|
|
|
- android:scrollbars="none"
|
|
|
|
- tools:ignore="SpeakableTextPresentCheck">
|
|
|
|
-
|
|
|
|
- <!--<androidx.constraintlayout.widget.ConstraintLayout-->
|
|
|
|
- <!-- android:layout_width="match_parent"-->
|
|
|
|
- <!-- android:layout_height="wrap_content"-->
|
|
|
|
- <!-- android:layout_marginStart="25dp"-->
|
|
|
|
- <!-- android:layout_marginEnd="25dp"-->
|
|
|
|
- <!-- tools:context="ui.ctrl.RoomCtrlFragment">-->
|
|
|
|
- <LinearLayout
|
|
|
|
- android:layout_width="wrap_content"
|
|
|
|
- android:layout_height="wrap_content"
|
|
|
|
- android:orientation="horizontal">
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- <LinearLayout
|
|
|
|
- android:id="@+id/ll_zhi_leng"
|
|
|
|
- android:layout_width="70dp"
|
|
|
|
- android:layout_height="70dp"
|
|
|
|
- android:layout_marginStart="20dp"
|
|
|
|
- android:background="@{roomData.power && roomData.mode == ModeType.ZHI_LENG.typeCode? @drawable/bg_device_ctrl_btn_sel :@drawable/bg_device_ctrl_btn}"
|
|
|
|
- android:gravity="center"
|
|
|
|
- app:layout_constraintDimensionRatio="h,1:1"
|
|
|
|
- app:layout_constraintEnd_toStartOf="@id/ll_zhi_re"
|
|
|
|
- app:layout_constraintHorizontal_chainStyle="spread_inside"
|
|
|
|
- app:layout_constraintStart_toStartOf="parent"
|
|
|
|
- app:layout_constraintTop_toTopOf="parent"
|
|
|
|
- app:layout_constraintWidth_percent="0.18">
|
|
|
|
-
|
|
|
|
- <androidx.appcompat.widget.AppCompatImageView
|
|
|
|
- srcString="@{roomData.power && roomData.mode == ModeType.ZHI_LENG.typeCode? `icon_refrigeration_sel` :`icon_refrigeration`}"
|
|
|
|
- android:layout_width="70dp"
|
|
|
|
- android:layout_height="70dp"
|
|
|
|
- tools:srcCompat="@mipmap/icon_refrigeration" />
|
|
|
|
-
|
|
|
|
- </LinearLayout>
|
|
|
|
-
|
|
|
|
- <LinearLayout
|
|
|
|
- android:id="@+id/ll_zhi_re"
|
|
|
|
- android:layout_width="70dp"
|
|
|
|
- android:layout_height="70dp"
|
|
|
|
- android:layout_marginStart="20dp"
|
|
|
|
- android:background="@{roomData.power && roomData.mode == ModeType.ZHI_RE.typeCode? @drawable/bg_device_ctrl_btn_sel :@drawable/bg_device_ctrl_btn}"
|
|
|
|
- android:gravity="center"
|
|
|
|
- app:layout_constraintDimensionRatio="h,1:1"
|
|
|
|
- app:layout_constraintEnd_toStartOf="@id/ll_chu_shi"
|
|
|
|
- app:layout_constraintStart_toEndOf="@id/ll_zhi_leng"
|
|
|
|
- app:layout_constraintTop_toTopOf="parent"
|
|
|
|
- app:layout_constraintWidth_percent="0.18"
|
|
|
|
- tools:background="@drawable/bg_device_ctrl_btn_sel">
|
|
|
|
-
|
|
|
|
- <androidx.appcompat.widget.AppCompatImageView
|
|
|
|
- srcString="@{roomData.power && roomData.mode == ModeType.ZHI_RE.typeCode? `icon_heating_sel` :`icon_heating`}"
|
|
|
|
- android:layout_width="70dp"
|
|
|
|
- android:layout_height="70dp"
|
|
|
|
- tools:srcCompat="@mipmap/icon_heating_sel" />
|
|
|
|
-
|
|
|
|
- </LinearLayout>
|
|
|
|
-
|
|
|
|
- <LinearLayout
|
|
|
|
- android:id="@+id/ll_chu_shi"
|
|
|
|
- android:layout_width="70dp"
|
|
|
|
- android:layout_height="70dp"
|
|
|
|
- android:layout_marginStart="20dp"
|
|
|
|
- android:background="@{roomData.power && roomData.mode == ModeType.CHU_SHI.typeCode? @drawable/bg_device_ctrl_btn_sel :@drawable/bg_device_ctrl_btn}"
|
|
|
|
- android:gravity="center"
|
|
|
|
- app:layout_constraintDimensionRatio="h,1:1"
|
|
|
|
- app:layout_constraintEnd_toStartOf="@id/ll_song_feng"
|
|
|
|
- app:layout_constraintStart_toEndOf="@id/ll_zhi_re"
|
|
|
|
- app:layout_constraintTop_toTopOf="parent"
|
|
|
|
- app:layout_constraintWidth_percent="0.18">
|
|
|
|
-
|
|
|
|
- <androidx.appcompat.widget.AppCompatImageView
|
|
|
|
- srcString="@{roomData.power && roomData.mode == ModeType.CHU_SHI.typeCode? `icon_dehumidification_sel` :`icon_dehumidification`}"
|
|
|
|
- android:layout_width="70dp"
|
|
|
|
- android:layout_height="70dp"
|
|
|
|
- tools:srcCompat="@mipmap/icon_dehumidification" />
|
|
|
|
-
|
|
|
|
- </LinearLayout>
|
|
|
|
-
|
|
|
|
- <LinearLayout
|
|
|
|
- android:id="@+id/ll_song_feng"
|
|
|
|
- android:layout_width="70dp"
|
|
|
|
- android:layout_height="70dp"
|
|
|
|
- android:layout_marginStart="20dp"
|
|
|
|
- android:background="@{roomData.power && roomData.mode == ModeType.SONG_FENG.typeCode? @drawable/bg_device_ctrl_btn_sel :@drawable/bg_device_ctrl_btn}"
|
|
|
|
- android:gravity="center"
|
|
|
|
- app:layout_constraintDimensionRatio="h,1:1"
|
|
|
|
- app:layout_constraintEnd_toEndOf="parent"
|
|
|
|
- app:layout_constraintStart_toEndOf="@id/ll_chu_shi"
|
|
|
|
- app:layout_constraintTop_toTopOf="parent"
|
|
|
|
- app:layout_constraintWidth_percent="0.18">
|
|
|
|
-
|
|
|
|
- <androidx.appcompat.widget.AppCompatImageView
|
|
|
|
- srcString="@{roomData.power && roomData.mode == ModeType.SONG_FENG.typeCode? `icon_wind_sel` :`icon_wind`}"
|
|
|
|
- android:layout_width="70dp"
|
|
|
|
- android:layout_height="70dp"
|
|
|
|
- tools:srcCompat="@mipmap/icon_wind" />
|
|
|
|
-
|
|
|
|
- </LinearLayout>
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- <LinearLayout
|
|
|
|
- android:id="@+id/ll_jia_shi"
|
|
|
|
- android:layout_width="70dp"
|
|
|
|
- android:layout_height="70dp"
|
|
|
|
- android:layout_marginStart="20dp"
|
|
|
|
- android:layout_marginEnd="20dp"
|
|
|
|
- android:background="@{roomData.power && roomData.mode == ModeType.JIA_SHI.typeCode? @drawable/bg_device_ctrl_btn_sel :@drawable/bg_device_ctrl_btn}"
|
|
|
|
- android:gravity="center"
|
|
|
|
- app:layout_constraintDimensionRatio="h,1:1"
|
|
|
|
- app:layout_constraintEnd_toEndOf="parent"
|
|
|
|
- app:layout_constraintStart_toEndOf="@id/ll_chu_shi"
|
|
|
|
- app:layout_constraintTop_toTopOf="parent"
|
|
|
|
- app:layout_constraintWidth_percent="0.18">
|
|
|
|
-
|
|
|
|
- <androidx.appcompat.widget.AppCompatImageView
|
|
|
|
- srcString="@{roomData.power && roomData.mode == ModeType.JIA_SHI.typeCode? `icon_humidify_sel` :`icon_humidify`}"
|
|
|
|
- android:layout_width="70dp"
|
|
|
|
- android:layout_height="70dp"
|
|
|
|
- tools:srcCompat="@mipmap/icon_humidify" />
|
|
|
|
-
|
|
|
|
- </LinearLayout>
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- </LinearLayout>
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- </HorizontalScrollView>
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- <!--控制-->
|
|
|
|
- <androidx.constraintlayout.widget.ConstraintLayout
|
|
|
|
- android:layout_width="match_parent"
|
|
|
|
- android:layout_height="0dp"
|
|
|
|
- android:layout_weight="1">
|
|
|
|
-
|
|
|
|
- <com.king.view.arcseekbar.ArcSeekBar
|
|
|
|
- android:id="@+id/arc_seek_bar"
|
|
|
|
- android:layout_width="0dp"
|
|
|
|
- android:layout_height="0dp"
|
|
|
|
- android:layout_marginTop="40dp"
|
|
|
|
- android:padding="10dp"
|
|
|
|
- app:arcMax="14"
|
|
|
|
- app:arcNormalColor="@color/device_ctrl_panel_bg_color"
|
|
|
|
- app:arcProgressColor="@color/device_ctrl_panel_progress_color"
|
|
|
|
- app:arcShowLabel="false"
|
|
|
|
- app:arcStartAngle="140"
|
|
|
|
- app:arcStrokeWidth="20dp"
|
|
|
|
- app:arcSweepAngle="260"
|
|
|
|
- app:arcThumbColor="@color/white"
|
|
|
|
- app:arcThumbInnerDotWidth="10dp"
|
|
|
|
- app:arcThumbShadowColor="#20000000"
|
|
|
|
- app:arcThumbShadowRadius="5dp"
|
|
|
|
- app:arcThumbWidth="18dp"
|
|
|
|
- app:layout_constraintDimensionRatio="h,1:1"
|
|
|
|
- app:layout_constraintEnd_toEndOf="parent"
|
|
|
|
- app:layout_constraintStart_toStartOf="parent"
|
|
|
|
- app:layout_constraintTop_toTopOf="parent"
|
|
|
|
- app:layout_constraintWidth_percent="0.7" />
|
|
|
|
-
|
|
|
|
- <TextView
|
|
|
|
- android:id="@+id/tv_temp"
|
|
|
|
- android:layout_width="wrap_content"
|
|
|
|
- android:layout_height="wrap_content"
|
|
|
|
- android:layout_marginBottom="30dp"
|
|
|
|
- android:includeFontPadding="false"
|
|
|
|
- android:text="@{String.format(`%d`,roomData.setTemp)}"
|
|
|
|
- android:textColor="@color/main_text_color"
|
|
|
|
- android:textSize="72sp"
|
|
|
|
- android:textStyle="bold"
|
|
|
|
- app:layout_constraintBottom_toBottomOf="@id/arc_seek_bar"
|
|
|
|
- app:layout_constraintEnd_toEndOf="@id/arc_seek_bar"
|
|
|
|
- app:layout_constraintStart_toStartOf="@id/arc_seek_bar"
|
|
|
|
- app:layout_constraintTop_toTopOf="@id/arc_seek_bar"
|
|
|
|
- tools:text="28" />
|
|
|
|
-
|
|
|
|
- <TextView
|
|
|
|
- android:id="@+id/tv_mark"
|
|
|
|
- android:layout_width="wrap_content"
|
|
|
|
- android:layout_height="wrap_content"
|
|
|
|
- android:layout_marginTop="12sp"
|
|
|
|
- android:includeFontPadding="false"
|
|
|
|
- android:text="℃"
|
|
|
|
- android:textColor="@color/main_text_color"
|
|
|
|
- android:textSize="25sp"
|
|
|
|
- android:textStyle="bold"
|
|
|
|
- app:layout_constraintStart_toEndOf="@id/tv_temp"
|
|
|
|
- app:layout_constraintTop_toTopOf="@id/tv_temp" />
|
|
|
|
-
|
|
|
|
- <androidx.appcompat.widget.AppCompatImageView
|
|
|
|
- android:id="@+id/iv_less"
|
|
|
|
- android:layout_width="0dp"
|
|
|
|
- android:layout_height="0dp"
|
|
|
|
- app:layout_constraintBottom_toBottomOf="@id/arc_seek_bar"
|
|
|
|
- app:layout_constraintDimensionRatio="h,1:1"
|
|
|
|
- app:layout_constraintStart_toStartOf="@id/arc_seek_bar"
|
|
|
|
- app:layout_constraintWidth_percent="0.1"
|
|
|
|
- app:srcCompat="@mipmap/icon_reduce" />
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- <androidx.appcompat.widget.AppCompatImageView
|
|
|
|
- android:id="@+id/iv_add"
|
|
|
|
- android:layout_width="0dp"
|
|
|
|
- android:layout_height="0dp"
|
|
|
|
- app:layout_constraintBottom_toBottomOf="@id/arc_seek_bar"
|
|
|
|
- app:layout_constraintDimensionRatio="h,1:1"
|
|
|
|
- app:layout_constraintEnd_toEndOf="@id/arc_seek_bar"
|
|
|
|
- app:layout_constraintWidth_percent="0.1"
|
|
|
|
- app:srcCompat="@mipmap/icon_add_1" />
|
|
|
|
-
|
|
|
|
- <TextView
|
|
|
|
- android:id="@+id/tv_mode_lv"
|
|
|
|
- lv="@{roomData.fanSpeed}"
|
|
|
|
- mode="@{roomData.mode}"
|
|
|
|
- android:layout_width="wrap_content"
|
|
|
|
- android:layout_height="wrap_content"
|
|
|
|
- android:textColor="@color/main_text_color"
|
|
|
|
- android:textSize="13sp"
|
|
|
|
- android:textStyle="bold"
|
|
|
|
- android:visibility="@{roomData.power?View.VISIBLE:View.GONE}"
|
|
|
|
- app:layout_constraintEnd_toEndOf="@id/tv_temp"
|
|
|
|
- app:layout_constraintStart_toStartOf="@id/tv_temp"
|
|
|
|
- app:layout_constraintTop_toBottomOf="@id/tv_temp"
|
|
|
|
- tools:text="制冷 一档" />
|
|
|
|
-
|
|
|
|
- <TextView
|
|
|
|
- android:id="@+id/tv_timer"
|
|
|
|
- android:layout_width="wrap_content"
|
|
|
|
- android:layout_height="wrap_content"
|
|
|
|
- android:text="@{@string/timer_status(roomData.timerStatus?@string/on:@string/off)}"
|
|
|
|
- android:textColor="@color/main_text_color"
|
|
|
|
- android:textSize="13sp"
|
|
|
|
- tools:text="定时:关"
|
|
|
|
- android:textStyle="bold"
|
|
|
|
- app:layout_constraintEnd_toEndOf="@id/tv_temp"
|
|
|
|
- app:layout_constraintStart_toStartOf="@id/tv_temp"
|
|
|
|
- app:layout_constraintTop_toBottomOf="@id/tv_mode_lv" />
|
|
|
|
-
|
|
|
|
- <androidx.constraintlayout.widget.ConstraintLayout
|
|
|
|
- android:id="@+id/cl_air_info"
|
|
|
|
- android:layout_width="match_parent"
|
|
|
|
- android:layout_height="wrap_content"
|
|
|
|
- app:layout_constraintBottom_toTopOf="@id/ll_fan_speed"
|
|
|
|
- app:layout_constraintTop_toBottomOf="@id/arc_seek_bar">
|
|
|
|
-
|
|
|
|
- <TextView
|
|
|
|
- android:id="@+id/tv_home_temp2"
|
|
|
|
- android:layout_width="wrap_content"
|
|
|
|
- android:layout_height="wrap_content"
|
|
|
|
- android:layout_marginTop="12dp"
|
|
|
|
- android:text="@{String.format(`%d℃`,roomData.temperature)}"
|
|
|
|
- android:textAlignment="center"
|
|
|
|
- android:textColor="@color/main_text_color"
|
|
|
|
- android:textSize="16sp"
|
|
|
|
- android:textStyle="bold"
|
|
|
|
- app:drawableTopCompat="@mipmap/icon_temperature_room"
|
|
|
|
- app:layout_constraintEnd_toStartOf="@id/tv_home_humidity2"
|
|
|
|
- app:layout_constraintStart_toStartOf="parent"
|
|
|
|
- app:layout_constraintTop_toTopOf="parent"
|
|
|
|
- tools:text="13℃" />
|
|
|
|
-
|
|
|
|
- <TextView
|
|
|
|
- android:id="@+id/tv_home_humidity2"
|
|
|
|
- android:layout_width="wrap_content"
|
|
|
|
- android:layout_height="wrap_content"
|
|
|
|
- android:text="@{String.format(`%d%%`,roomData.humidity)}"
|
|
|
|
- android:textAlignment="center"
|
|
|
|
- android:textColor="@color/main_text_color"
|
|
|
|
- android:textSize="16sp"
|
|
|
|
- android:textStyle="bold"
|
|
|
|
- app:drawableTopCompat="@mipmap/icon_humidity_room"
|
|
|
|
- app:layout_constraintEnd_toStartOf="@id/tv_pm_2_5"
|
|
|
|
- app:layout_constraintStart_toEndOf="@id/tv_home_temp2"
|
|
|
|
- app:layout_constraintTop_toTopOf="@id/tv_home_temp2"
|
|
|
|
- tools:text="55%" />
|
|
|
|
-
|
|
|
|
- <TextView
|
|
|
|
- android:id="@+id/tv_pm_2_5"
|
|
|
|
- android:layout_width="wrap_content"
|
|
|
|
- android:layout_height="wrap_content"
|
|
|
|
- android:text="@{String.format(`%d`,roomData.pm25)}"
|
|
|
|
- android:textAlignment="center"
|
|
|
|
- android:textColor="@color/main_text_color"
|
|
|
|
- android:textSize="16sp"
|
|
|
|
- android:textStyle="bold"
|
|
|
|
- app:drawableTopCompat="@mipmap/icon_pm2_5_room"
|
|
|
|
- app:layout_constraintEnd_toStartOf="@id/tv_co2"
|
|
|
|
- app:layout_constraintStart_toEndOf="@id/tv_home_humidity2"
|
|
|
|
- app:layout_constraintTop_toTopOf="@id/tv_home_humidity2"
|
|
|
|
- tools:text="400" />
|
|
|
|
-
|
|
|
|
- <TextView
|
|
|
|
- android:id="@+id/tv_co2"
|
|
|
|
- android:layout_width="wrap_content"
|
|
|
|
- android:layout_height="wrap_content"
|
|
|
|
- android:text="@{String.format(`%d`,roomData.co2)}"
|
|
|
|
- android:textAlignment="center"
|
|
|
|
- android:textColor="@color/main_text_color"
|
|
|
|
- android:textSize="16sp"
|
|
|
|
- android:textStyle="bold"
|
|
|
|
- app:drawableTopCompat="@mipmap/icon_co2_room"
|
|
|
|
- app:layout_constraintEnd_toEndOf="parent"
|
|
|
|
- app:layout_constraintStart_toEndOf="@id/tv_pm_2_5"
|
|
|
|
- app:layout_constraintTop_toTopOf="@id/tv_pm_2_5"
|
|
|
|
- tools:text="400" />
|
|
|
|
- </androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
-
|
|
|
|
|
|
+ android:layout_height="match_parent"
|
|
|
|
+ android:background="@color/c_FBFBFB"
|
|
|
|
+ android:id="@+id/fra_room_ctrl_sl"
|
|
|
|
+ >
|
|
|
|
|
|
<LinearLayout
|
|
<LinearLayout
|
|
- android:id="@+id/ll_fan_speed"
|
|
|
|
android:layout_width="match_parent"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
- android:layout_marginStart="25dp"
|
|
|
|
- android:layout_marginTop="20dp"
|
|
|
|
- android:layout_marginEnd="25dp"
|
|
|
|
- android:background="@drawable/bg_device_ctrl_btn"
|
|
|
|
- android:gravity="center_vertical"
|
|
|
|
- android:orientation="horizontal"
|
|
|
|
- app:layout_constraintBottom_toBottomOf="parent"
|
|
|
|
- app:layout_constraintHorizontal_chainStyle="spread_inside"
|
|
|
|
- app:layout_constraintTop_toBottomOf="@id/cl_air_info">
|
|
|
|
-
|
|
|
|
- <androidx.appcompat.widget.AppCompatImageView
|
|
|
|
- android:layout_width="30dp"
|
|
|
|
- android:layout_height="30dp"
|
|
|
|
- android:layout_marginStart="10dp"
|
|
|
|
- android:layout_marginTop="25dp"
|
|
|
|
- android:layout_marginBottom="25dp"
|
|
|
|
- app:srcCompat="@mipmap/icon_fan" />
|
|
|
|
-
|
|
|
|
- <com.jaygoo.widget.RangeSeekBar
|
|
|
|
- android:id="@+id/range_seek_bar"
|
|
|
|
- android:layout_width="match_parent"
|
|
|
|
- android:layout_height="wrap_content"
|
|
|
|
- android:layout_marginStart="3dp"
|
|
|
|
- android:layout_marginEnd="6dp"
|
|
|
|
- app:rsb_gravity="center"
|
|
|
|
- app:rsb_max="4"
|
|
|
|
- app:rsb_min="0"
|
|
|
|
- app:rsb_mode="single"
|
|
|
|
- app:rsb_progress_color="@color/device_ctrl_seek_bar_progress_color"
|
|
|
|
- app:rsb_progress_default_color="@color/device_ctrl_seek_bar_progress_default_color"
|
|
|
|
- app:rsb_progress_height="12dp"
|
|
|
|
- app:rsb_progress_radius="10dp"
|
|
|
|
- app:rsb_step_auto_bonding="true"
|
|
|
|
- app:rsb_step_color="@color/white"
|
|
|
|
- app:rsb_step_height="8dp"
|
|
|
|
- app:rsb_step_radius="4dp"
|
|
|
|
- app:rsb_step_width="1dp"
|
|
|
|
- app:rsb_steps="4"
|
|
|
|
- app:rsb_thumb_height="18dp"
|
|
|
|
- app:rsb_thumb_scale_ratio="1.2"
|
|
|
|
- app:rsb_thumb_width="18dp"
|
|
|
|
- app:rsb_tick_mark_gravity="center"
|
|
|
|
- app:rsb_tick_mark_mode="other"
|
|
|
|
- app:rsb_tick_mark_number="6" />
|
|
|
|
|
|
+ android:orientation="vertical"
|
|
|
|
+ tools:context=".ui.ctrl.RoomCtrlFragment">
|
|
|
|
|
|
|
|
|
|
- </LinearLayout>
|
|
|
|
-
|
|
|
|
|
|
+ <!--模式按钮-->
|
|
|
|
|
|
- </androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
|
|
|
|
- <!--新风、开关、定时-->
|
|
|
|
- <LinearLayout
|
|
|
|
- android:layout_width="match_parent"
|
|
|
|
- android:layout_height="wrap_content"
|
|
|
|
- android:layout_marginStart="26dp"
|
|
|
|
- android:layout_marginEnd="26dp"
|
|
|
|
- android:layout_marginBottom="30dp"
|
|
|
|
- android:orientation="horizontal">
|
|
|
|
|
|
+ <HorizontalScrollView
|
|
|
|
+ android:id="@+id/hsv"
|
|
|
|
+ android:layout_width="match_parent"
|
|
|
|
+ android:layout_height="wrap_content"
|
|
|
|
+ android:scrollbars="none"
|
|
|
|
+ android:layout_marginTop="10dp"
|
|
|
|
+ tools:ignore="SpeakableTextPresentCheck">
|
|
|
|
+
|
|
|
|
+ <!--<androidx.constraintlayout.widget.ConstraintLayout-->
|
|
|
|
+ <!-- android:layout_width="match_parent"-->
|
|
|
|
+ <!-- android:layout_height="wrap_content"-->
|
|
|
|
+ <!-- android:layout_marginStart="25dp"-->
|
|
|
|
+ <!-- android:layout_marginEnd="25dp"-->
|
|
|
|
+ <!-- tools:context="ui.ctrl.RoomCtrlFragment">-->
|
|
|
|
+ <LinearLayout
|
|
|
|
+ android:layout_width="wrap_content"
|
|
|
|
+ android:layout_height="wrap_content"
|
|
|
|
+ android:orientation="horizontal">
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ <LinearLayout
|
|
|
|
+ android:id="@+id/ll_zhi_leng"
|
|
|
|
+ android:layout_width="70dp"
|
|
|
|
+ android:layout_height="70dp"
|
|
|
|
+ android:layout_marginStart="20dp"
|
|
|
|
+ android:background="@{roomData.power && roomData.mode == ModeType.ZHI_LENG.typeCode? @drawable/bg_device_ctrl_btn_sel :@drawable/bg_device_ctrl_btn}"
|
|
|
|
+ android:gravity="center"
|
|
|
|
+ app:layout_constraintDimensionRatio="h,1:1"
|
|
|
|
+ app:layout_constraintEnd_toStartOf="@id/ll_zhi_re"
|
|
|
|
+ app:layout_constraintHorizontal_chainStyle="spread_inside"
|
|
|
|
+ app:layout_constraintStart_toStartOf="parent"
|
|
|
|
+ app:layout_constraintTop_toTopOf="parent"
|
|
|
|
+ app:layout_constraintWidth_percent="0.18">
|
|
|
|
+
|
|
|
|
+ <androidx.appcompat.widget.AppCompatImageView
|
|
|
|
+ srcString="@{roomData.power && roomData.mode == ModeType.ZHI_LENG.typeCode? `icon_refrigeration_sel` :`icon_refrigeration`}"
|
|
|
|
+ android:layout_width="70dp"
|
|
|
|
+ android:layout_height="70dp"
|
|
|
|
+ tools:srcCompat="@mipmap/icon_refrigeration" />
|
|
|
|
+
|
|
|
|
+ </LinearLayout>
|
|
|
|
+
|
|
|
|
+ <LinearLayout
|
|
|
|
+ android:id="@+id/ll_zhi_re"
|
|
|
|
+ android:layout_width="70dp"
|
|
|
|
+ android:layout_height="70dp"
|
|
|
|
+ android:layout_marginStart="20dp"
|
|
|
|
+ android:background="@{roomData.power && roomData.mode == ModeType.ZHI_RE.typeCode? @drawable/bg_device_ctrl_btn_sel :@drawable/bg_device_ctrl_btn}"
|
|
|
|
+ android:gravity="center"
|
|
|
|
+ app:layout_constraintDimensionRatio="h,1:1"
|
|
|
|
+ app:layout_constraintEnd_toStartOf="@id/ll_chu_shi"
|
|
|
|
+ app:layout_constraintStart_toEndOf="@id/ll_zhi_leng"
|
|
|
|
+ app:layout_constraintTop_toTopOf="parent"
|
|
|
|
+ app:layout_constraintWidth_percent="0.18"
|
|
|
|
+ tools:background="@drawable/bg_device_ctrl_btn_sel">
|
|
|
|
+
|
|
|
|
+ <androidx.appcompat.widget.AppCompatImageView
|
|
|
|
+ srcString="@{roomData.power && roomData.mode == ModeType.ZHI_RE.typeCode? `icon_heating_sel` :`icon_heating`}"
|
|
|
|
+ android:layout_width="70dp"
|
|
|
|
+ android:layout_height="70dp"
|
|
|
|
+ tools:srcCompat="@mipmap/icon_heating_sel" />
|
|
|
|
+
|
|
|
|
+ </LinearLayout>
|
|
|
|
+
|
|
|
|
+ <LinearLayout
|
|
|
|
+ android:id="@+id/ll_chu_shi"
|
|
|
|
+ android:layout_width="70dp"
|
|
|
|
+ android:layout_height="70dp"
|
|
|
|
+ android:layout_marginStart="20dp"
|
|
|
|
+ android:background="@{roomData.power && roomData.mode == ModeType.CHU_SHI.typeCode? @drawable/bg_device_ctrl_btn_sel :@drawable/bg_device_ctrl_btn}"
|
|
|
|
+ android:gravity="center"
|
|
|
|
+ app:layout_constraintDimensionRatio="h,1:1"
|
|
|
|
+ app:layout_constraintEnd_toStartOf="@id/ll_song_feng"
|
|
|
|
+ app:layout_constraintStart_toEndOf="@id/ll_zhi_re"
|
|
|
|
+ app:layout_constraintTop_toTopOf="parent"
|
|
|
|
+ app:layout_constraintWidth_percent="0.18">
|
|
|
|
+
|
|
|
|
+ <androidx.appcompat.widget.AppCompatImageView
|
|
|
|
+ srcString="@{roomData.power && roomData.mode == ModeType.CHU_SHI.typeCode? `icon_dehumidification_sel` :`icon_dehumidification`}"
|
|
|
|
+ android:layout_width="70dp"
|
|
|
|
+ android:layout_height="70dp"
|
|
|
|
+ tools:srcCompat="@mipmap/icon_dehumidification" />
|
|
|
|
+
|
|
|
|
+ </LinearLayout>
|
|
|
|
+
|
|
|
|
+ <LinearLayout
|
|
|
|
+ android:id="@+id/ll_song_feng"
|
|
|
|
+ android:layout_width="70dp"
|
|
|
|
+ android:layout_height="70dp"
|
|
|
|
+ android:layout_marginStart="20dp"
|
|
|
|
+ android:background="@{roomData.power && roomData.mode == ModeType.SONG_FENG.typeCode? @drawable/bg_device_ctrl_btn_sel :@drawable/bg_device_ctrl_btn}"
|
|
|
|
+ android:gravity="center"
|
|
|
|
+ app:layout_constraintDimensionRatio="h,1:1"
|
|
|
|
+ app:layout_constraintEnd_toEndOf="parent"
|
|
|
|
+ app:layout_constraintStart_toEndOf="@id/ll_chu_shi"
|
|
|
|
+ app:layout_constraintTop_toTopOf="parent"
|
|
|
|
+ app:layout_constraintWidth_percent="0.18">
|
|
|
|
+
|
|
|
|
+ <androidx.appcompat.widget.AppCompatImageView
|
|
|
|
+ srcString="@{roomData.power && roomData.mode == ModeType.SONG_FENG.typeCode? `icon_wind_sel` :`icon_wind`}"
|
|
|
|
+ android:layout_width="70dp"
|
|
|
|
+ android:layout_height="70dp"
|
|
|
|
+ tools:srcCompat="@mipmap/icon_wind" />
|
|
|
|
+
|
|
|
|
+ </LinearLayout>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ <LinearLayout
|
|
|
|
+ android:id="@+id/ll_jia_shi"
|
|
|
|
+ android:layout_width="70dp"
|
|
|
|
+ android:layout_height="70dp"
|
|
|
|
+ android:layout_marginStart="20dp"
|
|
|
|
+ android:layout_marginEnd="20dp"
|
|
|
|
+ android:background="@{roomData.power && roomData.mode == ModeType.JIA_SHI.typeCode? @drawable/bg_device_ctrl_btn_sel :@drawable/bg_device_ctrl_btn}"
|
|
|
|
+ android:gravity="center"
|
|
|
|
+ app:layout_constraintDimensionRatio="h,1:1"
|
|
|
|
+ app:layout_constraintEnd_toEndOf="parent"
|
|
|
|
+ app:layout_constraintStart_toEndOf="@id/ll_chu_shi"
|
|
|
|
+ app:layout_constraintTop_toTopOf="parent"
|
|
|
|
+ app:layout_constraintWidth_percent="0.18">
|
|
|
|
+
|
|
|
|
+ <androidx.appcompat.widget.AppCompatImageView
|
|
|
|
+ srcString="@{roomData.power && roomData.mode == ModeType.JIA_SHI.typeCode? `icon_humidify_sel` :`icon_humidify`}"
|
|
|
|
+ android:layout_width="70dp"
|
|
|
|
+ android:layout_height="70dp"
|
|
|
|
+ tools:srcCompat="@mipmap/icon_humidify" />
|
|
|
|
+
|
|
|
|
+ </LinearLayout>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ </LinearLayout>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ </HorizontalScrollView>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ <!--控制-->
|
|
|
|
+ <androidx.constraintlayout.widget.ConstraintLayout
|
|
|
|
+ android:layout_width="match_parent"
|
|
|
|
+ android:layout_height="0dp"
|
|
|
|
+ android:layout_weight="1">
|
|
|
|
+
|
|
|
|
+ <com.king.view.arcseekbar.ArcSeekBar
|
|
|
|
+ android:id="@+id/arc_seek_bar"
|
|
|
|
+ android:layout_width="0dp"
|
|
|
|
+ android:layout_height="0dp"
|
|
|
|
+ android:layout_marginTop="40dp"
|
|
|
|
+ android:padding="10dp"
|
|
|
|
+ app:arcMax="14"
|
|
|
|
+ app:arcNormalColor="@color/device_ctrl_panel_bg_color"
|
|
|
|
+ app:arcProgressColor="@color/device_ctrl_panel_progress_color"
|
|
|
|
+ app:arcShowLabel="false"
|
|
|
|
+ app:arcStartAngle="130"
|
|
|
|
+ app:arcStrokeWidth="20dp"
|
|
|
|
+ app:arcSweepAngle="280"
|
|
|
|
+ app:arcThumbColor="@color/white"
|
|
|
|
+ app:arcThumbInnerDotWidth="16dp"
|
|
|
|
+ app:arcThumbShadowColor="#20000000"
|
|
|
|
+ app:arcThumbShadowRadius="5dp"
|
|
|
|
+ app:arcThumbWidth="20dp"
|
|
|
|
+ app:layout_constraintDimensionRatio="h,1:1"
|
|
|
|
+ app:layout_constraintEnd_toEndOf="parent"
|
|
|
|
+ app:layout_constraintStart_toStartOf="parent"
|
|
|
|
+ app:layout_constraintTop_toTopOf="parent"
|
|
|
|
+ app:layout_constraintWidth_percent="0.66" />
|
|
|
|
|
|
- <!--新风-->
|
|
|
|
- <LinearLayout
|
|
|
|
- android:id="@+id/ll_xin_feng"
|
|
|
|
- android:layout_width="0dp"
|
|
|
|
- android:layout_height="match_parent"
|
|
|
|
- android:layout_marginEnd="9dp"
|
|
|
|
- android:layout_weight="1"
|
|
|
|
- android:background="@{roomData.freshAir && roomData.power? @drawable/bg_device_ctrl_btn_sel :@drawable/bg_device_ctrl_btn}"
|
|
|
|
- android:gravity="center"
|
|
|
|
- app:layout_constraintBottom_toBottomOf="parent"
|
|
|
|
- app:layout_constraintStart_toStartOf="parent"
|
|
|
|
- app:layout_constraintTop_toTopOf="parent"
|
|
|
|
- tools:background="@drawable/bg_device_ctrl_btn_sel">
|
|
|
|
-
|
|
|
|
- <androidx.appcompat.widget.AppCompatImageView
|
|
|
|
- srcString="@{roomData.freshAir && roomData.power ? `icon_air_sel` :`icon_air`}"
|
|
|
|
- android:layout_width="40dp"
|
|
|
|
- android:layout_height="40dp"
|
|
|
|
- android:layout_marginTop="22dp"
|
|
|
|
- android:layout_marginBottom="22dp"
|
|
|
|
- tools:srcCompat="@mipmap/icon_air_sel" />
|
|
|
|
- </LinearLayout>
|
|
|
|
|
|
+ <TextView
|
|
|
|
+ android:id="@+id/tv_temp"
|
|
|
|
+ android:layout_width="wrap_content"
|
|
|
|
+ android:layout_height="wrap_content"
|
|
|
|
+ android:layout_marginBottom="30dp"
|
|
|
|
+ android:includeFontPadding="false"
|
|
|
|
+ android:text="@{String.format(`%d`,roomData.setTemp)}"
|
|
|
|
+ android:textColor="@color/main_text_color"
|
|
|
|
+ android:textSize="46sp"
|
|
|
|
+ android:textStyle="bold"
|
|
|
|
+ app:layout_constraintBottom_toBottomOf="@id/arc_seek_bar"
|
|
|
|
+ app:layout_constraintEnd_toEndOf="@id/arc_seek_bar"
|
|
|
|
+ app:layout_constraintStart_toStartOf="@id/arc_seek_bar"
|
|
|
|
+ app:layout_constraintTop_toTopOf="@id/arc_seek_bar"
|
|
|
|
+ tools:text="28" />
|
|
|
|
|
|
- <LinearLayout
|
|
|
|
- android:id="@+id/ll_switch"
|
|
|
|
- android:layout_width="0dp"
|
|
|
|
- android:layout_height="wrap_content"
|
|
|
|
- android:layout_marginHorizontal="9dp"
|
|
|
|
- android:layout_weight="1"
|
|
|
|
- android:background="@{roomData.power? @drawable/bg_device_ctrl_btn_sel :@drawable/bg_device_ctrl_btn}"
|
|
|
|
- android:gravity="center"
|
|
|
|
- app:layout_constraintBottom_toBottomOf="parent"
|
|
|
|
- app:layout_constraintStart_toStartOf="parent"
|
|
|
|
- app:layout_constraintTop_toTopOf="parent"
|
|
|
|
- tools:background="@drawable/bg_device_ctrl_btn_sel">
|
|
|
|
-
|
|
|
|
- <androidx.appcompat.widget.AppCompatImageView
|
|
|
|
- srcString="@{roomData.power ? `icon_on_sel` :`icon_on_sel_1`}"
|
|
|
|
- android:layout_width="46dp"
|
|
|
|
- android:layout_height="46dp"
|
|
|
|
- android:layout_marginTop="22dp"
|
|
|
|
- android:layout_marginBottom="22dp"
|
|
|
|
- tools:srcCompat="@mipmap/icon_on_sel" />
|
|
|
|
- </LinearLayout>
|
|
|
|
|
|
+ <TextView
|
|
|
|
+ android:id="@+id/tv_mark"
|
|
|
|
+ android:layout_width="wrap_content"
|
|
|
|
+ android:layout_height="wrap_content"
|
|
|
|
+ android:layout_marginTop="12sp"
|
|
|
|
+ android:includeFontPadding="false"
|
|
|
|
+ android:text="℃"
|
|
|
|
+ android:textColor="@color/main_text_color"
|
|
|
|
+ android:textSize="25sp"
|
|
|
|
+ android:textStyle="bold"
|
|
|
|
+ app:layout_constraintStart_toEndOf="@id/tv_temp"
|
|
|
|
+ app:layout_constraintTop_toTopOf="@id/tv_temp" />
|
|
|
|
|
|
- <LinearLayout
|
|
|
|
- android:id="@+id/ll_timer"
|
|
|
|
- android:layout_width="0dp"
|
|
|
|
- android:layout_height="match_parent"
|
|
|
|
- android:layout_marginStart="9dp"
|
|
|
|
- android:layout_weight="1"
|
|
|
|
- android:background="@{roomData.timerStatus?@drawable/bg_device_ctrl_btn_sel:@drawable/bg_device_ctrl_btn}"
|
|
|
|
- android:gravity="center"
|
|
|
|
- app:layout_constraintBottom_toBottomOf="@id/ll_switch"
|
|
|
|
- app:layout_constraintEnd_toEndOf="parent"
|
|
|
|
- app:layout_constraintStart_toEndOf="@id/ll_switch"
|
|
|
|
- app:layout_constraintTop_toTopOf="@id/ll_switch"
|
|
|
|
- tools:background="@drawable/bg_device_ctrl_btn_sel">
|
|
|
|
-
|
|
|
|
- <androidx.appcompat.widget.AppCompatImageView
|
|
|
|
- android:layout_width="46dp"
|
|
|
|
- android:layout_height="46dp"
|
|
|
|
- android:visibility="@{roomData.timerStatus?View.GONE:View.VISIBLE}"
|
|
|
|
- app:srcCompat="@mipmap/icon_time"
|
|
|
|
- tools:visibility="gone" />
|
|
|
|
|
|
+ <androidx.appcompat.widget.AppCompatImageView
|
|
|
|
+ android:id="@+id/iv_less"
|
|
|
|
+ android:layout_width="38dp"
|
|
|
|
+ android:layout_height="45dp"
|
|
|
|
+ android:paddingStart="10dp"
|
|
|
|
+ android:paddingEnd="10dp"
|
|
|
|
+ app:layout_constraintBottom_toBottomOf="@id/arc_seek_bar"
|
|
|
|
+ app:layout_constraintDimensionRatio="h,1:1"
|
|
|
|
+ app:layout_constraintStart_toStartOf="@id/arc_seek_bar"
|
|
|
|
+ app:layout_constraintWidth_percent="0.1"
|
|
|
|
+ app:srcCompat="@mipmap/icon_reduce" />
|
|
|
|
|
|
- <LinearLayout
|
|
|
|
- android:layout_width="wrap_content"
|
|
|
|
- android:layout_height="wrap_content"
|
|
|
|
- android:gravity="center"
|
|
|
|
- android:orientation="vertical"
|
|
|
|
- android:visibility="@{roomData.timerStatus?View.VISIBLE:View.GONE}">
|
|
|
|
|
|
|
|
<androidx.appcompat.widget.AppCompatImageView
|
|
<androidx.appcompat.widget.AppCompatImageView
|
|
- android:layout_width="40dp"
|
|
|
|
- android:layout_height="40dp"
|
|
|
|
- app:srcCompat="@mipmap/icon_time_sel" />
|
|
|
|
|
|
+ android:id="@+id/iv_add"
|
|
|
|
+ android:layout_width="38dp"
|
|
|
|
+ android:layout_height="45dp"
|
|
|
|
+ android:paddingStart="10dp"
|
|
|
|
+ android:paddingEnd="10dp"
|
|
|
|
+ app:layout_constraintBottom_toBottomOf="@id/arc_seek_bar"
|
|
|
|
+ app:layout_constraintDimensionRatio="h,1:1"
|
|
|
|
+ app:layout_constraintEnd_toEndOf="@id/arc_seek_bar"
|
|
|
|
+ app:layout_constraintWidth_percent="0.1"
|
|
|
|
+ app:srcCompat="@mipmap/icon_add_1" />
|
|
|
|
|
|
<TextView
|
|
<TextView
|
|
|
|
+ android:id="@+id/tv_mode_lv"
|
|
|
|
+ lv="@{roomData.fanSpeed}"
|
|
|
|
+ mode="@{roomData.mode}"
|
|
android:layout_width="wrap_content"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
- android:text="@{@string/timing_off(String.format(`%.1f`,roomData.duration).replace(`.0`,``))}"
|
|
|
|
- android:textColor="@color/white"
|
|
|
|
- android:textSize="14sp"
|
|
|
|
- tools:text="OFF\u0020\u00201 h" />
|
|
|
|
-
|
|
|
|
- </LinearLayout>
|
|
|
|
|
|
+ android:textColor="@color/main_text_color"
|
|
|
|
+ android:textSize="13sp"
|
|
|
|
+ android:textStyle="bold"
|
|
|
|
+ android:visibility="@{roomData.power?View.VISIBLE:View.GONE}"
|
|
|
|
+ app:layout_constraintEnd_toEndOf="@id/tv_temp"
|
|
|
|
+ app:layout_constraintStart_toStartOf="@id/tv_temp"
|
|
|
|
+ app:layout_constraintTop_toBottomOf="@id/tv_temp"
|
|
|
|
+ tools:text="制冷 一档" />
|
|
|
|
|
|
-
|
|
|
|
- </LinearLayout>
|
|
|
|
|
|
+ <TextView
|
|
|
|
+ android:id="@+id/tv_timer"
|
|
|
|
+ android:layout_width="wrap_content"
|
|
|
|
+ android:layout_height="wrap_content"
|
|
|
|
+ android:text="@{@string/timer_status(roomData.timerStatus?@string/on:@string/off)}"
|
|
|
|
+ android:textColor="@color/main_text_color"
|
|
|
|
+ android:textSize="13sp"
|
|
|
|
+ android:textStyle="bold"
|
|
|
|
+ app:layout_constraintEnd_toEndOf="@id/tv_temp"
|
|
|
|
+ app:layout_constraintStart_toStartOf="@id/tv_temp"
|
|
|
|
+ app:layout_constraintTop_toBottomOf="@id/tv_mode_lv"
|
|
|
|
+ tools:text="定时:关" />
|
|
|
|
+
|
|
|
|
+ <androidx.constraintlayout.widget.ConstraintLayout
|
|
|
|
+ android:id="@+id/cl_air_info"
|
|
|
|
+ android:layout_width="match_parent"
|
|
|
|
+ android:layout_height="wrap_content"
|
|
|
|
+ android:layout_marginStart="25dp"
|
|
|
|
+ android:layout_marginTop="60dp"
|
|
|
|
+ android:layout_marginEnd="25dp"
|
|
|
|
+ android:background="@drawable/bg_device_ctrl_bg"
|
|
|
|
+ android:paddingStart="20dp"
|
|
|
|
+ android:paddingEnd="20dp"
|
|
|
|
+ android:paddingBottom="12dp"
|
|
|
|
+ app:layout_constraintBottom_toTopOf="@id/ll_fan_speed"
|
|
|
|
+ app:layout_constraintHorizontal_chainStyle="packed"
|
|
|
|
+ app:layout_constraintTop_toBottomOf="@id/arc_seek_bar">
|
|
|
|
+
|
|
|
|
+ <TextView
|
|
|
|
+ android:id="@+id/tv_home_temp2"
|
|
|
|
+ android:layout_width="wrap_content"
|
|
|
|
+ android:layout_height="wrap_content"
|
|
|
|
+ android:layout_marginTop="12dp"
|
|
|
|
+ android:drawablePadding="5dp"
|
|
|
|
+ android:text="@{String.format(`%d℃`,roomData.temperature)}"
|
|
|
|
+ android:textAlignment="center"
|
|
|
|
+ android:textColor="@color/main_text_color"
|
|
|
|
+ android:textSize="16sp"
|
|
|
|
+ android:textStyle="bold"
|
|
|
|
+ app:drawableTopCompat="@mipmap/icon_temperature_room"
|
|
|
|
+ app:layout_constraintEnd_toStartOf="@id/tv_home_humidity2"
|
|
|
|
+ app:layout_constraintHorizontal_chainStyle="spread_inside"
|
|
|
|
+ app:layout_constraintStart_toStartOf="parent"
|
|
|
|
+ app:layout_constraintTop_toTopOf="parent"
|
|
|
|
+
|
|
|
|
+ tools:text="13℃" />
|
|
|
|
+
|
|
|
|
+ <TextView
|
|
|
|
+ android:id="@+id/tv_home_humidity2"
|
|
|
|
+ android:layout_width="wrap_content"
|
|
|
|
+ android:layout_height="wrap_content"
|
|
|
|
+ android:drawablePadding="5dp"
|
|
|
|
+ android:text="@{String.format(`%d%%`,roomData.humidity)}"
|
|
|
|
+ android:textAlignment="center"
|
|
|
|
+ android:textColor="@color/main_text_color"
|
|
|
|
+ android:textSize="16sp"
|
|
|
|
+ android:textStyle="bold"
|
|
|
|
+ app:drawableTopCompat="@mipmap/icon_humidity_room"
|
|
|
|
+ app:layout_constraintEnd_toStartOf="@id/tv_pm_2_5"
|
|
|
|
+ app:layout_constraintStart_toEndOf="@id/tv_home_temp2"
|
|
|
|
+ app:layout_constraintTop_toTopOf="@id/tv_home_temp2"
|
|
|
|
+ tools:text="55%" />
|
|
|
|
+
|
|
|
|
+ <TextView
|
|
|
|
+ android:id="@+id/tv_pm_2_5"
|
|
|
|
+ android:layout_width="wrap_content"
|
|
|
|
+ android:layout_height="wrap_content"
|
|
|
|
+ android:drawablePadding="5dp"
|
|
|
|
+ android:text="@{String.format(`%d`,roomData.pm25)}"
|
|
|
|
+ android:textAlignment="center"
|
|
|
|
+ android:textColor="@color/main_text_color"
|
|
|
|
+ android:textSize="16sp"
|
|
|
|
+ android:textStyle="bold"
|
|
|
|
+ app:drawableTopCompat="@mipmap/icon_pm2_5_room"
|
|
|
|
+ app:layout_constraintEnd_toStartOf="@id/tv_co2"
|
|
|
|
+ app:layout_constraintStart_toEndOf="@id/tv_home_humidity2"
|
|
|
|
+ app:layout_constraintTop_toTopOf="@id/tv_home_humidity2"
|
|
|
|
+ tools:text="400" />
|
|
|
|
+
|
|
|
|
+ <TextView
|
|
|
|
+ android:id="@+id/tv_co2"
|
|
|
|
+ android:layout_width="wrap_content"
|
|
|
|
+ android:layout_height="wrap_content"
|
|
|
|
+ android:drawablePadding="5dp"
|
|
|
|
+ android:text="@{String.format(`%d`,roomData.co2)}"
|
|
|
|
+ android:textAlignment="center"
|
|
|
|
+ android:textColor="@color/main_text_color"
|
|
|
|
+ android:textSize="16sp"
|
|
|
|
+ android:textStyle="bold"
|
|
|
|
+ app:drawableTopCompat="@mipmap/icon_co2_room"
|
|
|
|
+ app:layout_constraintEnd_toEndOf="parent"
|
|
|
|
+ app:layout_constraintStart_toEndOf="@id/tv_pm_2_5"
|
|
|
|
+ app:layout_constraintTop_toTopOf="@id/tv_pm_2_5"
|
|
|
|
+ tools:text="400" />
|
|
|
|
+ </androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ <LinearLayout
|
|
|
|
+ android:id="@+id/ll_fan_speed"
|
|
|
|
+ android:layout_width="match_parent"
|
|
|
|
+ android:layout_height="wrap_content"
|
|
|
|
+ android:layout_marginStart="25dp"
|
|
|
|
+ android:layout_marginTop="20dp"
|
|
|
|
+ android:layout_marginEnd="25dp"
|
|
|
|
+ android:background="@drawable/bg_device_ctrl_bg"
|
|
|
|
+ android:gravity="center_vertical"
|
|
|
|
+ android:orientation="horizontal"
|
|
|
|
+ app:layout_constraintBottom_toBottomOf="parent"
|
|
|
|
+ app:layout_constraintHorizontal_chainStyle="spread_inside"
|
|
|
|
+ app:layout_constraintTop_toBottomOf="@id/cl_air_info">
|
|
|
|
+
|
|
|
|
+ <androidx.appcompat.widget.AppCompatImageView
|
|
|
|
+ android:layout_width="22dp"
|
|
|
|
+ android:layout_height="22dp"
|
|
|
|
+ android:layout_marginStart="15dp"
|
|
|
|
+ android:layout_marginTop="25dp"
|
|
|
|
+ android:layout_marginBottom="25dp"
|
|
|
|
+ app:srcCompat="@mipmap/icon_fan" />
|
|
|
|
+
|
|
|
|
+ <ImageView
|
|
|
|
+ android:layout_width="50dp"
|
|
|
|
+ android:layout_height="12dp"
|
|
|
|
+ android:layout_marginStart="6dp"
|
|
|
|
+ android:background="@drawable/room_seekbar_left_bg"
|
|
|
|
+ android:contentDescription="@string/room_seekbar_left_bg" />
|
|
|
|
+
|
|
|
|
+ <com.jaygoo.widget.RangeSeekBar
|
|
|
|
+ android:id="@+id/range_seek_bar"
|
|
|
|
+ android:layout_width="match_parent"
|
|
|
|
+ android:layout_height="wrap_content"
|
|
|
|
+ android:layout_marginEnd="5dp"
|
|
|
|
+ android:paddingEnd="5dp"
|
|
|
|
+ android:paddingStart="0dp"
|
|
|
|
+ app:rsb_gravity="center"
|
|
|
|
+ app:rsb_max="4"
|
|
|
|
+ app:rsb_min="0"
|
|
|
|
+ app:rsb_mode="single"
|
|
|
|
+ app:rsb_progress_drawable_default="@drawable/room_seekbar_default_bg"
|
|
|
|
+ app:rsb_progress_drawable="@drawable/room_seekbar_bg"
|
|
|
|
+ app:rsb_progress_height="12dp"
|
|
|
|
+ android:layout_marginStart="-18dp"
|
|
|
|
+ app:rsb_step_auto_bonding="true"
|
|
|
|
+ app:rsb_step_color="@color/white"
|
|
|
|
+ app:rsb_step_height="8dp"
|
|
|
|
+ app:rsb_step_radius="4dp"
|
|
|
|
+ app:rsb_step_width="1dp"
|
|
|
|
+ app:rsb_steps="4"
|
|
|
|
+ app:rsb_thumb_height="33dp"
|
|
|
|
+ app:rsb_thumb_scale_ratio="1"
|
|
|
|
+ app:rsb_thumb_width="33dp"
|
|
|
|
+ app:rsb_thumb_drawable="@drawable/rsb_thumb_drawable"
|
|
|
|
+ app:rsb_tick_mark_gravity="center"
|
|
|
|
+ app:rsb_tick_mark_mode="other"
|
|
|
|
+ app:rsb_tick_mark_number="6" />
|
|
|
|
+
|
|
|
|
+ </LinearLayout>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ </androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
+
|
|
|
|
+ <!--新风、开关、定时-->
|
|
|
|
+ <LinearLayout
|
|
|
|
+ android:layout_width="match_parent"
|
|
|
|
+ android:layout_height="70dp"
|
|
|
|
+ android:layout_marginStart="26dp"
|
|
|
|
+ android:layout_marginTop="60dp"
|
|
|
|
+ android:layout_marginEnd="26dp"
|
|
|
|
+ android:layout_marginBottom="30dp"
|
|
|
|
+ android:orientation="horizontal">
|
|
|
|
+
|
|
|
|
+ <!--新风-->
|
|
|
|
+ <LinearLayout
|
|
|
|
+ android:id="@+id/ll_xin_feng"
|
|
|
|
+ android:layout_width="0dp"
|
|
|
|
+ android:layout_height="match_parent"
|
|
|
|
+ android:layout_marginEnd="9dp"
|
|
|
|
+ android:layout_weight="1"
|
|
|
|
+ android:background="@{roomData.freshAir && roomData.power? @drawable/bg_device_ctrl_btn_sel :@drawable/bg_device_ctrl_btn}"
|
|
|
|
+ android:gravity="center"
|
|
|
|
+ app:layout_constraintBottom_toBottomOf="parent"
|
|
|
|
+ app:layout_constraintStart_toStartOf="parent"
|
|
|
|
+ app:layout_constraintTop_toTopOf="parent"
|
|
|
|
+ tools:background="@drawable/bg_device_ctrl_btn_sel">
|
|
|
|
+
|
|
|
|
+ <androidx.appcompat.widget.AppCompatImageView
|
|
|
|
+ srcString="@{roomData.freshAir && roomData.power ? `icon_air_sel` :`icon_air`}"
|
|
|
|
+ android:layout_width="35dp"
|
|
|
|
+ android:layout_height="35dp"
|
|
|
|
+ android:layout_marginTop="18dp"
|
|
|
|
+ android:layout_marginBottom="18dp"
|
|
|
|
+ tools:srcCompat="@mipmap/icon_air_sel" />
|
|
|
|
+ </LinearLayout>
|
|
|
|
+
|
|
|
|
+ <LinearLayout
|
|
|
|
+ android:id="@+id/ll_switch"
|
|
|
|
+ android:layout_width="0dp"
|
|
|
|
+ android:layout_height="wrap_content"
|
|
|
|
+ android:layout_marginHorizontal="9dp"
|
|
|
|
+ android:layout_weight="1"
|
|
|
|
+ android:background="@{roomData.power? @drawable/bg_device_ctrl_btn_sel :@drawable/bg_device_ctrl_btn}"
|
|
|
|
+ android:gravity="center"
|
|
|
|
+ app:layout_constraintBottom_toBottomOf="parent"
|
|
|
|
+ app:layout_constraintStart_toStartOf="parent"
|
|
|
|
+ app:layout_constraintTop_toTopOf="parent"
|
|
|
|
+ tools:background="@drawable/bg_device_ctrl_btn_sel">
|
|
|
|
+
|
|
|
|
+ <androidx.appcompat.widget.AppCompatImageView
|
|
|
|
+ srcString="@{roomData.power ? `icon_on_sel` :`icon_on_sel_1`}"
|
|
|
|
+ android:layout_width="35dp"
|
|
|
|
+ android:layout_height="35dp"
|
|
|
|
+ android:layout_marginTop="22dp"
|
|
|
|
+ android:layout_marginBottom="22dp"
|
|
|
|
+ tools:srcCompat="@mipmap/icon_on_sel" />
|
|
|
|
+ </LinearLayout>
|
|
|
|
+
|
|
|
|
+ <LinearLayout
|
|
|
|
+ android:id="@+id/ll_shui_mian"
|
|
|
|
+ android:layout_width="0dp"
|
|
|
|
+ android:layout_height="match_parent"
|
|
|
|
+ android:layout_marginEnd="9dp"
|
|
|
|
+ android:layout_weight="1"
|
|
|
|
+ android:visibility="@{RoomUtils.isShowSleep(roomData.code)?View.VISIBLE:View.GONE}"
|
|
|
|
+ android:background="@{roomData.sleepMode && roomData.power? @drawable/bg_device_ctrl_btn_sel :@drawable/bg_device_ctrl_btn}"
|
|
|
|
+ android:gravity="center"
|
|
|
|
+ app:layout_constraintBottom_toBottomOf="parent"
|
|
|
|
+ app:layout_constraintStart_toStartOf="parent"
|
|
|
|
+ app:layout_constraintTop_toTopOf="parent"
|
|
|
|
+ tools:background="@drawable/bg_device_ctrl_btn_sel">
|
|
|
|
+
|
|
|
|
+ <androidx.appcompat.widget.AppCompatImageView
|
|
|
|
+ srcString="@{roomData.sleepMode && roomData.power ? `icon_sleep` :`icon_sleep_1`}"
|
|
|
|
+ android:layout_width="35dp"
|
|
|
|
+ android:layout_height="35dp"
|
|
|
|
+ android:layout_marginTop="22dp"
|
|
|
|
+ android:layout_marginBottom="22dp"
|
|
|
|
+ tools:srcCompat="@mipmap/icon_sleep" />
|
|
|
|
+ </LinearLayout>
|
|
|
|
+
|
|
|
|
+ <LinearLayout
|
|
|
|
+ android:id="@+id/ll_timer"
|
|
|
|
+ android:layout_width="0dp"
|
|
|
|
+ android:layout_height="match_parent"
|
|
|
|
+ android:layout_marginStart="9dp"
|
|
|
|
+ android:layout_weight="1"
|
|
|
|
+ android:background="@{roomData.timerStatus?@drawable/bg_device_ctrl_btn_sel:@drawable/bg_device_ctrl_btn}"
|
|
|
|
+ android:gravity="center"
|
|
|
|
+ app:layout_constraintBottom_toBottomOf="@id/ll_switch"
|
|
|
|
+ app:layout_constraintEnd_toEndOf="parent"
|
|
|
|
+ app:layout_constraintStart_toEndOf="@id/ll_switch"
|
|
|
|
+ app:layout_constraintTop_toTopOf="@id/ll_switch"
|
|
|
|
+ tools:background="@drawable/bg_device_ctrl_btn_sel">
|
|
|
|
+
|
|
|
|
+ <androidx.appcompat.widget.AppCompatImageView
|
|
|
|
+ android:layout_width="35dp"
|
|
|
|
+ android:layout_height="35dp"
|
|
|
|
+ android:visibility="@{roomData.timerStatus?View.GONE:View.VISIBLE}"
|
|
|
|
+ app:srcCompat="@mipmap/icon_time"
|
|
|
|
+ tools:visibility="gone" />
|
|
|
|
+
|
|
|
|
+ <LinearLayout
|
|
|
|
+ android:layout_width="wrap_content"
|
|
|
|
+ android:layout_height="wrap_content"
|
|
|
|
+ android:gravity="center"
|
|
|
|
+ android:orientation="vertical"
|
|
|
|
+ android:visibility="@{roomData.timerStatus?View.VISIBLE:View.GONE}">
|
|
|
|
+
|
|
|
|
+ <androidx.appcompat.widget.AppCompatImageView
|
|
|
|
+ android:layout_width="25dp"
|
|
|
|
+ android:layout_height="25dp"
|
|
|
|
+ app:srcCompat="@mipmap/icon_time_sel" />
|
|
|
|
+
|
|
|
|
+ <TextView
|
|
|
|
+ android:layout_width="wrap_content"
|
|
|
|
+ android:layout_height="wrap_content"
|
|
|
|
+ android:layout_marginTop="5dp"
|
|
|
|
+ android:text="@{@string/timing_off(String.format(`%.1f`,roomData.duration).replace(`.0`,``))}"
|
|
|
|
+ android:textColor="@color/white"
|
|
|
|
+ android:textSize="14sp"
|
|
|
|
+ tools:text="OFF\u0020\u00201 h" />
|
|
|
|
+
|
|
|
|
+ </LinearLayout>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ </LinearLayout>
|
|
|
|
|
|
|
|
|
|
- </LinearLayout>
|
|
|
|
|
|
+ </LinearLayout>
|
|
|
|
|
|
|
|
+ </LinearLayout>
|
|
|
|
+ </com.rdiot.yx485.view.CustomScrollView>
|
|
</LinearLayout>
|
|
</LinearLayout>
|
|
</layout>
|
|
</layout>
|