Compare commits
22 Commits
contacts-v
...
numtable-v
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3e7722e2c0 | ||
|
|
a1707e73b5 | ||
|
|
9dcbaa0d75 | ||
|
|
23920a7ff1 | ||
|
|
17c373c490 | ||
|
|
5f7c94b349 | ||
|
|
c2b739d345 | ||
|
|
67a05cd457 | ||
|
|
554ab758bf | ||
|
|
20e118cd34 | ||
|
|
f370ae8ffb | ||
|
|
c92c874ea1 | ||
|
|
945eadb617 | ||
|
|
c5bffc5eef | ||
|
|
88597fe407 | ||
|
|
53f985533a | ||
|
|
a3950f13ad | ||
|
|
c878e9dc02 | ||
|
|
f2f7cab330 | ||
|
|
753032efed | ||
|
|
2b4c43c9af | ||
|
|
711c98d556 |
@@ -1,8 +1,8 @@
|
||||
#Created by .winboll/winboll_app_build.gradle
|
||||
#Thu Jun 19 20:42:40 HKT 2025
|
||||
stageCount=2
|
||||
#Sat Jun 28 12:59:51 HKT 2025
|
||||
stageCount=3
|
||||
libraryProject=libaes
|
||||
baseVersion=15.9
|
||||
publishVersion=15.9.1
|
||||
publishVersion=15.9.2
|
||||
buildCount=0
|
||||
baseBetaVersion=15.9.2
|
||||
baseBetaVersion=15.9.3
|
||||
|
||||
@@ -83,7 +83,7 @@ public class AboutActivity extends AppCompatActivity implements IWinBoLLActivity
|
||||
appInfo.setAppGitOwner("Studio");
|
||||
appInfo.setAppGitAPPBranch(szBranchName);
|
||||
appInfo.setAppGitAPPSubProjectFolder(szBranchName);
|
||||
appInfo.setAppHomePage("https://discuz.winboll.cc/forum.php?mod=viewthread&tid=2&fromuid=1");
|
||||
appInfo.setAppHomePage("https://discuz.winboll.cc/forum.php?mod=viewthread&tid=3&extra=page%3D1");
|
||||
appInfo.setAppAPKName("AES");
|
||||
appInfo.setAppAPKFolderName("AES");
|
||||
//appInfo.setIsAddDebugTools(false);
|
||||
|
||||
@@ -30,7 +30,7 @@ android {
|
||||
// versionName 更新后需要手动设置
|
||||
// .winboll/winbollBuildProps.properties 文件的 stageCount=0
|
||||
// Gradle编译环境下合起来的 versionName 就是 "${versionName}.0"
|
||||
versionName "15.8"
|
||||
versionName "15.9"
|
||||
if(true) {
|
||||
versionName = genVersionName("${versionName}")
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#Created by .winboll/winboll_app_build.gradle
|
||||
#Mon Jun 09 09:38:19 HKT 2025
|
||||
stageCount=9
|
||||
#Thu Jul 17 11:39:14 HKT 2025
|
||||
stageCount=2
|
||||
libraryProject=libappbase
|
||||
baseVersion=15.8
|
||||
publishVersion=15.8.8
|
||||
baseVersion=15.9
|
||||
publishVersion=15.9.1
|
||||
buildCount=0
|
||||
baseBetaVersion=15.8.9
|
||||
baseBetaVersion=15.9.2
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#Created by .winboll/winboll_app_build.gradle
|
||||
#Thu Jul 17 04:06:42 HKT 2025
|
||||
stageCount=11
|
||||
#Thu Jul 17 09:57:24 HKT 2025
|
||||
stageCount=12
|
||||
libraryProject=
|
||||
baseVersion=15.3
|
||||
publishVersion=15.3.10
|
||||
publishVersion=15.3.11
|
||||
buildCount=0
|
||||
baseBetaVersion=15.3.11
|
||||
baseBetaVersion=15.3.12
|
||||
|
||||
@@ -200,7 +200,7 @@ public class SettingsActivity extends AppCompatActivity implements IWinBoLLActiv
|
||||
settingsModel.setDunResumeCount(Integer.parseInt(etDunResumeCount.getText().toString()));
|
||||
|
||||
// 应用效果提示
|
||||
ToastUtils.show(String.format("以下设置将在连拨%d次后接通电话。", settingsModel.getDunTotalCount()));
|
||||
ToastUtils.show((settingsModel.getDunTotalCount() == 1)?"电话骚扰防御力几乎为0。":String.format("以下设置将在连拨%d次后接通电话。", settingsModel.getDunTotalCount()));
|
||||
}
|
||||
settingsModel.setIsEnableDun(isEnableDun);
|
||||
Rules.getInstance(this).saveDun();
|
||||
|
||||
@@ -21,8 +21,8 @@ android {
|
||||
|
||||
dependencies {
|
||||
api fileTree(dir: 'libs', include: ['*.jar'])
|
||||
api 'cc.winboll.studio:libapputils:15.8.2'
|
||||
api 'cc.winboll.studio:libappbase:15.8.2'
|
||||
api 'cc.winboll.studio:libapputils:15.8.4'
|
||||
api 'cc.winboll.studio:libappbase:15.8.4'
|
||||
|
||||
// 吐司类库
|
||||
api 'com.github.getActivity:ToastUtils:10.5'
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#Created by .winboll/winboll_app_build.gradle
|
||||
#Thu Jun 19 20:42:26 HKT 2025
|
||||
stageCount=2
|
||||
#Sat Jun 28 12:59:30 HKT 2025
|
||||
stageCount=3
|
||||
libraryProject=libaes
|
||||
baseVersion=15.9
|
||||
publishVersion=15.9.1
|
||||
publishVersion=15.9.2
|
||||
buildCount=0
|
||||
baseBetaVersion=15.9.2
|
||||
baseBetaVersion=15.9.3
|
||||
|
||||
@@ -107,7 +107,7 @@ public class AboutView extends LinearLayout {
|
||||
mszAppDescription = mAPPInfo.getAppDescription();
|
||||
mnAppIcon = mAPPInfo.getAppIcon();
|
||||
|
||||
mszWinBoLLServerHost = GlobalApplication.isDebuging() ? "https://dev.winboll.cc": "https://www.winboll.cc";
|
||||
mszWinBoLLServerHost = GlobalApplication.isDebuging() ? "https://yun-preivew.winboll.cc": "https://yun.winboll.cc";
|
||||
|
||||
try {
|
||||
mszAppVersionName = mContext.getPackageManager().getPackageInfo(mContext.getPackageName(), 0).versionName;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#Created by .winboll/winboll_app_build.gradle
|
||||
#Mon Jun 09 09:38:19 HKT 2025
|
||||
stageCount=9
|
||||
#Thu Jul 17 11:39:14 HKT 2025
|
||||
stageCount=2
|
||||
libraryProject=libappbase
|
||||
baseVersion=15.8
|
||||
publishVersion=15.8.8
|
||||
baseVersion=15.9
|
||||
publishVersion=15.9.1
|
||||
buildCount=0
|
||||
baseBetaVersion=15.8.9
|
||||
baseBetaVersion=15.9.2
|
||||
|
||||
@@ -29,7 +29,7 @@ android {
|
||||
// versionName 更新后需要手动设置
|
||||
// .winboll/winbollBuildProps.properties 文件的 stageCount=0
|
||||
// Gradle编译环境下合起来的 versionName 就是 "${versionName}.0"
|
||||
versionName "15.2"
|
||||
versionName "15.3"
|
||||
if(true) {
|
||||
versionName = genVersionName("${versionName}")
|
||||
}
|
||||
@@ -45,9 +45,9 @@ android {
|
||||
|
||||
dependencies {
|
||||
api fileTree(dir: 'libs', include: ['*.jar'])
|
||||
api 'cc.winboll.studio:libaes:15.8.0'
|
||||
api 'cc.winboll.studio:libapputils:15.8.1'
|
||||
api 'cc.winboll.studio:libappbase:15.8.1'
|
||||
api 'cc.winboll.studio:libaes:15.9.2'
|
||||
api 'cc.winboll.studio:libapputils:15.8.4'
|
||||
api 'cc.winboll.studio:libappbase:15.8.4'
|
||||
|
||||
api 'io.github.medyo:android-about-page:2.0.0'
|
||||
api 'com.github.getActivity:ToastUtils:10.5'
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#Created by .winboll/winboll_app_build.gradle
|
||||
#Tue May 20 20:39:06 HKT 2025
|
||||
stageCount=6
|
||||
#Thu Jul 03 13:50:15 HKT 2025
|
||||
stageCount=2
|
||||
libraryProject=
|
||||
baseVersion=15.2
|
||||
publishVersion=15.2.5
|
||||
baseVersion=15.3
|
||||
publishVersion=15.3.1
|
||||
buildCount=0
|
||||
baseBetaVersion=15.2.6
|
||||
baseBetaVersion=15.3.2
|
||||
|
||||
@@ -17,7 +17,7 @@ import cc.winboll.studio.libappbase.winboll.IWinBoLLActivity;
|
||||
import cc.winboll.studio.mymessagemanager.App;
|
||||
import cc.winboll.studio.mymessagemanager.R;
|
||||
|
||||
public class AboutActivity extends WinBollActivity implements IWinBoLLActivity {
|
||||
public class AboutActivity extends WinBoLLActivity implements IWinBoLLActivity {
|
||||
|
||||
public static final String TAG = "AboutActivity";
|
||||
|
||||
@@ -79,11 +79,11 @@ public class AboutActivity extends WinBollActivity implements IWinBoLLActivity {
|
||||
appInfo.setAppName(getString(R.string.app_name));
|
||||
appInfo.setAppIcon(cc.winboll.studio.libaes.R.drawable.ic_winboll);
|
||||
appInfo.setAppDescription(getString(R.string.app_description));
|
||||
appInfo.setAppGitName("APP");
|
||||
appInfo.setAppGitName("APPBase");
|
||||
appInfo.setAppGitOwner("Studio");
|
||||
appInfo.setAppGitAPPBranch(szBranchName);
|
||||
appInfo.setAppGitAPPSubProjectFolder(szBranchName);
|
||||
appInfo.setAppHomePage("https://www.winboll.cc/studio/details.php?app=MyMessageManager");
|
||||
appInfo.setAppHomePage("https://discuz.winboll.cc/forum.php?mod=viewthread&tid=5&extra=page%3D1");
|
||||
appInfo.setAppAPKName("MyMessageManager");
|
||||
appInfo.setAppAPKFolderName("MyMessageManager");
|
||||
return new AboutView(mContext, appInfo);
|
||||
|
||||
@@ -103,6 +103,9 @@ abstract public class BaseActivity extends AppCompatActivity {
|
||||
} else if (R.id.item_defaulttheme == item.getItemId()) {
|
||||
AESThemeUtil.saveThemeStyleID(this, R.style.MyAppTheme);
|
||||
recreate();
|
||||
} else if (R.id.item_defaulttheme == item.getItemId()) {
|
||||
AESThemeUtil.saveThemeStyleID(this, R.style.MyAppTheme);
|
||||
recreate();
|
||||
}
|
||||
//ToastUtils.show("nThemeStyleID " + Integer.toString(nThemeStyleID));
|
||||
|
||||
|
||||
@@ -128,7 +128,7 @@ public class MainActivity extends BaseActivity {
|
||||
mToolbar = findViewById(R.id.activitymainASupportToolbar1);
|
||||
mToolbar.setSubtitle(getString(R.string.activity_name_main));
|
||||
setSupportActionBar(mToolbar);
|
||||
|
||||
|
||||
boolean isEnableService = mAppConfigUtil.mAppConfigBean.isEnableService();
|
||||
msvEnableService = findViewById(R.id.activitymainSwitchView1);
|
||||
msvEnableService.setChecked(isEnableService);
|
||||
@@ -269,17 +269,9 @@ public class MainActivity extends BaseActivity {
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
//return super.onCreateOptionsMenu(menu);
|
||||
getMenuInflater().inflate(R.menu.toolbar_main, menu);
|
||||
|
||||
/*ThemeUtil.BaseTheme baseTheme = ThemeUtil.getTheme(mAppConfigUtil.mAppConfigBean.getAppThemeID());
|
||||
if (baseTheme == ThemeUtil.BaseTheme.DEFAULT) {
|
||||
menu.findItem(R.id.app_defaulttheme).setChecked(true);
|
||||
} else if (baseTheme == ThemeUtil.BaseTheme.SKY) {
|
||||
menu.findItem(R.id.app_skytheme).setChecked(true);
|
||||
} else if (baseTheme == ThemeUtil.BaseTheme.GOLDEN) {
|
||||
menu.findItem(R.id.app_goldentheme).setChecked(true);
|
||||
}*/
|
||||
|
||||
return super.onCreateOptionsMenu(menu);
|
||||
super.onCreateOptionsMenu(menu);
|
||||
getMenuInflater().inflate(R.menu.toolbar_main2, menu);
|
||||
return true;
|
||||
}
|
||||
|
||||
public static void reloadSMS() {
|
||||
@@ -306,7 +298,7 @@ public class MainActivity extends BaseActivity {
|
||||
i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
startActivity(i);
|
||||
} else if (nItemId == R.id.app_log) {
|
||||
//App.getWinBoLLActivityManager().startLogActivity(this);
|
||||
App.getWinBoLLActivityManager().startLogActivity(this);
|
||||
} else if (nItemId == R.id.app_unittest) {
|
||||
Intent i = new Intent(MainActivity.this, UnitTestActivity.class);
|
||||
i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
@@ -324,7 +316,7 @@ public class MainActivity extends BaseActivity {
|
||||
i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
startActivity(i);
|
||||
}
|
||||
|
||||
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
|
||||
@@ -13,9 +13,9 @@ import cc.winboll.studio.libaes.beans.AESThemeBean;
|
||||
import cc.winboll.studio.libaes.utils.AESThemeUtil;
|
||||
import cc.winboll.studio.libappbase.winboll.IWinBoLLActivity;
|
||||
|
||||
public class WinBollActivity extends AppCompatActivity implements IWinBoLLActivity {
|
||||
public class WinBoLLActivity extends AppCompatActivity implements IWinBoLLActivity {
|
||||
|
||||
public static final String TAG = "WinBollActivity";
|
||||
public static final String TAG = "WinBoLLActivity";
|
||||
|
||||
protected volatile AESThemeBean.ThemeType mThemeType;
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
</ScrollView>
|
||||
|
||||
<cc.winboll.studio.shared.log.LogView
|
||||
<cc.winboll.studio.libappbase.LogView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1.0"
|
||||
|
||||
@@ -17,26 +17,4 @@
|
||||
<item
|
||||
android:id="@+id/app_smsrule"
|
||||
android:title="@string/text_smsrule"/>
|
||||
<item android:title="@string/app_developoptions">
|
||||
<menu>
|
||||
<item
|
||||
android:id="@+id/app_log"
|
||||
android:title="@string/app_log"/>
|
||||
<item
|
||||
android:id="@+id/app_unittest"
|
||||
android:title="@string/app_unittest"/>
|
||||
<item
|
||||
android:id="@+id/app_crashtest"
|
||||
android:title="@string/app_crashtest"/>
|
||||
</menu>
|
||||
</item>
|
||||
<item
|
||||
android:id="@+id/app_appsettings"
|
||||
android:title="@string/text_appsettings"/>
|
||||
<item
|
||||
android:id="@+id/app_about"
|
||||
android:title="@string/app_about"/>
|
||||
<item
|
||||
android:id="@+id/app_smsrecycle"
|
||||
android:title="@string/app_smsrecycle"/>
|
||||
</menu>
|
||||
|
||||
26
mymessagemanager/src/main/res/menu/toolbar_main2.xml
Normal file
26
mymessagemanager/src/main/res/menu/toolbar_main2.xml
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<item android:title="@string/app_developoptions">
|
||||
<menu>
|
||||
<item
|
||||
android:id="@+id/app_log"
|
||||
android:title="@string/app_log"/>
|
||||
<item
|
||||
android:id="@+id/app_unittest"
|
||||
android:title="@string/app_unittest"/>
|
||||
<item
|
||||
android:id="@+id/app_crashtest"
|
||||
android:title="@string/app_crashtest"/>
|
||||
</menu>
|
||||
</item>
|
||||
<item
|
||||
android:id="@+id/app_appsettings"
|
||||
android:title="@string/text_appsettings"/>
|
||||
<item
|
||||
android:id="@+id/app_about"
|
||||
android:title="@string/app_about"/>
|
||||
<item
|
||||
android:id="@+id/app_smsrecycle"
|
||||
android:title="@string/app_smsrecycle"/>
|
||||
</menu>
|
||||
@@ -1,8 +1,8 @@
|
||||
#Created by .winboll/winboll_app_build.gradle
|
||||
#Sun Jun 08 21:21:11 HKT 2025
|
||||
stageCount=1
|
||||
#Thu Jul 24 10:16:27 HKT 2025
|
||||
stageCount=2
|
||||
libraryProject=
|
||||
baseVersion=15.1
|
||||
publishVersion=15.1.0
|
||||
publishVersion=15.1.1
|
||||
buildCount=0
|
||||
baseBetaVersion=15.1.1
|
||||
baseBetaVersion=15.1.2
|
||||
|
||||
@@ -3,6 +3,11 @@
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="cc.winboll.studio.numtable">
|
||||
|
||||
<!-- Android 13及以下需要的权限 -->
|
||||
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
|
||||
<!-- 可选:查询快捷方式是否存在(部分机型需要) -->
|
||||
<uses-permission android:name="com.android.launcher.permission.QUERY_ALL_PACKAGES" />
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:icon="@drawable/ic_launcher"
|
||||
@@ -29,9 +34,7 @@
|
||||
<meta-data
|
||||
android:name="android.max_aspect"
|
||||
android:value="4.0"/>
|
||||
|
||||
<activity android:name=".GlobalApplication$CrashActivity"/>
|
||||
|
||||
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
|
||||
@@ -1,10 +1,20 @@
|
||||
package cc.winboll.studio.numtable;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.content.pm.ShortcutInfo;
|
||||
import android.content.pm.ShortcutManager;
|
||||
import android.graphics.drawable.Icon;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.RadioButton;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import cc.winboll.studio.libappbase.LogView;
|
||||
import cc.winboll.studio.numtable.R;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import java.util.UUID;
|
||||
|
||||
public class MainActivity extends AppCompatActivity {
|
||||
|
||||
@@ -19,10 +29,99 @@ public class MainActivity extends AppCompatActivity {
|
||||
setSupportActionBar(toolbar);
|
||||
|
||||
mLogView = findViewById(R.id.logview);
|
||||
|
||||
ToastUtils.show("onCreate");
|
||||
|
||||
// 初始化创建快捷方式按钮
|
||||
Button btnCreateShortcut = findViewById(R.id.btn_create_shortcut);
|
||||
btnCreateShortcut.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
createDesktopShortcut();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
((RadioButton)findViewById(R.id.rb_right)).setChecked(true);
|
||||
((RadioButton)findViewById(R.id.rb_left)).setChecked(false);
|
||||
}
|
||||
|
||||
public void onDirectionClick(View view) {
|
||||
switch (view.getId()) {
|
||||
case R.id.rb_right:
|
||||
{
|
||||
((RadioButton)findViewById(R.id.rb_left)).setChecked(false);
|
||||
break;
|
||||
}
|
||||
case R.id.rb_left:
|
||||
{
|
||||
((RadioButton)findViewById(R.id.rb_right)).setChecked(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建桌面快捷方式
|
||||
*/
|
||||
private void createDesktopShortcut() {
|
||||
// 1. 创建启动目标Activity的Intent(通常是你的主Activity)
|
||||
Intent targetIntent = new Intent(this, MainActivity.class); // 替换为你的主Activity
|
||||
targetIntent.setAction(Intent.ACTION_MAIN);
|
||||
targetIntent.addCategory(Intent.CATEGORY_LAUNCHER);
|
||||
targetIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);
|
||||
|
||||
// 2. 创建快捷方式的Intent
|
||||
Intent shortcutIntent = new Intent();
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
// 生成随机UUID
|
||||
UUID uuid = UUID.randomUUID();
|
||||
// 转换为字符串
|
||||
String uuidStr = uuid.toString();
|
||||
// Android 8.0及以上:使用ShortcutManager
|
||||
ShortcutManager shortcutManager = getSystemService(ShortcutManager.class);
|
||||
if (shortcutManager.isRequestPinShortcutSupported()) {
|
||||
if (((RadioButton)findViewById(R.id.rb_right)).isChecked()) {
|
||||
// 创建快捷方式信息
|
||||
ShortcutInfo shortcutInfo = new ShortcutInfo.Builder(this, uuidStr) // 唯一ID
|
||||
.setShortLabel(">>") // 短标签(显示在桌面)
|
||||
.setLongLabel("在右边 >>") // 长标签(长按显示)
|
||||
.setIcon(Icon.createWithResource(this, R.drawable.ic_point_right)) // 图标
|
||||
.setIntent(targetIntent)
|
||||
.build();
|
||||
// 发送创建请求
|
||||
shortcutManager.requestPinShortcut(shortcutInfo, null);
|
||||
} else {
|
||||
ShortcutInfo shortcutInfo = new ShortcutInfo.Builder(this, uuidStr) // 唯一ID
|
||||
.setShortLabel("<<") // 短标签(显示在桌面)
|
||||
.setLongLabel("在左边 <<") // 长标签(长按显示)
|
||||
.setIcon(Icon.createWithResource(this, R.drawable.ic_point_left)) // 图标
|
||||
.setIntent(targetIntent)
|
||||
.build();
|
||||
// 发送创建请求
|
||||
shortcutManager.requestPinShortcut(shortcutInfo, null);
|
||||
}
|
||||
ToastUtils.show("已请求创建快捷方式");
|
||||
} else {
|
||||
ToastUtils.show("当前设备不支持创建快捷方式");
|
||||
}
|
||||
} else {
|
||||
// Android 7.1及以下:使用旧版广播方式
|
||||
shortcutIntent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, targetIntent);
|
||||
shortcutIntent.putExtra(Intent.EXTRA_SHORTCUT_NAME, "应用快捷方式"); // 快捷方式名称
|
||||
// 设置图标(使用应用图标)
|
||||
shortcutIntent.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE,
|
||||
Intent.ShortcutIconResource.fromContext(this, R.mipmap.ic_launcher));
|
||||
// 标记为创建快捷方式
|
||||
shortcutIntent.setAction("com.android.launcher.action.INSTALL_SHORTCUT");
|
||||
// 防止重复创建
|
||||
shortcutIntent.putExtra("duplicate", false);
|
||||
|
||||
// 发送广播创建快捷方式
|
||||
sendBroadcast(shortcutIntent);
|
||||
ToastUtils.show("快捷方式已创建");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
|
||||
20
numtable/src/main/res/drawable/ic_point_left.xml
Normal file
20
numtable/src/main/res/drawable/ic_point_left.xml
Normal file
@@ -0,0 +1,20 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="512dp"
|
||||
android:height="512dp"
|
||||
android:viewportWidth="512"
|
||||
android:viewportHeight="512">
|
||||
<path
|
||||
android:fillColor="#FF3D8A1C"
|
||||
android:strokeColor="#FFF5DD00"
|
||||
android:strokeWidth="5.0"
|
||||
android:strokeLineCap="round"
|
||||
android:strokeMiterLimit="10"
|
||||
android:pathData="M401.84 141.95C361.52 236.12 354.86 278.98 399.2 382.12 359.53 383.01 245.24 289.83 245.38 265.73 247.41 236.75 361.69 143.4 401.84 141.95Z"/>
|
||||
<path
|
||||
android:fillColor="#FF3D8A1C"
|
||||
android:strokeColor="#FFF5DD00"
|
||||
android:strokeWidth="5.0"
|
||||
android:strokeLineCap="round"
|
||||
android:strokeMiterLimit="10"
|
||||
android:pathData="M276.81 141.95C236.49 236.12 229.83 278.98 274.17 382.12 234.5 383.01 120.2 289.83 120.35 265.73 122.37 236.75 236.66 143.4 276.81 141.95Z"/>
|
||||
</vector>
|
||||
20
numtable/src/main/res/drawable/ic_point_right.xml
Normal file
20
numtable/src/main/res/drawable/ic_point_right.xml
Normal file
@@ -0,0 +1,20 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="512dp"
|
||||
android:height="512dp"
|
||||
android:viewportWidth="512"
|
||||
android:viewportHeight="512">
|
||||
<path
|
||||
android:fillColor="#FF3D8A1C"
|
||||
android:strokeColor="#FFF5DD00"
|
||||
android:strokeWidth="5.0"
|
||||
android:strokeLineCap="round"
|
||||
android:strokeMiterLimit="10"
|
||||
android:pathData="M103.57 145.68C143.89 239.85 150.55 282.71 106.21 385.85 145.88 386.74 260.17 293.56 260.03 269.46 258 240.48 143.72 147.13 103.57 145.68Z"/>
|
||||
<path
|
||||
android:fillColor="#FF3D8A1C"
|
||||
android:strokeColor="#FFF5DD00"
|
||||
android:strokeWidth="5.0"
|
||||
android:strokeLineCap="round"
|
||||
android:strokeMiterLimit="10"
|
||||
android:pathData="M228.6 145.68C268.92 239.85 275.58 282.71 231.24 385.85 270.91 386.74 385.21 293.56 385.06 269.46 383.04 240.48 268.75 147.13 228.6 145.68Z"/>
|
||||
</vector>
|
||||
@@ -23,14 +23,44 @@
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1.0"
|
||||
android:gravity="center_vertical|center_horizontal">
|
||||
android:layout_weight="1.0">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
<LinearLayout
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="NumTable"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"/>
|
||||
android:gravity="right|center_vertical"
|
||||
android:layout_gravity="center_vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
android:background="@drawable/ic_point_right"/>
|
||||
|
||||
<RadioButton
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/rb_right"
|
||||
android:onClick="onDirectionClick"/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
android:background="@drawable/ic_point_left"/>
|
||||
|
||||
<RadioButton
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/rb_left"
|
||||
android:onClick="onDirectionClick"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_create_shortcut"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="创建桌面快捷方式"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user