first
This commit is contained in:
222
app/src/main/res/layout/device_control_layout.xml
Normal file
222
app/src/main/res/layout/device_control_layout.xml
Normal file
@@ -0,0 +1,222 @@
|
||||
<?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"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_F9F9F9"
|
||||
android:gravity="center_horizontal">
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_48">
|
||||
|
||||
<include
|
||||
android:id="@+id/included_title"
|
||||
layout="@layout/include_activity_back_layout" />
|
||||
</RelativeLayout>
|
||||
<TextView
|
||||
android:id="@+id/tv_device_status"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:textSize="48sp"
|
||||
android:textStyle="bold"
|
||||
android:text="工作中"
|
||||
android:textColor="@color/color_zhu"/>
|
||||
<TextView
|
||||
android:id="@+id/tv_device_update_time"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:gravity="center"
|
||||
android:textSize="14sp"
|
||||
android:text="更新时间:5-1 08:30"
|
||||
android:textColor="@color/color_666666"/>
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="@dimen/dp_26">
|
||||
<LinearLayout
|
||||
android:id="@+id/linear_bt"
|
||||
android:layout_width="@dimen/dp_67"
|
||||
android:layout_height="@dimen/dp_67"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/shape_device_ctrl_green_cor12">
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:src="@mipmap/icon_ctrl_bt_white"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/linear_wifi"
|
||||
android:layout_width="@dimen/dp_67"
|
||||
android:layout_height="@dimen/dp_67"
|
||||
android:layout_marginLeft="@dimen/dp_22"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/shape_device_ctrl_green_cor12">
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:src="@mipmap/icon_ctrl_wifi_white"/>
|
||||
</LinearLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/linear_bat"
|
||||
android:layout_width="@dimen/dp_67"
|
||||
android:layout_height="@dimen/dp_67"
|
||||
android:layout_marginLeft="@dimen/dp_22"
|
||||
android:background="@drawable/shape_device_ctrl_white_cor12">
|
||||
|
||||
<View
|
||||
android:id="@+id/view_center"
|
||||
android:layout_width="@dimen/dp_0_5"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_bat_status"
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:layout_gravity="center"
|
||||
android:src="@mipmap/icon_ctrl_batt_red"/>
|
||||
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="4dp"
|
||||
android:layout_marginHorizontal="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_20">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingVertical="@dimen/dp_15">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/color_222222"
|
||||
android:text="@string/device_work_progress_title"
|
||||
android:layout_marginLeft="@dimen/dp_30"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/color_666666"
|
||||
android:text="@string/device_work_progress_tips"
|
||||
android:layout_marginLeft="@dimen/dp_5"/>
|
||||
</LinearLayout>
|
||||
<!--自定义progress-->
|
||||
<ProgressBar
|
||||
android:id="@+id/progress_work"
|
||||
style="@android:style/Widget.ProgressBar.Horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_20"
|
||||
android:layout_marginHorizontal="@dimen/dp_30"
|
||||
android:layout_marginTop="@dimen/dp_25"
|
||||
android:max="100"
|
||||
android:progress="60"
|
||||
android:progressDrawable="@drawable/device_progress_bg"
|
||||
android:progressTint="@null"/>
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="4dp"
|
||||
android:layout_marginHorizontal="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_20">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingVertical="@dimen/dp_15">
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingHorizontal="@dimen/dp_30">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/color_222222"
|
||||
android:text="@string/device_work_times_title"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/color_666666"
|
||||
android:text="30min"
|
||||
android:layout_marginLeft="@dimen/dp_5"/>
|
||||
</RelativeLayout>
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_time_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:paddingHorizontal="@dimen/dp_5"
|
||||
tools:listitem="@layout/device_work_time_item"
|
||||
app:spanCount="4"
|
||||
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"/>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingVertical="@dimen/dp_6"
|
||||
android:orientation="horizontal"
|
||||
android:background="@drawable/shape_f9f9f9_corner_5"
|
||||
android:layout_marginHorizontal="@dimen/dp_20">
|
||||
<EditText
|
||||
android:id="@+id/et_wort_time"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="@dimen/dp_5"
|
||||
android:layout_weight="3"
|
||||
android:background="@null"
|
||||
android:textSize="14sp"
|
||||
android:hint="@string/device_custom_work_time"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="@dimen/dp_5"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/color_666666"
|
||||
android:text="min"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
<TextView
|
||||
android:id="@+id/tv_confirm"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/white"
|
||||
android:text="@string/device_control_start"
|
||||
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>
|
||||
Reference in New Issue
Block a user