mirror of
https://gitee.com/beecue/fastbee.git
synced 2025-12-18 17:05:55 +08:00
完成Android端开发
This commit is contained in:
389
android/app/src/main/res/layout/fragment_device_status.xml
Normal file
389
android/app/src/main/res/layout/fragment_device_status.xml
Normal file
@@ -0,0 +1,389 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- *************************************************
|
||||
* 作者:kerwincui
|
||||
* 时间:2021-06-08
|
||||
* 邮箱:164770707@qq.com
|
||||
* 源码地址:https://gitee.com/kerwincui/wumei-smart
|
||||
* author: kerwincui
|
||||
* create: 2021-06-08
|
||||
* email:164770707@qq.com
|
||||
* source:https://github.com/kerwincui/wumei-smart
|
||||
************************************************** -->
|
||||
<ScrollView 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"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="@dimen/config_margin_10dp"
|
||||
android:layout_marginBottom="0dp"
|
||||
android:background="@color/cardview_light_background"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/config_padding_20dp"
|
||||
android:paddingLeft="@dimen/config_padding_5dp"
|
||||
android:paddingEnd="@dimen/config_padding_5dp">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/config_margin_18dp"
|
||||
android:text="继电器:" />
|
||||
|
||||
<com.xuexiang.xui.widget.button.switchbutton.SwitchButton
|
||||
android:id="@+id/sb_relay"
|
||||
style="@style/SwitchButtonStyle"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="60dp"
|
||||
app:swb_textOff="关"
|
||||
app:swb_textOn="开" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="150dp"
|
||||
android:layout_marginTop="@dimen/config_margin_18dp"
|
||||
android:text="灯状态:" />
|
||||
|
||||
<com.xuexiang.xui.widget.button.switchbutton.SwitchButton
|
||||
android:id="@+id/sb_light"
|
||||
style="@style/SwitchButtonStyle"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="210dp"
|
||||
app:swb_textOff="关"
|
||||
app:swb_textOn="开" />
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="14dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/config_margin_18dp"
|
||||
android:text="彩灯模式:" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/spinner_light_mode"
|
||||
style="@style/SpinnerStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginStart="80dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:layout_marginRight="15dp" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView4"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="31dp"
|
||||
android:text="渐变间隔/ms:" />
|
||||
|
||||
<com.xuexiang.xui.widget.picker.XSeekBar
|
||||
android:id="@+id/xsb_fade_interval"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="80dp"
|
||||
android:layout_marginTop="0dp"
|
||||
app:xsb_insideRangeLineColor="@color/app_color_theme_5"
|
||||
app:xsb_insideRangeLineStrokeWidth="5dp"
|
||||
app:xsb_isShowBubble="true"
|
||||
app:xsb_max="1500"
|
||||
app:xsb_min="0"
|
||||
app:xsb_numberTextColor="#ffffff"
|
||||
app:xsb_numberTextSize="12sp" />
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView5"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="31dp"
|
||||
android:text="渐变时间/ms:" />
|
||||
|
||||
<com.xuexiang.xui.widget.picker.XSeekBar
|
||||
android:id="@+id/xsb_fade_time"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="80dp"
|
||||
android:layout_marginTop="0dp"
|
||||
app:xsb_insideRangeLineColor="@color/app_color_theme_5"
|
||||
app:xsb_insideRangeLineStrokeWidth="5dp"
|
||||
app:xsb_isShowBubble="true"
|
||||
app:xsb_max="1500"
|
||||
app:xsb_min="0"
|
||||
app:xsb_numberTextColor="#ffffff"
|
||||
app:xsb_numberTextSize="12sp" />
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:background="@color/cardview_light_background"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/config_padding_20dp"
|
||||
android:paddingLeft="@dimen/config_padding_5dp"
|
||||
android:paddingEnd="@dimen/config_padding_5dp">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView9"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="31dp"
|
||||
android:text="亮 度:" />
|
||||
|
||||
<com.xuexiang.xui.widget.picker.XSeekBar
|
||||
android:id="@+id/xsb_brightness"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="40dp"
|
||||
android:layout_marginTop="0dp"
|
||||
app:xsb_insideRangeLineColor="@color/app_color_theme_5"
|
||||
app:xsb_insideRangeLineStrokeWidth="10dp"
|
||||
app:xsb_isShowBubble="true"
|
||||
app:xsb_isShowRuler="false"
|
||||
app:xsb_max="100"
|
||||
app:xsb_min="0"
|
||||
app:xsb_numberTextColor="#ffffff"
|
||||
app:xsb_numberTextSize="12sp"
|
||||
app:xsb_outsideRangeLineColor="#f0f0f0"
|
||||
app:xsb_outsideRangeLineStrokeWidth="10dp"
|
||||
app:xsb_rulerColor="@color/xui_config_color_gray_4" />
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView6"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="31dp"
|
||||
android:text="红 色:" />
|
||||
|
||||
<com.xuexiang.xui.widget.picker.XSeekBar
|
||||
android:id="@+id/xsb_red"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="40dp"
|
||||
android:layout_marginTop="0dp"
|
||||
app:xsb_insideRangeLineColor="@color/danger"
|
||||
app:xsb_insideRangeLineStrokeWidth="10dp"
|
||||
app:xsb_isShowBubble="true"
|
||||
app:xsb_isShowRuler="false"
|
||||
app:xsb_max="255"
|
||||
app:xsb_min="0"
|
||||
app:xsb_numberTextColor="#ffffff"
|
||||
app:xsb_numberTextSize="12sp"
|
||||
app:xsb_outsideRangeLineColor="#f0f0f0"
|
||||
app:xsb_outsideRangeLineStrokeWidth="10dp"
|
||||
app:xsb_rulerColor="@color/xui_config_color_gray_4" />
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView7"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="31dp"
|
||||
android:text="绿 色:" />
|
||||
|
||||
<com.xuexiang.xui.widget.picker.XSeekBar
|
||||
android:id="@+id/xsb_green"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="40dp"
|
||||
android:layout_marginTop="0dp"
|
||||
app:xsb_insideRangeLineColor="@color/success"
|
||||
app:xsb_insideRangeLineStrokeWidth="10dp"
|
||||
app:xsb_isShowBubble="true"
|
||||
app:xsb_isShowRuler="false"
|
||||
app:xsb_max="255"
|
||||
app:xsb_min="0"
|
||||
app:xsb_numberTextColor="#ffffff"
|
||||
app:xsb_numberTextSize="12sp"
|
||||
app:xsb_outsideRangeLineColor="#f0f0f0"
|
||||
app:xsb_outsideRangeLineStrokeWidth="10dp"
|
||||
app:xsb_rulerColor="@color/xui_config_color_gray_4" />
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView8"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="31dp"
|
||||
android:text="蓝 色:" />
|
||||
|
||||
<com.xuexiang.xui.widget.picker.XSeekBar
|
||||
android:id="@+id/xsb_blue"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="40dp"
|
||||
android:layout_marginTop="0dp"
|
||||
app:xsb_insideRangeLineColor="@color/colorAccent"
|
||||
app:xsb_insideRangeLineStrokeWidth="10dp"
|
||||
app:xsb_isShowBubble="true"
|
||||
app:xsb_isShowRuler="false"
|
||||
app:xsb_max="255"
|
||||
app:xsb_min="0"
|
||||
app:xsb_numberTextColor="#ffffff"
|
||||
app:xsb_numberTextSize="12sp"
|
||||
app:xsb_outsideRangeLineColor="#f0f0f0"
|
||||
app:xsb_outsideRangeLineStrokeWidth="10dp"
|
||||
app:xsb_rulerColor="@color/xui_config_color_gray_4" />
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/config_margin_10dp"
|
||||
android:background="@color/cardview_light_background"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/config_padding_20dp"
|
||||
android:paddingLeft="@dimen/config_padding_5dp"
|
||||
android:paddingEnd="@dimen/config_padding_5dp">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/frame_layout_loading_status"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/update_device_temp_icon"
|
||||
android:layout_width="@dimen/config_margin_14dp"
|
||||
android:layout_height="@dimen/config_margin_14dp"
|
||||
android:layout_gravity="start|center_vertical"
|
||||
android:tint="@color/app_color_theme_5"
|
||||
app:srcCompat="@drawable/update" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView15"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
android:text="单击获取最新温湿度"
|
||||
android:textColor="@color/app_color_theme_5"
|
||||
android:textSize="10sp" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView10"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/config_margin_18dp"
|
||||
android:text="温度:" />
|
||||
|
||||
<com.xuexiang.xui.widget.textview.supertextview.SuperButton
|
||||
android:id="@+id/sp_temperature"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginStart="40dp"
|
||||
android:layout_marginTop="18dp"
|
||||
android:text="23.78℃"
|
||||
app:sCornersRadius="10dp"
|
||||
app:sSolidColor="@color/app_color_theme_5" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView11"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="150dp"
|
||||
android:layout_marginTop="@dimen/config_margin_18dp"
|
||||
android:text="湿度:" />
|
||||
|
||||
<com.xuexiang.xui.widget.textview.supertextview.SuperButton
|
||||
android:id="@+id/sp_humidity"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginStart="190dp"
|
||||
android:layout_marginTop="18dp"
|
||||
android:text="39.68RH%"
|
||||
app:sCornersRadius="10dp"
|
||||
app:sSolidColor="@color/app_color_theme_5" />
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<com.xuexiang.xui.widget.textview.supertextview.SuperButton
|
||||
android:id="@+id/btn_cancle_status"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_marginTop="40dp"
|
||||
android:layout_marginBottom="40dp"
|
||||
android:text="取消"
|
||||
app:sCornersRadius="5dp"
|
||||
app:sSolidColor="@color/app_color_theme_2" />
|
||||
|
||||
<com.xuexiang.xui.widget.textview.supertextview.SuperButton
|
||||
android:id="@+id/btn_apply_status"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="35dp"
|
||||
android:layout_marginStart="110dp"
|
||||
android:layout_marginTop="40dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginBottom="100dp"
|
||||
android:text="应用"
|
||||
app:sCornersRadius="5dp"
|
||||
app:sSolidColor="@color/colorAccent" />
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
Reference in New Issue
Block a user