更新后新增排程提交
This commit is contained in:
14
app/src/main/res/drawable/tab_selector_bg_center.xml
Normal file
14
app/src/main/res/drawable/tab_selector_bg_center.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_selected="true">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@color/color_zhu" />
|
||||
</shape>
|
||||
</item>
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@color/white" />
|
||||
<stroke android:color="@color/color_zhu" android:width="@dimen/dp_1"/>
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
@@ -27,6 +27,16 @@
|
||||
android:textSize="14sp"
|
||||
android:textColor="@drawable/tab_selector_text"
|
||||
android:text="@string/water_device_config"/>
|
||||
<TextView
|
||||
android:id="@+id/tv_bound"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/tab_selector_bg_center"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@drawable/tab_selector_text"
|
||||
android:text="@string/water_bound_device"/>
|
||||
<TextView
|
||||
android:id="@+id/tv_bind"
|
||||
android:layout_width="0dp"
|
||||
|
||||
@@ -6,27 +6,45 @@
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="@dimen/dp_20">
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_devices"
|
||||
<LinearLayout
|
||||
android:id="@+id/linear_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:listitem="@layout/plan_bind_device_item"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"/>
|
||||
android:orientation="vertical">
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_devices"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:listitem="@layout/plan_bind_device_item"
|
||||
tools:itemCount="3"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_commit"
|
||||
<TextView
|
||||
android:id="@+id/tv_commit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/white"
|
||||
android:text="@string/button_save"
|
||||
android:background="@drawable/shape_green_button_bg"
|
||||
android:paddingVertical="@dimen/dp_10"
|
||||
android:layout_marginHorizontal="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_40"
|
||||
android:gravity="center"/>
|
||||
</LinearLayout>
|
||||
<RelativeLayout
|
||||
android:id="@+id/rel_noresult"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/white"
|
||||
android:text="@string/button_save"
|
||||
android:background="@drawable/shape_green_button_bg"
|
||||
android:paddingVertical="@dimen/dp_10"
|
||||
android:layout_marginHorizontal="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_40"
|
||||
android:gravity="center"/>
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="@dimen/dp_100"
|
||||
android:visibility="gone">
|
||||
<include
|
||||
android:id="@+id/included_noresult"
|
||||
layout="@layout/include_no_result_layout"/>
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
80
app/src/main/res/layout/plan_bound_device_item.xml
Normal file
80
app/src/main/res/layout/plan_bound_device_item.xml
Normal file
@@ -0,0 +1,80 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="@dimen/dp_10"
|
||||
android:layout_marginVertical="@dimen/dp_5"
|
||||
app:cardCornerRadius="10dp"
|
||||
app:cardElevation="4dp">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingVertical="@dimen/dp_12">
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="@dimen/dp_10">
|
||||
|
||||
<!-- 设备名称 -->
|
||||
<TextView
|
||||
android:id="@+id/tv_device_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="智能浇水设备A1"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="17sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<!-- 设备序列号 -->
|
||||
<TextView
|
||||
android:id="@+id/tv_device_serial"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:text="YA226641000107"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<!-- 电量信息 -->
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<View
|
||||
android:layout_width="@dimen/dp_4"
|
||||
android:layout_height="@dimen/dp_4"
|
||||
android:background="@drawable/shape_green_circle"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_battery_level"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_4"
|
||||
android:text="已绑定"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<ImageView
|
||||
android:id="@+id/img_delete"
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginRight="@dimen/dp_20"
|
||||
android:src="@mipmap/icon_delete"/>
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
</LinearLayout>
|
||||
38
app/src/main/res/layout/plan_bound_device_layout.xml
Normal file
38
app/src/main/res/layout/plan_bound_device_layout.xml
Normal file
@@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="@dimen/dp_20">
|
||||
<LinearLayout
|
||||
android:id="@+id/linear_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_devices"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:listitem="@layout/plan_bound_device_item"
|
||||
tools:itemCount="3"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"/>
|
||||
|
||||
</LinearLayout>
|
||||
<RelativeLayout
|
||||
android:id="@+id/rel_noresult"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="@dimen/dp_100"
|
||||
android:visibility="gone">
|
||||
<include
|
||||
android:id="@+id/included_noresult"
|
||||
layout="@layout/include_no_result_layout"/>
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
@@ -89,6 +89,7 @@
|
||||
<string name="add_water_plan">+新增排程</string>
|
||||
<string name="plan_title">排程</string>
|
||||
<string name="water_device_config">浇水配置</string>
|
||||
<string name="water_bound_device">已关联设备</string>
|
||||
<string name="water_device_bind">关联设备</string>
|
||||
<string name="add_water_plan_title">新增排程</string>
|
||||
<string name="edit_water_plan_title">Edit Plan</string>
|
||||
|
||||
@@ -90,7 +90,8 @@
|
||||
<string name="add_water_plan">+新增排程</string>
|
||||
<string name="plan_title">排程</string>
|
||||
<string name="water_device_config">浇水配置</string>
|
||||
<string name="water_device_bind">关联设备</string>
|
||||
<string name="water_bound_device">已关联设备</string>
|
||||
<string name="water_device_bind">可关联设备</string>
|
||||
<string name="add_water_plan_title">新增排程</string>
|
||||
<string name="edit_water_plan_title">编辑排程</string>
|
||||
<string name="plan_name_text">排程名称</string>
|
||||
|
||||
Reference in New Issue
Block a user