Browse Source

3223232

master
fyf 1 year ago
parent
commit
ab38369313
7 changed files with 49 additions and 7 deletions
  1. +3
    -3
      app/src/main/java/com/example/bpa/helper/MessageLog.java
  2. +6
    -0
      app/src/main/res/drawable/shape_switch_thumb.xml
  3. +4
    -0
      app/src/main/res/drawable/shape_switch_track_close.xml
  4. +5
    -0
      app/src/main/res/drawable/shape_switch_track_open.xml
  5. +7
    -0
      app/src/main/res/drawable/shape_switch_track_selector.xml
  6. +22
    -2
      app/src/main/res/layout/from/layout/activity_lsjy.xml
  7. +2
    -2
      app/src/main/res/layout/from/layout/activity_run_log.xml

+ 3
- 3
app/src/main/java/com/example/bpa/helper/MessageLog.java View File

@@ -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;


+ 6
- 0
app/src/main/res/drawable/shape_switch_thumb.xml View File

@@ -0,0 +1,6 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#fff"/>
<size android:width="20dp"
android:height="18dp"/>
<corners android:radius="180dp"/>
</shape>

+ 4
- 0
app/src/main/res/drawable/shape_switch_track_close.xml View File

@@ -0,0 +1,4 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#dbdbdb"/>
<corners android:radius="20dp"/>
</shape>

+ 5
- 0
app/src/main/res/drawable/shape_switch_track_open.xml View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#fe8a01"/>
<corners android:radius="20dp"/>
</shape>

+ 7
- 0
app/src/main/res/drawable/shape_switch_track_selector.xml View File

@@ -0,0 +1,7 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/shape_switch_track_open" android:state_checked="true"/>
<item android:drawable="@drawable/shape_switch_track_close"
android:state_checked="false"/>
<item android:drawable="@drawable/shape_switch_track_close"
/>
</selector>

+ 22
- 2
app/src/main/res/layout/from/layout/activity_lsjy.xml View File

@@ -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"/>

<TextView
android:layout_marginRight="15dp"
@@ -110,7 +112,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"/>
</TableRow>
<!-- Table3-->
<TableRow
@@ -140,6 +144,8 @@
android:layout_height="wrap_content"
android:text="校准开关"
android:layout_marginRight="40dp"
android:thumb="@drawable/shape_switch_thumb"
android:track="@drawable/shape_switch_track_selector"
android:textColor="@color/white"/>

<TextView
@@ -163,6 +169,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"/>
</TableRow>
@@ -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"/>
</TableRow>
@@ -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"/>
</TableRow>
@@ -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"/>
</TableRow>


+ 2
- 2
app/src/main/res/layout/from/layout/activity_run_log.xml View File

@@ -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"></TextView>
android:textSize="@dimen/textSize"></TextView>
</ScrollView>
</RelativeLayout>


Loading…
Cancel
Save