优化:新增帮助文档(跳转GitHub的wiki)

This commit is contained in:
pppscn 2021-11-21 15:58:41 +08:00
parent 5187b410de
commit aac73b17db
6 changed files with 177 additions and 151 deletions

View File

@ -3,6 +3,7 @@ package com.idormy.sms.forwarder;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
import android.content.Intent; import android.content.Intent;
import android.content.pm.PackageManager; import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.Build; import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.os.Handler; import android.os.Handler;
@ -296,6 +297,12 @@ public class MainActivity extends AppCompatActivity implements RefreshListView.I
startActivity(intent); startActivity(intent);
} }
public void toHelp() {
Uri uri = Uri.parse("https://github.com/pppscn/SmsForwarder/wiki");
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);
}
public void toRuleSetting(View view) { public void toRuleSetting(View view) {
Intent intent = new Intent(this, RuleActivity.class); Intent intent = new Intent(this, RuleActivity.class);
startActivity(intent); startActivity(intent);
@ -352,6 +359,9 @@ public class MainActivity extends AppCompatActivity implements RefreshListView.I
case R.id.to_about: case R.id.to_about:
toAbout(); toAbout();
return true; return true;
case R.id.to_help:
toHelp();
return true;
default: default:
return super.onOptionsItemSelected(item); return super.onOptionsItemSelected(item);
} }

View File

@ -75,14 +75,12 @@ public class SenderDingdingMsg extends SenderBaseMsg {
} }
if (!atMobilesList.isEmpty()) { if (!atMobilesList.isEmpty()) {
AtMap.put("atMobiles", atMobilesList); AtMap.put("atMobiles", atMobilesList);
} }
} }
AtMap.put("isAtAll", false); AtMap.put("isAtAll", false);
if (atAll != null) { if (atAll != null) {
AtMap.put("isAtAll", atAll); AtMap.put("isAtAll", atAll);
} }
textMsgMap.put("at", AtMap); textMsgMap.put("at", AtMap);

View File

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M11,18h2v-2h-2v2zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.41,0 -8,-3.59 -8,-8s3.59,-8 8,-8 8,3.59 8,8 -3.59,8 -8,8zM12,6c-2.21,0 -4,1.79 -4,4h2c0,-1.1 0.9,-2 2,-2s2,0.9 2,2c0,2 -3,1.75 -3,5h2c0,-2.25 3,-2.5 3,-5 0,-2.21 -1.79,-4 -4,-4z"/>
</vector>

View File

@ -27,4 +27,10 @@
android:title="@string/about" android:title="@string/about"
android:icon="@drawable/ic_forwarder" android:icon="@drawable/ic_forwarder"
app:showAsAction="never" /> app:showAsAction="never" />
<item
android:id="@+id/to_help"
android:orderInCategory="100"
android:title="@string/help"
android:icon="@drawable/ic_help"
app:showAsAction="never" />
</menu> </menu>

View File

@ -12,6 +12,7 @@
<string name="clone">Clone Settings</string> <string name="clone">Clone Settings</string>
<string name="setting">Settings</string> <string name="setting">Settings</string>
<string name="about">About</string> <string name="about">About</string>
<string name="help">Help</string>
<string name="rule_setting">Rule Setting</string> <string name="rule_setting">Rule Setting</string>
<string name="sender_setting">Sender Setting</string> <string name="sender_setting">Sender Setting</string>
<string name="app_list">App List</string> <string name="app_list">App List</string>

View File

@ -12,6 +12,7 @@
<string name="clone">一键克隆</string> <string name="clone">一键克隆</string>
<string name="setting">通用设置</string> <string name="setting">通用设置</string>
<string name="about">关于软件</string> <string name="about">关于软件</string>
<string name="help">使用帮助</string>
<string name="rule_setting">转发规则</string> <string name="rule_setting">转发规则</string>
<string name="sender_setting">发送通道</string> <string name="sender_setting">发送通道</string>
<string name="app_list">应用列表</string> <string name="app_list">应用列表</string>
@ -159,11 +160,11 @@
<string name="add_extra">转发时附加卡槽信息</string> <string name="add_extra">转发时附加卡槽信息</string>
<string name="add_device_name">转发时附加设备名称</string> <string name="add_device_name">转发时附加设备名称</string>
<string name="forward_sms">转发短信广播</string> <string name="forward_sms">转发短信广播</string>
<string name="forward_sms_tips">总开关,请授予读取短信、通知类短信、发送短信等权限,开启后需添加转发规则</string> <string name="forward_sms_tips">总开关,请授予读取短信、通知类短信、发送短信等权限</string>
<string name="forward_missed_calls">转发未接来电</string> <string name="forward_missed_calls">转发未接来电</string>
<string name="forward_missed_calls_tips">总开关,请授予读取通话记录、联系人等权限,开启后需添加转发规则</string> <string name="forward_missed_calls_tips">总开关,请授予读取通话记录、联系人等权限</string>
<string name="forward_app_notify">转发应用通知</string> <string name="forward_app_notify">转发应用通知</string>
<string name="forward_app_notify_tips">总开关,请先授予通知使用权,开启后需添加转发规则</string> <string name="forward_app_notify_tips">总开关,请先授予通知使用权</string>
<string name="enable_custom_templates">启用自定义模版</string> <string name="enable_custom_templates">启用自定义模版</string>
<string name="enable_custom_templates_tips">全局自定义模版,如果添加转发规则再次定义,则优先取转发规则的</string> <string name="enable_custom_templates_tips">全局自定义模版,如果添加转发规则再次定义,则优先取转发规则的</string>
<string name="enable_exclude_from_recents">不在最近任务列表中显示</string> <string name="enable_exclude_from_recents">不在最近任务列表中显示</string>