From e1c80d1022ef73b11cb4d576e5b787b63ed7754b Mon Sep 17 00:00:00 2001 From: pppscn <35696959@qq.com> Date: Thu, 11 Feb 2021 07:30:47 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BD=AC=E5=8F=91=E8=AE=B0=E5=BD=95=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../idormy/sms/forwarder/MainActivity.java | 2 +- .../idormy/sms/forwarder/model/RuleModel.java | 2 +- .../idormy/sms/forwarder/utils/LogUtil.java | 2 +- app/src/main/res/layout/tlog_item.xml | 25 +++++++++++-------- 4 files changed, 17 insertions(+), 14 deletions(-) diff --git a/app/src/main/java/com/idormy/sms/forwarder/MainActivity.java b/app/src/main/java/com/idormy/sms/forwarder/MainActivity.java index 8e59cb4f..1174043d 100644 --- a/app/src/main/java/com/idormy/sms/forwarder/MainActivity.java +++ b/app/src/main/java/com/idormy/sms/forwarder/MainActivity.java @@ -121,7 +121,7 @@ public class MainActivity extends AppCompatActivity implements ReFlashListView.I public void logDetail(LogVo logVo) { AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this); builder.setTitle("详情"); - builder.setMessage(logVo.getFrom() + "\n" + logVo.getContent() + "\n" + logVo.getRule() + "\n" + logVo.getTime()); + builder.setMessage(logVo.getFrom() + "\n\n" + logVo.getContent() + "\n\n" + logVo.getRule() + "\n\n" + logVo.getTime()); builder.show(); } diff --git a/app/src/main/java/com/idormy/sms/forwarder/model/RuleModel.java b/app/src/main/java/com/idormy/sms/forwarder/model/RuleModel.java index 15f76064..7825f1d6 100644 --- a/app/src/main/java/com/idormy/sms/forwarder/model/RuleModel.java +++ b/app/src/main/java/com/idormy/sms/forwarder/model/RuleModel.java @@ -45,7 +45,7 @@ public class RuleModel { case FILED_TRANSPOND_ALL: return "全部转发到 "; default: - return "当 " + FILED_MAP.get(filed) + " " + CHECK_MAP.get(check) + " " + value; + return "当 " + FILED_MAP.get(filed) + " " + CHECK_MAP.get(check) + " " + value + " 转发到 "; } diff --git a/app/src/main/java/com/idormy/sms/forwarder/utils/LogUtil.java b/app/src/main/java/com/idormy/sms/forwarder/utils/LogUtil.java index c35f9ed3..9f590801 100644 --- a/app/src/main/java/com/idormy/sms/forwarder/utils/LogUtil.java +++ b/app/src/main/java/com/idormy/sms/forwarder/utils/LogUtil.java @@ -157,7 +157,7 @@ public class LogUtil { cursor.getColumnIndexOrThrow(SenderTable.SenderEntry.TABLE_NAME + "." + SenderTable.SenderEntry.COLUMN_NAME_TYPE)); Log.d(TAG, "getLog: time" + time); - String rule = RuleModel.getRuleMatch(ruleFiled, ruleCheck, ruleValue) + " 转发到 " + senderName; + String rule = RuleModel.getRuleMatch(ruleFiled, ruleCheck, ruleValue) + senderName; // String rule = time+" 转发到 "+senderName; int senderImageId = SenderModel.getImageId(senderType); LogVo logVo = new LogVo(itemfrom, content, time, rule, senderImageId); diff --git a/app/src/main/res/layout/tlog_item.xml b/app/src/main/res/layout/tlog_item.xml index 45b5112c..c78558de 100644 --- a/app/src/main/res/layout/tlog_item.xml +++ b/app/src/main/res/layout/tlog_item.xml @@ -11,11 +11,21 @@ android:paddingBottom="10dip"> + android:layout_marginStart="10dp" + android:textColor="@android:color/black" + android:textColorHighlight="@android:color/holo_red_dark" /> + + - - + android:layout_marginLeft="10dp" + android:layout_marginBottom="10dp" /> \ No newline at end of file