diff --git a/app/src/main/java/com/example/bpa/helper/MessageLog.java b/app/src/main/java/com/example/bpa/helper/MessageLog.java index d8cfe02..10384f3 100644 --- a/app/src/main/java/com/example/bpa/helper/MessageLog.java +++ b/app/src/main/java/com/example/bpa/helper/MessageLog.java @@ -17,7 +17,7 @@ public class MessageLog { public static String MsgInfo = ""; public static void ShowInfo(String msg) { - SimpleDateFormat formatter = new SimpleDateFormat("HH:mm:ss"); + SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); Date date = new Date(); String tempMsg = formatter.format(date) + ":" + msg; MsgInfo = tempMsg + "\r\n" + MsgInfo; @@ -27,7 +27,7 @@ public class MessageLog { } public static void ShowWarning(String msg) { - SimpleDateFormat formatter = new SimpleDateFormat("HH:mm:ss"); + SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); Date date = new Date(); String tempMsg = formatter.format(date) + ":" + msg; MsgInfo = tempMsg + "\r\n" + MsgInfo; @@ -37,7 +37,7 @@ public class MessageLog { } public static void ShowError(String msg) { - SimpleDateFormat formatter = new SimpleDateFormat("HH:mm:ss"); + SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); Date date = new Date(); String tempMsg = formatter.format(date) + ":" + msg; MsgInfo = tempMsg + "\r\n" + MsgInfo; diff --git a/app/src/main/res/drawable/shape_switch_thumb.xml b/app/src/main/res/drawable/shape_switch_thumb.xml new file mode 100644 index 0000000..c379a63 --- /dev/null +++ b/app/src/main/res/drawable/shape_switch_thumb.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/shape_switch_track_close.xml b/app/src/main/res/drawable/shape_switch_track_close.xml new file mode 100644 index 0000000..112f0ae --- /dev/null +++ b/app/src/main/res/drawable/shape_switch_track_close.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/shape_switch_track_open.xml b/app/src/main/res/drawable/shape_switch_track_open.xml new file mode 100644 index 0000000..cf7415e --- /dev/null +++ b/app/src/main/res/drawable/shape_switch_track_open.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/shape_switch_track_selector.xml b/app/src/main/res/drawable/shape_switch_track_selector.xml new file mode 100644 index 0000000..6756011 --- /dev/null +++ b/app/src/main/res/drawable/shape_switch_track_selector.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/from/layout/activity_lsjy.xml b/app/src/main/res/layout/from/layout/activity_lsjy.xml index e7785ce..6eefc7c 100644 --- a/app/src/main/res/layout/from/layout/activity_lsjy.xml +++ b/app/src/main/res/layout/from/layout/activity_lsjy.xml @@ -86,7 +86,9 @@ android:layout_height="wrap_content" android:text="校准开关" android:layout_marginRight="40dp" - android:textColor="@color/white"/> + android:textColor="@color/white" + android:thumb="@drawable/shape_switch_thumb" + android:track="@drawable/shape_switch_track_selector"/> + android:textColor="@color/white" + android:thumb="@drawable/shape_switch_thumb" + android:track="@drawable/shape_switch_track_selector"/> @@ -193,6 +201,8 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="校准开关" + android:thumb="@drawable/shape_switch_thumb" + android:track="@drawable/shape_switch_track_selector" android:layout_marginRight="40dp" android:textColor="@color/white"/> @@ -217,6 +227,8 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="校准开关" + android:thumb="@drawable/shape_switch_thumb" + android:track="@drawable/shape_switch_track_selector" android:layout_marginRight="40dp" android:textColor="@color/white"/> @@ -247,6 +259,8 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="校准开关" + android:thumb="@drawable/shape_switch_thumb" + android:track="@drawable/shape_switch_track_selector" android:layout_marginRight="40dp" android:textColor="@color/white"/> @@ -271,6 +285,8 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="校准开关" + android:thumb="@drawable/shape_switch_thumb" + android:track="@drawable/shape_switch_track_selector" android:layout_marginRight="40dp" android:textColor="@color/white"/> @@ -301,6 +317,8 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="校准开关" + android:thumb="@drawable/shape_switch_thumb" + android:track="@drawable/shape_switch_track_selector" android:layout_marginRight="40dp" android:textColor="@color/white"/> @@ -325,6 +343,8 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="校准开关" + android:thumb="@drawable/shape_switch_thumb" + android:track="@drawable/shape_switch_track_selector" android:layout_marginRight="40dp" android:textColor="@color/white"/> diff --git a/app/src/main/res/layout/from/layout/activity_run_log.xml b/app/src/main/res/layout/from/layout/activity_run_log.xml index f5cfd77..394d18e 100644 --- a/app/src/main/res/layout/from/layout/activity_run_log.xml +++ b/app/src/main/res/layout/from/layout/activity_run_log.xml @@ -94,9 +94,9 @@ android:id="@+id/test_view" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:textColor="@color/RunLogForeground" + android:textColor="@color/foreground" android:breakStrategy="high_quality" - android:textSize="@dimen/TitleSize"> + android:textSize="@dimen/textSize">