20251110_205526_555
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
#Created by .winboll/winboll_app_build.gradle
|
#Created by .winboll/winboll_app_build.gradle
|
||||||
#Mon Nov 10 03:35:32 GMT 2025
|
#Mon Nov 10 12:54:12 GMT 2025
|
||||||
stageCount=18
|
stageCount=18
|
||||||
libraryProject=
|
libraryProject=
|
||||||
baseVersion=15.0
|
baseVersion=15.0
|
||||||
publishVersion=15.0.17
|
publishVersion=15.0.17
|
||||||
buildCount=71
|
buildCount=76
|
||||||
baseBetaVersion=15.0.18
|
baseBetaVersion=15.0.18
|
||||||
|
|||||||
@@ -1,34 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<shortcuts xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<!-- 切换启动入口的快捷菜单 -->
|
|
||||||
<shortcut
|
|
||||||
android:shortcutId="switch_launcher_main"
|
|
||||||
android:enabled="true"
|
|
||||||
android:icon="@mipmap/ic_launcher"
|
|
||||||
android:shortcutShortLabel="@string/switch_to_main"
|
|
||||||
android:shortcutLongLabel="@string/switch_to_main"
|
|
||||||
android:shortcutDisabledMessage="@string/switch_disabled">
|
|
||||||
<intent
|
|
||||||
android:action="cc.winboll.studio.positions.MainActivity"
|
|
||||||
android:targetPackage="cc.winboll.studio.positions.beta"
|
|
||||||
android:targetClass="cc.winboll.studio.positions.MainActivity"
|
|
||||||
android:data="switch_launcher_main" />
|
|
||||||
|
|
||||||
<categories android:name="android.shortcut.conversation" />
|
|
||||||
</shortcut>
|
|
||||||
<shortcut
|
|
||||||
android:shortcutId="switch_launcher_laojun"
|
|
||||||
android:enabled="true"
|
|
||||||
android:icon="@mipmap/ic_launcher"
|
|
||||||
android:shortcutShortLabel="@string/switch_to_laojun"
|
|
||||||
android:shortcutLongLabel="@string/switch_to_laojun"
|
|
||||||
android:shortcutDisabledMessage="@string/switch_disabled">
|
|
||||||
<intent
|
|
||||||
android:action="cc.winboll.studio.positions.MainActivityLaojun"
|
|
||||||
android:targetPackage="cc.winboll.studio.positions.beta"
|
|
||||||
android:targetClass="cc.winboll.studio.positions.MainActivity"
|
|
||||||
android:data="switch_launcher_laojun" />
|
|
||||||
|
|
||||||
<categories android:name="android.shortcut.conversation" />
|
|
||||||
</shortcut>
|
|
||||||
</shortcuts>
|
|
||||||
19
positions/src/beta/res/xml/shortcutsmain.xml
Normal file
19
positions/src/beta/res/xml/shortcutsmain.xml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shortcuts xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<!-- 切换启动入口的快捷菜单 -->
|
||||||
|
<shortcut
|
||||||
|
android:shortcutId="open_app_plus"
|
||||||
|
android:enabled="true"
|
||||||
|
android:icon="@mipmap/ic_launcher"
|
||||||
|
android:shortcutShortLabel="@string/open_app_plus"
|
||||||
|
android:shortcutLongLabel="@string/open_app_plus"
|
||||||
|
android:shortcutDisabledMessage="@string/app_plus_switch_disabled">
|
||||||
|
<intent
|
||||||
|
android:action="cc.winboll.studio.positions.MainActivity"
|
||||||
|
android:targetPackage="cc.winboll.studio.positions.beta"
|
||||||
|
android:targetClass="cc.winboll.studio.positions.MainActivity"
|
||||||
|
android:data="open_app_plus" />
|
||||||
|
|
||||||
|
<categories android:name="android.shortcut.conversation" />
|
||||||
|
</shortcut>
|
||||||
|
</shortcuts>
|
||||||
19
positions/src/beta/res/xml/shortcutsplus.xml
Normal file
19
positions/src/beta/res/xml/shortcutsplus.xml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shortcuts xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<!-- 切换启动入口的快捷菜单 -->
|
||||||
|
<shortcut
|
||||||
|
android:shortcutId="hide_app_plus"
|
||||||
|
android:enabled="true"
|
||||||
|
android:icon="@mipmap/ic_launcher"
|
||||||
|
android:shortcutShortLabel="@string/hide_app_plus"
|
||||||
|
android:shortcutLongLabel="@string/hide_app_plus"
|
||||||
|
android:shortcutDisabledMessage="@string/app_plus_switch_disabled">
|
||||||
|
<intent
|
||||||
|
android:action="cc.winboll.studio.positions.PlusActivity.ACTION_HIDE_APP_PLUS"
|
||||||
|
android:targetPackage="cc.winboll.studio.positions.beta"
|
||||||
|
android:targetClass="cc.winboll.studio.positions.PlusActivity"
|
||||||
|
android:data="hide_app_plus" />
|
||||||
|
|
||||||
|
<categories android:name="android.shortcut.conversation" />
|
||||||
|
</shortcut>
|
||||||
|
</shortcuts>
|
||||||
@@ -48,15 +48,15 @@
|
|||||||
<!-- 长按图标快捷菜单 -->
|
<!-- 长按图标快捷菜单 -->
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="android.app.shortcuts"
|
android:name="android.app.shortcuts"
|
||||||
android:resource="@xml/shortcuts" />
|
android:resource="@xml/shortcutsmain" />
|
||||||
</activity-alias>
|
</activity-alias>
|
||||||
|
|
||||||
<!-- Laojun 别名入口(默认禁用,通过代码启用) -->
|
<!-- Laojun 别名入口(默认禁用,通过代码启用) -->
|
||||||
<activity-alias
|
<activity-alias
|
||||||
android:name=".MainActivityLaojun"
|
android:name=".PlusActivity"
|
||||||
android:targetActivity=".MainActivity"
|
android:targetActivity=".PlusActivity"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
android:label="@string/app_laojun_name"
|
android:label="@string/app_plus_name"
|
||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:enabled="false"> <!-- 默认禁用,避免桌面显示 -->
|
android:enabled="false"> <!-- 默认禁用,避免桌面显示 -->
|
||||||
|
|
||||||
@@ -68,7 +68,7 @@
|
|||||||
<!-- 长按图标快捷菜单 -->
|
<!-- 长按图标快捷菜单 -->
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="android.app.shortcuts"
|
android:name="android.app.shortcuts"
|
||||||
android:resource="@xml/shortcuts" />
|
android:resource="@xml/shortcutsplus" />
|
||||||
</activity-alias>
|
</activity-alias>
|
||||||
|
|
||||||
<!-- 其他配置不变 -->
|
<!-- 其他配置不变 -->
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ import cc.winboll.studio.positions.activities.LocationActivity;
|
|||||||
import cc.winboll.studio.positions.activities.WinBoLLActivity;
|
import cc.winboll.studio.positions.activities.WinBoLLActivity;
|
||||||
import cc.winboll.studio.positions.utils.AppConfigsUtil;
|
import cc.winboll.studio.positions.utils.AppConfigsUtil;
|
||||||
import cc.winboll.studio.positions.utils.ServiceUtil;
|
import cc.winboll.studio.positions.utils.ServiceUtil;
|
||||||
import cc.winboll.studio.positions.utils.AppIconSwitcher;
|
import cc.winboll.studio.positions.utils.AppIconUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 主页面:仅负责
|
* 主页面:仅负责
|
||||||
@@ -102,16 +102,13 @@ public class MainActivity extends WinBoLLActivity implements IWinBoLLActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 处理快捷菜单的「切换入口」请求
|
* 处理应用图标快捷菜单的请求
|
||||||
*/
|
*/
|
||||||
private void handleSwitchRequest() {
|
private void handleSwitchRequest() {
|
||||||
Intent intent = getIntent();
|
Intent intent = getIntent();
|
||||||
if (intent != null && "switch_launcher_main".equals(intent.getDataString())) {
|
if (intent != null && "open_app_plus".equals(intent.getDataString())) {
|
||||||
ToastUtils.show("应用级别切换到悟空笔记");
|
ToastUtils.show("已添加" + getString(R.string.app_name) + "附加组件");
|
||||||
AppIconSwitcher.switchToWukongIcon(this);
|
AppIconUtils.addPlusIcon(this);
|
||||||
} else if (intent != null && "switch_launcher_laojun".equals(intent.getDataString())) {
|
|
||||||
ToastUtils.show("應用級別切換到老君道說");
|
|
||||||
AppIconSwitcher.switchToLaojunIcon(this);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,36 @@
|
|||||||
|
package cc.winboll.studio.positions.activities;
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import cc.winboll.studio.libappbase.ToastUtils;
|
||||||
|
import cc.winboll.studio.positions.MainActivity;
|
||||||
|
import cc.winboll.studio.positions.R;
|
||||||
|
import cc.winboll.studio.positions.utils.AppIconUtils;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author ZhanGSKen&豆包大模型<zhangsken@qq.com>
|
||||||
|
* @Date 2025/11/10 18:17
|
||||||
|
*/
|
||||||
|
public class PlusActivity extends MainActivity {
|
||||||
|
|
||||||
|
public static final String TAG = "PlusActivity";
|
||||||
|
public static final String ACTION_HIDE_APP_PLUS = "cc.winboll.studio.positions.PlusActivity.ACTION_HIDE_APP_PLUS";
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
|
handleSwitchRequest();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理应用图标快捷菜单的请求
|
||||||
|
*/
|
||||||
|
private void handleSwitchRequest() {
|
||||||
|
Intent intent = getIntent();
|
||||||
|
if (intent != null && "hide_app_plus".equals(intent.getDataString())) {
|
||||||
|
ToastUtils.show("已移除" + getString(R.string.app_name) + "附加组件");
|
||||||
|
AppIconUtils.addPlusIcon(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -12,103 +12,76 @@ import android.content.pm.PackageManager;
|
|||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
import cc.winboll.studio.libappbase.LogUtils;
|
||||||
import cc.winboll.studio.positions.R;
|
import cc.winboll.studio.positions.R;
|
||||||
|
import cc.winboll.studio.positions.activities.PlusActivity;
|
||||||
|
|
||||||
public class AppIconSwitcher {
|
public class AppIconUtils {
|
||||||
public static final String TAG = "AppIconSwitcher";
|
public static final String TAG = "AppIconUtils";
|
||||||
|
|
||||||
// 组件名常量(需与 AndroidManifest 一致)
|
|
||||||
private static final String WUKONG_ACTIVITY = "cc.winboll.studio.positions.MainActivityWukong";
|
|
||||||
private static final String LAOJUN_ACTIVITY = "cc.winboll.studio.positions.MainActivityLaojun";
|
|
||||||
|
|
||||||
// 快捷方式配置(名称+图标,需与实际资源匹配)
|
// 快捷方式配置(名称+图标,需与实际资源匹配)
|
||||||
private static final String WUKONG_SHORTCUT_NAME = "位置服务-Wukong";
|
// private static final String PLUS_SHORTCUT_NAME = "位置服务-Laojun";
|
||||||
private static final int WUKONG_SHORTCUT_ICON = R.drawable.ic_launcher; // Wukong 图标资源
|
// private static final int PLUS_SHORTCUT_ICON = R.mipmap.ic_launcher; // Laojun 图标资源
|
||||||
private static final String LAOJUN_SHORTCUT_NAME = "位置服务-Laojun";
|
|
||||||
private static final int LAOJUN_SHORTCUT_ICON = R.mipmap.ic_launcher; // Laojun 图标资源
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 切换到 Laojun 图标:禁用 Wukong,启用 Laojun + 创建 Laojun 快捷方式
|
* 添加Plus组件与图标
|
||||||
*/
|
*/
|
||||||
public static boolean switchToLaojunIcon(Context context) {
|
public static boolean addPlusIcon(Context context) {
|
||||||
if (context == null) {
|
if (context == null) {
|
||||||
Log.e(TAG, "切换失败:上下文为空");
|
LogUtils.d(TAG, "切换失败:上下文为空");
|
||||||
Toast.makeText(context, "图标切换失败", Toast.LENGTH_SHORT).show();
|
Toast.makeText(context, "图标切换失败", Toast.LENGTH_SHORT).show();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
PackageManager pm = context.getPackageManager();
|
PackageManager pm = context.getPackageManager();
|
||||||
ComponentName wukongComponent = new ComponentName(context, WUKONG_ACTIVITY);
|
ComponentName plusComponent = new ComponentName(context, PlusActivity.ACTION_HIDE_APP_PLUS);
|
||||||
ComponentName laojunComponent = new ComponentName(context, LAOJUN_ACTIVITY);
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// 1. 禁用 Wukong 组件,启用 Laojun 组件
|
enableComponent(pm, plusComponent);
|
||||||
disableComponent(pm, wukongComponent);
|
|
||||||
enableComponent(pm, laojunComponent);
|
|
||||||
|
|
||||||
// 2. 创建 Laojun 组件对应的快捷方式(自动去重)
|
// 2. 创建 Laojun 组件对应的快捷方式(自动去重)
|
||||||
boolean shortcutCreated = createComponentShortcut(context, laojunComponent, LAOJUN_SHORTCUT_NAME, LAOJUN_SHORTCUT_ICON);
|
// boolean shortcutCreated = createComponentShortcut(context, plusComponent, PLUS_SHORTCUT_NAME, PLUS_SHORTCUT_ICON);
|
||||||
|
//
|
||||||
// 3. 通知桌面刷新图标
|
// // 3. 通知桌面刷新图标
|
||||||
context.sendBroadcast(new Intent(Intent.ACTION_PACKAGE_CHANGED)
|
// context.sendBroadcast(new Intent(Intent.ACTION_PACKAGE_CHANGED)
|
||||||
.setData(android.net.Uri.parse("package:" + context.getPackageName())));
|
// .setData(android.net.Uri.parse("package:" + context.getPackageName())));
|
||||||
|
//
|
||||||
// 4. 反馈结果
|
// // 4. 反馈结果
|
||||||
String logMsg = shortcutCreated ? "启用 Laojun + 快捷方式创建成功" : "启用 Laojun 成功,快捷方式创建失败";
|
// String logMsg = shortcutCreated ? "启用 Laojun + 快捷方式创建成功" : "启用 Laojun 成功,快捷方式创建失败";
|
||||||
String toastMsg = shortcutCreated ? "图标切换为 Laojun,已创建快捷方式" : "图标切换为 Laojun,快捷方式创建失败";
|
// String toastMsg = shortcutCreated ? "图标切换为 Laojun,已创建快捷方式" : "图标切换为 Laojun,快捷方式创建失败";
|
||||||
Log.d(TAG, logMsg);
|
// LogUtils.d(TAG, logMsg);
|
||||||
Toast.makeText(context, toastMsg, Toast.LENGTH_SHORT).show();
|
// Toast.makeText(context, toastMsg, Toast.LENGTH_SHORT).show();
|
||||||
|
//
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Log.e(TAG, "Laojun 图标切换失败:" + e.getMessage());
|
LogUtils.e(TAG, "Laojun 图标切换失败:" + e.getMessage());
|
||||||
// 失败兜底:启用 Wukong 组件
|
// 失败兜底:启用 Wukong 组件
|
||||||
enableComponent(pm, wukongComponent);
|
//enableComponent(pm, wukongComponent);
|
||||||
Toast.makeText(context, "图标切换失败", Toast.LENGTH_SHORT).show();
|
Toast.makeText(context, "图标切换失败" + e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 切换到 Wukong 图标:启用 Wukong,禁用 Laojun + 创建 Wukong 快捷方式
|
* 移除Plus组件
|
||||||
*/
|
*/
|
||||||
public static boolean switchToWukongIcon(Context context) {
|
public static boolean removePlusIcon(Context context) {
|
||||||
if (context == null) {
|
if (context == null) {
|
||||||
Log.e(TAG, "切换失败:上下文为空");
|
LogUtils.d(TAG, "切换失败:上下文为空");
|
||||||
Toast.makeText(context, "图标切换失败", Toast.LENGTH_SHORT).show();
|
Toast.makeText(context, "图标切换失败", Toast.LENGTH_SHORT).show();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
PackageManager pm = context.getPackageManager();
|
PackageManager pm = context.getPackageManager();
|
||||||
ComponentName wukongComponent = new ComponentName(context, WUKONG_ACTIVITY);
|
ComponentName plusComponent = new ComponentName(context, PlusActivity.ACTION_HIDE_APP_PLUS);
|
||||||
ComponentName laojunComponent = new ComponentName(context, LAOJUN_ACTIVITY);
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// 1. 启用 Wukong 组件,禁用 Laojun 组件
|
disableComponent(pm, plusComponent);
|
||||||
enableComponent(pm, wukongComponent);
|
|
||||||
disableComponent(pm, laojunComponent);
|
|
||||||
|
|
||||||
// 2. 创建 Wukong 组件对应的快捷方式(自动去重)
|
|
||||||
boolean shortcutCreated = createComponentShortcut(context, wukongComponent, WUKONG_SHORTCUT_NAME, WUKONG_SHORTCUT_ICON);
|
|
||||||
|
|
||||||
// 3. 通知桌面刷新图标
|
|
||||||
context.sendBroadcast(new Intent(Intent.ACTION_PACKAGE_CHANGED)
|
|
||||||
.setData(android.net.Uri.parse("package:" + context.getPackageName())));
|
|
||||||
|
|
||||||
// 4. 反馈结果
|
|
||||||
String logMsg = shortcutCreated ? "启用 Wukong + 快捷方式创建成功" : "启用 Wukong 成功,快捷方式创建失败";
|
|
||||||
String toastMsg = shortcutCreated ? "图标切换为 Wukong,已创建快捷方式" : "图标切换为 Wukong,快捷方式创建失败";
|
|
||||||
Log.d(TAG, logMsg);
|
|
||||||
Toast.makeText(context, toastMsg, Toast.LENGTH_SHORT).show();
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Log.e(TAG, "Wukong 图标切换失败:" + e.getMessage());
|
LogUtils.d(TAG, e, Thread.currentThread().getStackTrace());
|
||||||
// 失败兜底:启用 Wukong 组件
|
|
||||||
enableComponent(pm, wukongComponent);
|
|
||||||
Toast.makeText(context, "图标切换失败", Toast.LENGTH_SHORT).show();
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -122,7 +95,7 @@ public class AppIconSwitcher {
|
|||||||
*/
|
*/
|
||||||
private static boolean createComponentShortcut(Context context, ComponentName component, String name, int iconRes) {
|
private static boolean createComponentShortcut(Context context, ComponentName component, String name, int iconRes) {
|
||||||
if (context == null || component == null || name == null || iconRes == 0) {
|
if (context == null || component == null || name == null || iconRes == 0) {
|
||||||
Log.e(TAG, "快捷方式创建失败:参数为空");
|
LogUtils.d(TAG, "快捷方式创建失败:参数为空");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -132,14 +105,14 @@ public class AppIconSwitcher {
|
|||||||
PackageManager pm = context.getPackageManager();
|
PackageManager pm = context.getPackageManager();
|
||||||
android.content.pm.ShortcutManager shortcutManager = context.getSystemService(android.content.pm.ShortcutManager.class);
|
android.content.pm.ShortcutManager shortcutManager = context.getSystemService(android.content.pm.ShortcutManager.class);
|
||||||
if (shortcutManager == null || !shortcutManager.isRequestPinShortcutSupported()) {
|
if (shortcutManager == null || !shortcutManager.isRequestPinShortcutSupported()) {
|
||||||
Log.e(TAG, "系统不支持创建快捷方式");
|
LogUtils.d(TAG, "系统不支持创建快捷方式");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 检查是否已存在该组件的快捷方式(去重)
|
// 检查是否已存在该组件的快捷方式(去重)
|
||||||
for (android.content.pm.ShortcutInfo info : shortcutManager.getPinnedShortcuts()) {
|
for (android.content.pm.ShortcutInfo info : shortcutManager.getPinnedShortcuts()) {
|
||||||
if (component.getClassName().equals(info.getIntent().getComponent().getClassName())) {
|
if (component.getClassName().equals(info.getIntent().getComponent().getClassName())) {
|
||||||
Log.d(TAG, "快捷方式已存在:" + component.getClassName());
|
LogUtils.d(TAG, "快捷方式已存在:" + component.getClassName());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -163,7 +136,7 @@ public class AppIconSwitcher {
|
|||||||
return true;
|
return true;
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Log.e(TAG, "Android O+ 快捷方式创建失败:" + e.getMessage());
|
LogUtils.d(TAG, "Android O+ 快捷方式创建失败:" + e.getMessage());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -187,7 +160,7 @@ public class AppIconSwitcher {
|
|||||||
return true;
|
return true;
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Log.e(TAG, "Android O- 快捷方式创建失败:" + e.getMessage());
|
LogUtils.d(TAG, "Android O- 快捷方式创建失败:" + e.getMessage());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
BIN
positions/src/main/res/drawable/ic_positions_plus.png
Normal file
BIN
positions/src/main/res/drawable/ic_positions_plus.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 48 KiB |
@@ -1,7 +1,7 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<string name="app_name">Positions</string>
|
<string name="app_name">Positions</string>
|
||||||
<string name="app_laojun_name">Positions</string>
|
<string name="app_plus_name">PositionsPlus</string>
|
||||||
<string name="switch_to_main">切换到悟空笔记</string>
|
<string name="hide_app_plus">隐藏附加组件</string>
|
||||||
<string name="switch_to_laojun">切换到老君道說</string>
|
<string name="open_app_plus">开启隐藏组件</string>
|
||||||
<string name="switch_disabled">切换功能不可用</string>
|
<string name="app_plus_switch_disabled">隐藏组件切换功能不可用</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -1,34 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<shortcuts xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<!-- 切换启动入口的快捷菜单 -->
|
|
||||||
<shortcut
|
|
||||||
android:shortcutId="switch_launcher_main"
|
|
||||||
android:enabled="true"
|
|
||||||
android:icon="@mipmap/ic_launcher"
|
|
||||||
android:shortcutShortLabel="@string/switch_to_main"
|
|
||||||
android:shortcutLongLabel="@string/switch_to_main"
|
|
||||||
android:shortcutDisabledMessage="@string/switch_disabled">
|
|
||||||
<intent
|
|
||||||
android:action="cc.winboll.studio.positions.MainActivity"
|
|
||||||
android:targetPackage="cc.winboll.studio.positions"
|
|
||||||
android:targetClass="cc.winboll.studio.positions.MainActivity"
|
|
||||||
android:data="switch_launcher" />
|
|
||||||
|
|
||||||
<categories android:name="android.shortcut.conversation" />
|
|
||||||
</shortcut>
|
|
||||||
<shortcut
|
|
||||||
android:shortcutId="switch_launcher_laojun"
|
|
||||||
android:enabled="true"
|
|
||||||
android:icon="@mipmap/ic_launcher"
|
|
||||||
android:shortcutShortLabel="@string/switch_to_laojun"
|
|
||||||
android:shortcutLongLabel="@string/switch_to_laojun"
|
|
||||||
android:shortcutDisabledMessage="@string/switch_disabled">
|
|
||||||
<intent
|
|
||||||
android:action="cc.winboll.studio.positions.MainActivityLaojun"
|
|
||||||
android:targetPackage="cc.winboll.studio.positions"
|
|
||||||
android:targetClass="cc.winboll.studio.positions.MainActivity"
|
|
||||||
android:data="switch_launcher" />
|
|
||||||
|
|
||||||
<categories android:name="android.shortcut.conversation" />
|
|
||||||
</shortcut>
|
|
||||||
</shortcuts>
|
|
||||||
19
positions/src/main/res/xml/shortcutsmain.xml
Normal file
19
positions/src/main/res/xml/shortcutsmain.xml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shortcuts xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<!-- 切换启动入口的快捷菜单 -->
|
||||||
|
<shortcut
|
||||||
|
android:shortcutId="open_app_plus"
|
||||||
|
android:enabled="true"
|
||||||
|
android:icon="@mipmap/ic_launcher"
|
||||||
|
android:shortcutShortLabel="@string/open_app_plus"
|
||||||
|
android:shortcutLongLabel="@string/open_app_plus"
|
||||||
|
android:shortcutDisabledMessage="@string/app_plus_switch_disabled">
|
||||||
|
<intent
|
||||||
|
android:action="cc.winboll.studio.positions.MainActivity"
|
||||||
|
android:targetPackage="cc.winboll.studio.positions"
|
||||||
|
android:targetClass="cc.winboll.studio.positions.MainActivity"
|
||||||
|
android:data="open_app_plus" />
|
||||||
|
|
||||||
|
<categories android:name="android.shortcut.conversation" />
|
||||||
|
</shortcut>
|
||||||
|
</shortcuts>
|
||||||
19
positions/src/main/res/xml/shortcutsplus.xml
Normal file
19
positions/src/main/res/xml/shortcutsplus.xml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shortcuts xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<!-- 切换启动入口的快捷菜单 -->
|
||||||
|
<shortcut
|
||||||
|
android:shortcutId="hide_app_plus"
|
||||||
|
android:enabled="true"
|
||||||
|
android:icon="@mipmap/ic_launcher"
|
||||||
|
android:shortcutShortLabel="@string/hide_app_plus"
|
||||||
|
android:shortcutLongLabel="@string/hide_app_plus"
|
||||||
|
android:shortcutDisabledMessage="@string/app_plus_switch_disabled">
|
||||||
|
<intent
|
||||||
|
android:action="cc.winboll.studio.positions.PlusActivity.ACTION_HIDE_APP_PLUS"
|
||||||
|
android:targetPackage="cc.winboll.studio.positions"
|
||||||
|
android:targetClass="cc.winboll.studio.positions.PlusActivity"
|
||||||
|
android:data="hide_app_plus" />
|
||||||
|
|
||||||
|
<categories android:name="android.shortcut.conversation" />
|
||||||
|
</shortcut>
|
||||||
|
</shortcuts>
|
||||||
Reference in New Issue
Block a user