Compare commits
	
		
			39 Commits
		
	
	
		
			a40dbcfb61
			...
			numtable-v
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					3e7722e2c0 | ||
| 
						 | 
					a1707e73b5 | ||
| 
						 | 
					9dcbaa0d75 | ||
| 
						 | 
					23920a7ff1 | ||
| 
						 | 
					17c373c490 | ||
| 
						 | 
					5f7c94b349 | ||
| 
						 | 
					c2b739d345 | ||
| 
						 | 
					67a05cd457 | ||
| 
						 | 
					554ab758bf | ||
| 
						 | 
					20e118cd34 | ||
| 
						 | 
					f370ae8ffb | ||
| 
						 | 
					c92c874ea1 | ||
| 
						 | 
					90a6116c0a | ||
| 
						 | 
					45208ecbb1 | ||
| 
						 | 
					c28d655fe3 | ||
| 
						 | 
					4b5905f74e | ||
| 
						 | 
					6bd01780ec | ||
| 
						 | 
					a6699262f8 | ||
| 
						 | 
					ea2d38defc | ||
| 
						 | 
					e430b7abe4 | ||
| 
						 | 
					6c8b0dcfa5 | ||
| 
						 | 
					7de8a4f084 | ||
| 
						 | 
					219c6614be | ||
| 
						 | 
					0f5bb020b9 | ||
| 
						 | 
					7794ff80ec | ||
| 
						 | 
					7463ad3352 | ||
| 
						 | 
					753032efed | ||
| 
						 | 
					2b4c43c9af | ||
| 
						 | 
					711c98d556 | ||
| 
						 | 
					202205588a | ||
| 
						 | 
					42c4978b44 | ||
| 
						 | 
					1a2b7b862d | ||
| 
						 | 
					eb253b374f | ||
| 
						 | 
					ac1c008035 | ||
| 
						 | 
					b124487cb1 | ||
| 
						 | 
					9621d35f79 | ||
| 
						 | 
					17de0832a6 | ||
| 
						 | 
					89dac91cc6 | ||
| 
						 | 
					3809c1bcab | 
@@ -1,8 +1,8 @@
 | 
				
			|||||||
#Created by .winboll/winboll_app_build.gradle
 | 
					#Created by .winboll/winboll_app_build.gradle
 | 
				
			||||||
#Thu Jun 19 20:42:40 HKT 2025
 | 
					#Sat Jun 28 12:59:51 HKT 2025
 | 
				
			||||||
stageCount=2
 | 
					stageCount=3
 | 
				
			||||||
libraryProject=libaes
 | 
					libraryProject=libaes
 | 
				
			||||||
baseVersion=15.9
 | 
					baseVersion=15.9
 | 
				
			||||||
publishVersion=15.9.1
 | 
					publishVersion=15.9.2
 | 
				
			||||||
buildCount=0
 | 
					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.setAppGitOwner("Studio");
 | 
				
			||||||
        appInfo.setAppGitAPPBranch(szBranchName);
 | 
					        appInfo.setAppGitAPPBranch(szBranchName);
 | 
				
			||||||
        appInfo.setAppGitAPPSubProjectFolder(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.setAppAPKName("AES");
 | 
				
			||||||
        appInfo.setAppAPKFolderName("AES");
 | 
					        appInfo.setAppAPKFolderName("AES");
 | 
				
			||||||
        //appInfo.setIsAddDebugTools(false);
 | 
					        //appInfo.setIsAddDebugTools(false);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -30,7 +30,7 @@ android {
 | 
				
			|||||||
        // versionName 更新后需要手动设置 
 | 
					        // versionName 更新后需要手动设置 
 | 
				
			||||||
        // .winboll/winbollBuildProps.properties 文件的 stageCount=0
 | 
					        // .winboll/winbollBuildProps.properties 文件的 stageCount=0
 | 
				
			||||||
        // Gradle编译环境下合起来的 versionName 就是 "${versionName}.0"
 | 
					        // Gradle编译环境下合起来的 versionName 就是 "${versionName}.0"
 | 
				
			||||||
        versionName "15.8"
 | 
					        versionName "15.9"
 | 
				
			||||||
        if(true) {
 | 
					        if(true) {
 | 
				
			||||||
            versionName = genVersionName("${versionName}")
 | 
					            versionName = genVersionName("${versionName}")
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,8 +1,8 @@
 | 
				
			|||||||
#Created by .winboll/winboll_app_build.gradle
 | 
					#Created by .winboll/winboll_app_build.gradle
 | 
				
			||||||
#Mon Jun 09 09:38:19 HKT 2025
 | 
					#Thu Jul 17 11:39:14 HKT 2025
 | 
				
			||||||
stageCount=9
 | 
					stageCount=2
 | 
				
			||||||
libraryProject=libappbase
 | 
					libraryProject=libappbase
 | 
				
			||||||
baseVersion=15.8
 | 
					baseVersion=15.9
 | 
				
			||||||
publishVersion=15.8.8
 | 
					publishVersion=15.9.1
 | 
				
			||||||
buildCount=0
 | 
					buildCount=0
 | 
				
			||||||
baseBetaVersion=15.8.9
 | 
					baseBetaVersion=15.9.2
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,7 +3,7 @@
 | 
				
			|||||||
https://github.com/aJIEw/PhoneCallApp.git
 | 
					https://github.com/aJIEw/PhoneCallApp.git
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#### 介绍
 | 
					#### 介绍
 | 
				
			||||||
通讯录与拨号
 | 
					这是可以根据正则表达式匹配拦截骚扰电话的手机拨号应用。
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#### 软件架构
 | 
					#### 软件架构
 | 
				
			||||||
适配安卓应用 [AIDE Pro] 的 Gradle 编译结构。
 | 
					适配安卓应用 [AIDE Pro] 的 Gradle 编译结构。
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -45,9 +45,9 @@ android {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
dependencies {
 | 
					dependencies {
 | 
				
			||||||
    api fileTree(dir: 'libs', include: ['*.jar'])
 | 
					    api fileTree(dir: 'libs', include: ['*.jar'])
 | 
				
			||||||
    api 'cc.winboll.studio:libaes:15.8.0'
 | 
					    api 'cc.winboll.studio:libaes:15.9.2'
 | 
				
			||||||
    api 'cc.winboll.studio:libapputils:15.8.1'
 | 
					    api 'cc.winboll.studio:libapputils:15.8.4'
 | 
				
			||||||
    api 'cc.winboll.studio:libappbase:15.8.1'
 | 
					    api 'cc.winboll.studio:libappbase:15.8.4'
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    // 权限请求框架:https://github.com/getActivity/XXPermissions
 | 
					    // 权限请求框架:https://github.com/getActivity/XXPermissions
 | 
				
			||||||
    api 'com.github.getActivity:XXPermissions:18.63'
 | 
					    api 'com.github.getActivity:XXPermissions:18.63'
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,8 +1,8 @@
 | 
				
			|||||||
#Created by .winboll/winboll_app_build.gradle
 | 
					#Created by .winboll/winboll_app_build.gradle
 | 
				
			||||||
#Tue May 20 13:02:18 HKT 2025
 | 
					#Thu Jul 17 09:57:24 HKT 2025
 | 
				
			||||||
stageCount=3
 | 
					stageCount=12
 | 
				
			||||||
libraryProject=
 | 
					libraryProject=
 | 
				
			||||||
baseVersion=15.3
 | 
					baseVersion=15.3
 | 
				
			||||||
publishVersion=15.3.2
 | 
					publishVersion=15.3.11
 | 
				
			||||||
buildCount=0
 | 
					buildCount=0
 | 
				
			||||||
baseBetaVersion=15.3.3
 | 
					baseBetaVersion=15.3.12
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -79,12 +79,12 @@ public class AboutActivity extends AppCompatActivity implements IWinBoLLActivity
 | 
				
			|||||||
        APPInfo appInfo = new APPInfo();
 | 
					        APPInfo appInfo = new APPInfo();
 | 
				
			||||||
        appInfo.setAppName("Contacts");
 | 
					        appInfo.setAppName("Contacts");
 | 
				
			||||||
        appInfo.setAppIcon(cc.winboll.studio.libaes.R.drawable.ic_winboll);
 | 
					        appInfo.setAppIcon(cc.winboll.studio.libaes.R.drawable.ic_winboll);
 | 
				
			||||||
        appInfo.setAppDescription("通讯录与拨号");
 | 
					        appInfo.setAppDescription("这是可以根据正则表达式匹配拦截骚扰电话的手机拨号应用。");
 | 
				
			||||||
        appInfo.setAppGitName("APP");
 | 
					        appInfo.setAppGitName("APPBase");
 | 
				
			||||||
        appInfo.setAppGitOwner("Studio");
 | 
					        appInfo.setAppGitOwner("Studio");
 | 
				
			||||||
        appInfo.setAppGitAPPBranch(szBranchName);
 | 
					        appInfo.setAppGitAPPBranch(szBranchName);
 | 
				
			||||||
        appInfo.setAppGitAPPSubProjectFolder(szBranchName);
 | 
					        appInfo.setAppGitAPPSubProjectFolder(szBranchName);
 | 
				
			||||||
        appInfo.setAppHomePage("https://www.winboll.cc/studio/details.php?app=Contacts");
 | 
					        appInfo.setAppHomePage("https://discuz.winboll.cc/forum.php?mod=viewthread&tid=4&extra=page%3D1");
 | 
				
			||||||
        appInfo.setAppAPKName("Contacts");
 | 
					        appInfo.setAppAPKName("Contacts");
 | 
				
			||||||
        appInfo.setAppAPKFolderName("Contacts");
 | 
					        appInfo.setAppAPKFolderName("Contacts");
 | 
				
			||||||
        return new AboutView(mContext, appInfo);
 | 
					        return new AboutView(mContext, appInfo);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -198,6 +198,9 @@ public class SettingsActivity extends AppCompatActivity implements IWinBoLLActiv
 | 
				
			|||||||
            settingsModel.setDunTotalCount(Integer.parseInt(etDunTotalCount.getText().toString()));
 | 
					            settingsModel.setDunTotalCount(Integer.parseInt(etDunTotalCount.getText().toString()));
 | 
				
			||||||
            settingsModel.setDunResumeSecondCount(Integer.parseInt(etDunResumeSecondCount.getText().toString()));
 | 
					            settingsModel.setDunResumeSecondCount(Integer.parseInt(etDunResumeSecondCount.getText().toString()));
 | 
				
			||||||
            settingsModel.setDunResumeCount(Integer.parseInt(etDunResumeCount.getText().toString()));
 | 
					            settingsModel.setDunResumeCount(Integer.parseInt(etDunResumeCount.getText().toString()));
 | 
				
			||||||
 | 
								
 | 
				
			||||||
 | 
								// 应用效果提示
 | 
				
			||||||
 | 
								ToastUtils.show((settingsModel.getDunTotalCount() == 1)?"电话骚扰防御力几乎为0。":String.format("以下设置将在连拨%d次后接通电话。", settingsModel.getDunTotalCount()));
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        settingsModel.setIsEnableDun(isEnableDun);
 | 
					        settingsModel.setIsEnableDun(isEnableDun);
 | 
				
			||||||
        Rules.getInstance(this).saveDun();
 | 
					        Rules.getInstance(this).saveDun();
 | 
				
			||||||
@@ -207,6 +210,7 @@ public class SettingsActivity extends AppCompatActivity implements IWinBoLLActiv
 | 
				
			|||||||
        etDunTotalCount.setText(Integer.toString(settingsModel.getDunTotalCount()));
 | 
					        etDunTotalCount.setText(Integer.toString(settingsModel.getDunTotalCount()));
 | 
				
			||||||
        etDunResumeSecondCount.setText(Integer.toString(settingsModel.getDunResumeSecondCount()));
 | 
					        etDunResumeSecondCount.setText(Integer.toString(settingsModel.getDunResumeSecondCount()));
 | 
				
			||||||
        etDunResumeCount.setText(Integer.toString(settingsModel.getDunResumeCount()));
 | 
					        etDunResumeCount.setText(Integer.toString(settingsModel.getDunResumeCount()));
 | 
				
			||||||
 | 
							
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    void updateStreamVolumeTextView() {
 | 
					    void updateStreamVolumeTextView() {
 | 
				
			||||||
@@ -243,6 +247,9 @@ public class SettingsActivity extends AppCompatActivity implements IWinBoLLActiv
 | 
				
			|||||||
        Rules.getInstance(this).resetDefaultBoBullToonURL();
 | 
					        Rules.getInstance(this).resetDefaultBoBullToonURL();
 | 
				
			||||||
        EditText etBoBullToonURL = findViewById(R.id.bobulltoonurl_et);
 | 
					        EditText etBoBullToonURL = findViewById(R.id.bobulltoonurl_et);
 | 
				
			||||||
        etBoBullToonURL.setText(Rules.getInstance(this).getBoBullToonURL());
 | 
					        etBoBullToonURL.setText(Rules.getInstance(this).getBoBullToonURL());
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
							final TomCat tomCat = TomCat.getInstance(this);
 | 
				
			||||||
 | 
							tomCat.cleanBoBullToon();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public void onDownloadBoBullToon(View view) {
 | 
					    public void onDownloadBoBullToon(View view) {
 | 
				
			||||||
@@ -330,4 +337,8 @@ public class SettingsActivity extends AppCompatActivity implements IWinBoLLActiv
 | 
				
			|||||||
    public void onAbout(View view) {
 | 
					    public void onAbout(View view) {
 | 
				
			||||||
        App.getWinBoLLActivityManager().startWinBoLLActivity(this, AboutActivity.class);
 | 
					        App.getWinBoLLActivityManager().startWinBoLLActivity(this, AboutActivity.class);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						public void onLogView(View view) {
 | 
				
			||||||
 | 
					        App.getWinBoLLActivityManager().startLogActivity(this);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -5,13 +5,18 @@ package cc.winboll.studio.contacts.adapters;
 | 
				
			|||||||
 * @Date 2025/02/26 13:09:32
 | 
					 * @Date 2025/02/26 13:09:32
 | 
				
			||||||
 * @Describe CallLogAdapter
 | 
					 * @Describe CallLogAdapter
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					import android.content.ClipData;
 | 
				
			||||||
 | 
					import android.content.ClipboardManager;
 | 
				
			||||||
import android.content.Context;
 | 
					import android.content.Context;
 | 
				
			||||||
import android.content.Intent;
 | 
					import android.content.Intent;
 | 
				
			||||||
import android.view.LayoutInflater;
 | 
					import android.view.LayoutInflater;
 | 
				
			||||||
 | 
					import android.view.MenuItem;
 | 
				
			||||||
import android.view.View;
 | 
					import android.view.View;
 | 
				
			||||||
import android.view.ViewGroup;
 | 
					import android.view.ViewGroup;
 | 
				
			||||||
import android.widget.Button;
 | 
					import android.widget.Button;
 | 
				
			||||||
 | 
					import android.widget.PopupMenu;
 | 
				
			||||||
import android.widget.TextView;
 | 
					import android.widget.TextView;
 | 
				
			||||||
 | 
					import android.widget.Toast;
 | 
				
			||||||
import androidx.annotation.NonNull;
 | 
					import androidx.annotation.NonNull;
 | 
				
			||||||
import androidx.recyclerview.widget.RecyclerView;
 | 
					import androidx.recyclerview.widget.RecyclerView;
 | 
				
			||||||
import cc.winboll.studio.contacts.R;
 | 
					import cc.winboll.studio.contacts.R;
 | 
				
			||||||
@@ -47,6 +52,38 @@ public class CallLogAdapter extends RecyclerView.Adapter<CallLogAdapter.CallLogV
 | 
				
			|||||||
    public void onBindViewHolder(@NonNull CallLogViewHolder holder, int position) {
 | 
					    public void onBindViewHolder(@NonNull CallLogViewHolder holder, int position) {
 | 
				
			||||||
        final CallLogModel callLog = callLogList.get(position);
 | 
					        final CallLogModel callLog = callLogList.get(position);
 | 
				
			||||||
        holder.phoneNumber.setText(callLog.getPhoneNumber() + "☎" + mContactUtils.getContactsName(callLog.getPhoneNumber()));
 | 
					        holder.phoneNumber.setText(callLog.getPhoneNumber() + "☎" + mContactUtils.getContactsName(callLog.getPhoneNumber()));
 | 
				
			||||||
 | 
							holder.phoneNumber.setOnLongClickListener(new View.OnLongClickListener() {
 | 
				
			||||||
 | 
									@Override
 | 
				
			||||||
 | 
									public boolean onLongClick(View p1) {
 | 
				
			||||||
 | 
										// 弹出复制菜单
 | 
				
			||||||
 | 
										PopupMenu menu = new PopupMenu(mContext, holder.phoneNumber);
 | 
				
			||||||
 | 
										//加载菜单资源
 | 
				
			||||||
 | 
										menu.getMenuInflater().inflate(R.menu.toolbar_calllog_phonenumber, menu.getMenu());
 | 
				
			||||||
 | 
										//设置点击事件的响应
 | 
				
			||||||
 | 
										menu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
 | 
				
			||||||
 | 
												@Override
 | 
				
			||||||
 | 
												public boolean onMenuItemClick(MenuItem menuItem) {
 | 
				
			||||||
 | 
													int nItemId = menuItem.getItemId();
 | 
				
			||||||
 | 
													if (nItemId == R.id.item_calllog_phonenumber_copy) {
 | 
				
			||||||
 | 
														// Gets a handle to the clipboard service.
 | 
				
			||||||
 | 
														ClipboardManager clipboard = (ClipboardManager) mContext.getSystemService(Context.CLIPBOARD_SERVICE);
 | 
				
			||||||
 | 
														// Creates a new text clip to put on the clipboard
 | 
				
			||||||
 | 
														ClipData clip = ClipData.newPlainText("simple text", callLog.getPhoneNumber());
 | 
				
			||||||
 | 
														// Set the clipboard's primary clip.
 | 
				
			||||||
 | 
														clipboard.setPrimaryClip(clip);
 | 
				
			||||||
 | 
														Toast.makeText(mContext, "Copy to clipboard.", Toast.LENGTH_SHORT).show();
 | 
				
			||||||
 | 
													}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
													return true;
 | 
				
			||||||
 | 
												}
 | 
				
			||||||
 | 
											});
 | 
				
			||||||
 | 
										//一定要调用show()来显示弹出式菜单
 | 
				
			||||||
 | 
										menu.show();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
										return true;
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								});
 | 
				
			||||||
 | 
							
 | 
				
			||||||
        holder.callStatus.setText(callLog.getCallStatus());
 | 
					        holder.callStatus.setText(callLog.getCallStatus());
 | 
				
			||||||
        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.getDefault());
 | 
					        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.getDefault());
 | 
				
			||||||
        holder.callDate.setText(dateFormat.format(callLog.getCallDate()));
 | 
					        holder.callDate.setText(dateFormat.format(callLog.getCallDate()));
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -5,19 +5,25 @@ package cc.winboll.studio.contacts.adapters;
 | 
				
			|||||||
 * @Date 2025/02/26 13:35:44
 | 
					 * @Date 2025/02/26 13:35:44
 | 
				
			||||||
 * @Describe ContactAdapter
 | 
					 * @Describe ContactAdapter
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					import android.content.ClipData;
 | 
				
			||||||
 | 
					import android.content.ClipboardManager;
 | 
				
			||||||
 | 
					import android.content.Context;
 | 
				
			||||||
import android.content.Intent;
 | 
					import android.content.Intent;
 | 
				
			||||||
import android.view.LayoutInflater;
 | 
					import android.view.LayoutInflater;
 | 
				
			||||||
 | 
					import android.view.MenuItem;
 | 
				
			||||||
import android.view.View;
 | 
					import android.view.View;
 | 
				
			||||||
import android.view.ViewGroup;
 | 
					import android.view.ViewGroup;
 | 
				
			||||||
import android.widget.Button;
 | 
					import android.widget.LinearLayout;
 | 
				
			||||||
 | 
					import android.widget.PopupMenu;
 | 
				
			||||||
import android.widget.TextView;
 | 
					import android.widget.TextView;
 | 
				
			||||||
 | 
					import android.widget.Toast;
 | 
				
			||||||
import androidx.annotation.NonNull;
 | 
					import androidx.annotation.NonNull;
 | 
				
			||||||
import androidx.recyclerview.widget.RecyclerView;
 | 
					import androidx.recyclerview.widget.RecyclerView;
 | 
				
			||||||
import cc.winboll.studio.contacts.R;
 | 
					import cc.winboll.studio.contacts.R;
 | 
				
			||||||
import cc.winboll.studio.contacts.beans.ContactModel;
 | 
					import cc.winboll.studio.contacts.beans.ContactModel;
 | 
				
			||||||
 | 
					import cc.winboll.studio.libaes.views.AOHPCTCSeekBar;
 | 
				
			||||||
import com.hjq.toast.ToastUtils;
 | 
					import com.hjq.toast.ToastUtils;
 | 
				
			||||||
import java.util.List;
 | 
					import java.util.List;
 | 
				
			||||||
import cc.winboll.studio.libaes.views.AOHPCTCSeekBar;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
public class ContactAdapter extends RecyclerView.Adapter<ContactAdapter.ContactViewHolder> {
 | 
					public class ContactAdapter extends RecyclerView.Adapter<ContactAdapter.ContactViewHolder> {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -26,8 +32,10 @@ public class ContactAdapter extends RecyclerView.Adapter<ContactAdapter.ContactV
 | 
				
			|||||||
    private static final int REQUEST_CALL_PHONE = 1;
 | 
					    private static final int REQUEST_CALL_PHONE = 1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    private List<ContactModel> contactList;
 | 
					    private List<ContactModel> contactList;
 | 
				
			||||||
 | 
						Context mContext;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public ContactAdapter(List<ContactModel> contactList) {
 | 
					    public ContactAdapter(Context context, List<ContactModel> contactList) {
 | 
				
			||||||
 | 
							mContext = context;
 | 
				
			||||||
        this.contactList = contactList;
 | 
					        this.contactList = contactList;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -41,6 +49,37 @@ public class ContactAdapter extends RecyclerView.Adapter<ContactAdapter.ContactV
 | 
				
			|||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
    public void onBindViewHolder(@NonNull ContactViewHolder holder, int position) {
 | 
					    public void onBindViewHolder(@NonNull ContactViewHolder holder, int position) {
 | 
				
			||||||
        final ContactModel contact = contactList.get(position);
 | 
					        final ContactModel contact = contactList.get(position);
 | 
				
			||||||
 | 
							holder.llPhoneNumberMain.setOnLongClickListener(new View.OnLongClickListener() {
 | 
				
			||||||
 | 
									@Override
 | 
				
			||||||
 | 
									public boolean onLongClick(View p1) {
 | 
				
			||||||
 | 
										// 弹出复制菜单
 | 
				
			||||||
 | 
										PopupMenu menu = new PopupMenu(mContext, holder.llPhoneNumberMain);
 | 
				
			||||||
 | 
										//加载菜单资源
 | 
				
			||||||
 | 
										menu.getMenuInflater().inflate(R.menu.toolbar_contact_phonenumber, menu.getMenu());
 | 
				
			||||||
 | 
										//设置点击事件的响应
 | 
				
			||||||
 | 
										menu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
 | 
				
			||||||
 | 
												@Override
 | 
				
			||||||
 | 
												public boolean onMenuItemClick(MenuItem menuItem) {
 | 
				
			||||||
 | 
													int nItemId = menuItem.getItemId();
 | 
				
			||||||
 | 
													if (nItemId == R.id.item_contact_phonenumber_copy) {
 | 
				
			||||||
 | 
														// Gets a handle to the clipboard service.
 | 
				
			||||||
 | 
														ClipboardManager clipboard = (ClipboardManager) mContext.getSystemService(Context.CLIPBOARD_SERVICE);
 | 
				
			||||||
 | 
														// Creates a new text clip to put on the clipboard
 | 
				
			||||||
 | 
														ClipData clip = ClipData.newPlainText("simple text", contact.getNumber());
 | 
				
			||||||
 | 
														// Set the clipboard's primary clip.
 | 
				
			||||||
 | 
														clipboard.setPrimaryClip(clip);
 | 
				
			||||||
 | 
														Toast.makeText(mContext, "Copy to clipboard.", Toast.LENGTH_SHORT).show();
 | 
				
			||||||
 | 
													}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
													return true;
 | 
				
			||||||
 | 
												}
 | 
				
			||||||
 | 
											});
 | 
				
			||||||
 | 
										//一定要调用show()来显示弹出式菜单
 | 
				
			||||||
 | 
										menu.show();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
										return true;
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								});
 | 
				
			||||||
        holder.contactName.setText(contact.getName());
 | 
					        holder.contactName.setText(contact.getName());
 | 
				
			||||||
        holder.contactNumber.setText(contact.getNumber());
 | 
					        holder.contactNumber.setText(contact.getNumber());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -69,12 +108,14 @@ public class ContactAdapter extends RecyclerView.Adapter<ContactAdapter.ContactV
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public class ContactViewHolder extends RecyclerView.ViewHolder {
 | 
					    public class ContactViewHolder extends RecyclerView.ViewHolder {
 | 
				
			||||||
 | 
							LinearLayout llPhoneNumberMain;
 | 
				
			||||||
        TextView contactName;
 | 
					        TextView contactName;
 | 
				
			||||||
        TextView contactNumber;
 | 
					        TextView contactNumber;
 | 
				
			||||||
        AOHPCTCSeekBar dialAOHPCTCSeekBar;
 | 
					        AOHPCTCSeekBar dialAOHPCTCSeekBar;
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        public ContactViewHolder(@NonNull View itemView) {
 | 
					        public ContactViewHolder(@NonNull View itemView) {
 | 
				
			||||||
            super(itemView);
 | 
					            super(itemView);
 | 
				
			||||||
 | 
								llPhoneNumberMain = itemView.findViewById(R.id.itemcontactLinearLayout1);
 | 
				
			||||||
            contactName = itemView.findViewById(R.id.contact_name);
 | 
					            contactName = itemView.findViewById(R.id.contact_name);
 | 
				
			||||||
            contactNumber = itemView.findViewById(R.id.contact_number);
 | 
					            contactNumber = itemView.findViewById(R.id.contact_number);
 | 
				
			||||||
            dialAOHPCTCSeekBar = itemView.findViewById(R.id.aohpctcseekbar_dial);
 | 
					            dialAOHPCTCSeekBar = itemView.findViewById(R.id.aohpctcseekbar_dial);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -7,6 +7,7 @@ package cc.winboll.studio.contacts.adapters;
 | 
				
			|||||||
 */
 | 
					 */
 | 
				
			||||||
import android.content.Context;
 | 
					import android.content.Context;
 | 
				
			||||||
import android.view.LayoutInflater;
 | 
					import android.view.LayoutInflater;
 | 
				
			||||||
 | 
					import android.view.MotionEvent;
 | 
				
			||||||
import android.view.View;
 | 
					import android.view.View;
 | 
				
			||||||
import android.view.ViewGroup;
 | 
					import android.view.ViewGroup;
 | 
				
			||||||
import android.widget.Button;
 | 
					import android.widget.Button;
 | 
				
			||||||
@@ -20,6 +21,7 @@ import cc.winboll.studio.contacts.R;
 | 
				
			|||||||
import cc.winboll.studio.contacts.beans.PhoneConnectRuleModel;
 | 
					import cc.winboll.studio.contacts.beans.PhoneConnectRuleModel;
 | 
				
			||||||
import cc.winboll.studio.contacts.dun.Rules;
 | 
					import cc.winboll.studio.contacts.dun.Rules;
 | 
				
			||||||
import cc.winboll.studio.contacts.views.LeftScrollView;
 | 
					import cc.winboll.studio.contacts.views.LeftScrollView;
 | 
				
			||||||
 | 
					import cc.winboll.studio.libappbase.LogUtils;
 | 
				
			||||||
import cc.winboll.studio.libappbase.dialogs.YesNoAlertDialog;
 | 
					import cc.winboll.studio.libappbase.dialogs.YesNoAlertDialog;
 | 
				
			||||||
import com.hjq.toast.ToastUtils;
 | 
					import com.hjq.toast.ToastUtils;
 | 
				
			||||||
import java.util.ArrayList;
 | 
					import java.util.ArrayList;
 | 
				
			||||||
@@ -60,6 +62,10 @@ public class PhoneConnectRuleAdapter extends RecyclerView.Adapter<RecyclerView.V
 | 
				
			|||||||
            final SimpleViewHolder simpleViewHolder = (SimpleViewHolder) holder;
 | 
					            final SimpleViewHolder simpleViewHolder = (SimpleViewHolder) holder;
 | 
				
			||||||
            String szView = model.getRuleText().trim().equals("") ?"[NULL]": model.getRuleText();
 | 
					            String szView = model.getRuleText().trim().equals("") ?"[NULL]": model.getRuleText();
 | 
				
			||||||
            simpleViewHolder.tvRuleText.setText(szView);
 | 
					            simpleViewHolder.tvRuleText.setText(szView);
 | 
				
			||||||
 | 
					            simpleViewHolder.checkBoxAllow.setChecked(model.isAllowConnection());
 | 
				
			||||||
 | 
								simpleViewHolder.checkBoxAllow.setEnabled(false);
 | 
				
			||||||
 | 
					            simpleViewHolder.checkBoxEnable.setChecked(model.isEnable());
 | 
				
			||||||
 | 
								simpleViewHolder.checkBoxEnable.setEnabled(false);
 | 
				
			||||||
            simpleViewHolder.scrollView.setOnActionListener(new LeftScrollView.OnActionListener(){
 | 
					            simpleViewHolder.scrollView.setOnActionListener(new LeftScrollView.OnActionListener(){
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    @Override
 | 
					                    @Override
 | 
				
			||||||
@@ -215,16 +221,22 @@ public class PhoneConnectRuleAdapter extends RecyclerView.Adapter<RecyclerView.V
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        private final LeftScrollView scrollView;
 | 
					        private final LeftScrollView scrollView;
 | 
				
			||||||
        private final TextView tvRuleText;
 | 
					        private final TextView tvRuleText;
 | 
				
			||||||
 | 
							CheckBox checkBoxAllow;
 | 
				
			||||||
 | 
					        CheckBox checkBoxEnable;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        public SimpleViewHolder(@NonNull ViewGroup parent, @NonNull View itemView) {
 | 
					        public SimpleViewHolder(@NonNull ViewGroup parent, @NonNull View itemView) {
 | 
				
			||||||
            super(itemView);
 | 
					            super(itemView);
 | 
				
			||||||
            scrollView = itemView.findViewById(R.id.scrollView);
 | 
					            scrollView = itemView.findViewById(R.id.scrollView);
 | 
				
			||||||
            //tvRuleText = itemView.findViewById(R.id.ruletext_tv);
 | 
								LayoutInflater inflater = LayoutInflater.from(itemView.getContext());
 | 
				
			||||||
            tvRuleText = new TextView(itemView.getContext());
 | 
							    View viewContent = inflater.inflate(R.layout.view_phone_connect_rule_simple_content, parent, false);
 | 
				
			||||||
 | 
					            tvRuleText = viewContent.findViewById(R.id.ruletext_tv);
 | 
				
			||||||
 | 
					            checkBoxAllow = viewContent.findViewById(R.id.checkbox_allow);
 | 
				
			||||||
 | 
					            checkBoxEnable = viewContent.findViewById(R.id.checkbox_enable);
 | 
				
			||||||
 | 
					            //tvRuleText = new TextView(itemView.getContext());
 | 
				
			||||||
            scrollView.setContentWidth(parent.getWidth());
 | 
					            scrollView.setContentWidth(parent.getWidth());
 | 
				
			||||||
            //scrollView.setContentWidth(600);
 | 
					            //scrollView.setContentWidth(600);
 | 
				
			||||||
            scrollView.addContentLayout(tvRuleText);
 | 
					            scrollView.addContentLayout(viewContent);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@@ -243,5 +255,9 @@ public class PhoneConnectRuleAdapter extends RecyclerView.Adapter<RecyclerView.V
 | 
				
			|||||||
            buttonConfirm = itemView.findViewById(R.id.button_confirm);
 | 
					            buttonConfirm = itemView.findViewById(R.id.button_confirm);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						private void setCheckBoxTouchListener(CheckBox checkBox) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -44,7 +44,7 @@ public class TomCat {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
        return _TomCat;
 | 
					        return _TomCat;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    
 | 
					
 | 
				
			||||||
    public String getDefaultBobulltoonUrl() {
 | 
					    public String getDefaultBobulltoonUrl() {
 | 
				
			||||||
        return mContext.getString(R.string.default_bobulltoon_url);
 | 
					        return mContext.getString(R.string.default_bobulltoon_url);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@@ -123,7 +123,7 @@ public class TomCat {
 | 
				
			|||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            // 更新新文件
 | 
					            // 更新新文件
 | 
				
			||||||
            if(downloadAndExtractZip(zipUrl, destinationFolder)) {
 | 
					            if (downloadAndExtractZip(zipUrl, destinationFolder)) {
 | 
				
			||||||
                LogUtils.d(TAG, "ZIP 文件下载并解压成功。");
 | 
					                LogUtils.d(TAG, "ZIP 文件下载并解压成功。");
 | 
				
			||||||
                return true;
 | 
					                return true;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
@@ -155,6 +155,19 @@ public class TomCat {
 | 
				
			|||||||
        return mContext.getExternalFilesDir(TAG);
 | 
					        return mContext.getExternalFilesDir(TAG);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						public void cleanBoBullToon() {
 | 
				
			||||||
 | 
							String destinationFolder = getWorkingFolder().getPath(); // 替换为实际的目标文件夹路径
 | 
				
			||||||
 | 
							// 删除旧文件
 | 
				
			||||||
 | 
							File fOldFolder = new File(destinationFolder);
 | 
				
			||||||
 | 
							if (fOldFolder.exists()) {
 | 
				
			||||||
 | 
								deleteFolderRecursive(fOldFolder);
 | 
				
			||||||
 | 
								fOldFolder.mkdirs();
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							ToastUtils.show("已清空 BoBullToon 数据!");
 | 
				
			||||||
 | 
							LogUtils.d(TAG, "已清空 BoBullToon 数据");
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public boolean loadPhoneBoBullToon() {
 | 
					    public boolean loadPhoneBoBullToon() {
 | 
				
			||||||
        listPhoneBoBullToon.clear();
 | 
					        listPhoneBoBullToon.clear();
 | 
				
			||||||
        File fBoBullToon = new File(getWorkingFolder(), "bobulltoon");
 | 
					        File fBoBullToon = new File(getWorkingFolder(), "bobulltoon");
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -145,6 +145,14 @@ public class Rules {
 | 
				
			|||||||
            LogUtils.d(TAG, String.format("isDefend == %s\nisConnect == %s", isDefend, isConnect));
 | 
					            LogUtils.d(TAG, String.format("isDefend == %s\nisConnect == %s", isDefend, isConnect));
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        // 检验拨不通号码群
 | 
				
			||||||
 | 
					        if (!isDefend && MainService.isPhoneInBoBullToon(phoneNumber)) {
 | 
				
			||||||
 | 
					            LogUtils.d(TAG, String.format("PhoneNumber %s\n Is In BoBullToon", phoneNumber));
 | 
				
			||||||
 | 
					            isDefend = true;
 | 
				
			||||||
 | 
					            isConnect = false;
 | 
				
			||||||
 | 
					            LogUtils.d(TAG, String.format("isDefend == %s\nisConnect == %s", isDefend, isConnect));
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // 查询通讯录是否有该联系人
 | 
					        // 查询通讯录是否有该联系人
 | 
				
			||||||
        boolean isPhoneInContacts = ContactUtils.getInstance(mContext).isPhoneInContacts(mContext, phoneNumber);
 | 
					        boolean isPhoneInContacts = ContactUtils.getInstance(mContext).isPhoneInContacts(mContext, phoneNumber);
 | 
				
			||||||
        if (!isDefend) {
 | 
					        if (!isDefend) {
 | 
				
			||||||
@@ -158,14 +166,6 @@ public class Rules {
 | 
				
			|||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // 检验拨不通号码群
 | 
					 | 
				
			||||||
        if (!isDefend && MainService.isPhoneInBoBullToon(phoneNumber)) {
 | 
					 | 
				
			||||||
            LogUtils.d(TAG, String.format("PhoneNumber %s\n Is In BoBullToon", phoneNumber));
 | 
					 | 
				
			||||||
            isDefend = true;
 | 
					 | 
				
			||||||
            isConnect = false;
 | 
					 | 
				
			||||||
            LogUtils.d(TAG, String.format("isDefend == %s\nisConnect == %s", isDefend, isConnect));
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        // 正则匹配规则名单校验
 | 
					        // 正则匹配规则名单校验
 | 
				
			||||||
        if (!isDefend) {
 | 
					        if (!isDefend) {
 | 
				
			||||||
            for (int i = 0; i < _PhoneConnectRuleModelList.size(); i++) {
 | 
					            for (int i = 0; i < _PhoneConnectRuleModelList.size(); i++) {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -73,7 +73,7 @@ public class ContactsFragment extends Fragment {
 | 
				
			|||||||
        super.onViewCreated(view, savedInstanceState);
 | 
					        super.onViewCreated(view, savedInstanceState);
 | 
				
			||||||
        recyclerView = view.findViewById(R.id.contacts_recycler_view);
 | 
					        recyclerView = view.findViewById(R.id.contacts_recycler_view);
 | 
				
			||||||
        recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
 | 
					        recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
 | 
				
			||||||
        contactAdapter = new ContactAdapter(contactList);
 | 
					        contactAdapter = new ContactAdapter(getContext(), contactList);
 | 
				
			||||||
        recyclerView.setAdapter(contactAdapter);
 | 
					        recyclerView.setAdapter(contactAdapter);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        searchEditText = view.findViewById(R.id.search_edit_text);
 | 
					        searchEditText = view.findViewById(R.id.search_edit_text);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -47,8 +47,8 @@ public class LeftScrollView extends HorizontalScrollView {
 | 
				
			|||||||
        init();
 | 
					        init();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public void addContentLayout(TextView textView) {
 | 
					    public void addContentLayout(View viewContent) {
 | 
				
			||||||
        contentLayout.addView(textView, LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT);
 | 
					        contentLayout.addView(viewContent, LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public void setContentWidth(int contentWidth) {
 | 
					    public void setContentWidth(int contentWidth) {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -269,6 +269,19 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
			</LinearLayout>
 | 
								</LinearLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								<LinearLayout
 | 
				
			||||||
 | 
									android:orientation="horizontal"
 | 
				
			||||||
 | 
									android:layout_width="match_parent"
 | 
				
			||||||
 | 
									android:layout_height="wrap_content"
 | 
				
			||||||
 | 
									android:gravity="center_horizontal">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
									<TextView
 | 
				
			||||||
 | 
										android:layout_width="wrap_content"
 | 
				
			||||||
 | 
										android:layout_height="wrap_content"
 | 
				
			||||||
 | 
										android:text="<<==向左拉动列表项可编辑内容"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								</LinearLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			<androidx.recyclerview.widget.RecyclerView
 | 
								<androidx.recyclerview.widget.RecyclerView
 | 
				
			||||||
				android:id="@+id/recycler_view"
 | 
									android:id="@+id/recycler_view"
 | 
				
			||||||
				android:layout_width="match_parent"
 | 
									android:layout_width="match_parent"
 | 
				
			||||||
@@ -287,6 +300,12 @@
 | 
				
			|||||||
				android:layout_height="wrap_content"
 | 
									android:layout_height="wrap_content"
 | 
				
			||||||
				android:gravity="right">
 | 
									android:gravity="right">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
									<Button
 | 
				
			||||||
 | 
										android:layout_width="wrap_content"
 | 
				
			||||||
 | 
										android:layout_height="wrap_content"
 | 
				
			||||||
 | 
										android:text="LogView"
 | 
				
			||||||
 | 
										android:onClick="onLogView"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				<Button
 | 
									<Button
 | 
				
			||||||
					android:layout_width="wrap_content"
 | 
										android:layout_width="wrap_content"
 | 
				
			||||||
					android:layout_height="wrap_content"
 | 
										android:layout_height="wrap_content"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -15,8 +15,10 @@
 | 
				
			|||||||
		<Button
 | 
							<Button
 | 
				
			||||||
			android:layout_width="wrap_content"
 | 
								android:layout_width="wrap_content"
 | 
				
			||||||
			android:layout_height="wrap_content"
 | 
								android:layout_height="wrap_content"
 | 
				
			||||||
			android:text="Test Main"
 | 
								android:text="Add Demo Rules(While size is 0) and Test"
 | 
				
			||||||
			android:onClick="onTestMain"/>
 | 
								android:onClick="onTestMain"
 | 
				
			||||||
 | 
								android:textSize="10sp"
 | 
				
			||||||
 | 
								android:textAllCaps="false"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	</LinearLayout>
 | 
						</LinearLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -43,7 +45,8 @@
 | 
				
			|||||||
			android:layout_width="wrap_content"
 | 
								android:layout_width="wrap_content"
 | 
				
			||||||
			android:layout_height="wrap_content"
 | 
								android:layout_height="wrap_content"
 | 
				
			||||||
			android:text="Test Phone"
 | 
								android:text="Test Phone"
 | 
				
			||||||
			android:onClick="onTestPhone"/>
 | 
								android:onClick="onTestPhone"
 | 
				
			||||||
 | 
								android:textAllCaps="false"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	</LinearLayout>
 | 
						</LinearLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -9,7 +9,8 @@
 | 
				
			|||||||
	<LinearLayout
 | 
						<LinearLayout
 | 
				
			||||||
		android:orientation="horizontal"
 | 
							android:orientation="horizontal"
 | 
				
			||||||
		android:layout_width="match_parent"
 | 
							android:layout_width="match_parent"
 | 
				
			||||||
		android:layout_height="wrap_content">
 | 
							android:layout_height="wrap_content"
 | 
				
			||||||
 | 
							android:id="@+id/itemcontactLinearLayout1">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		<TextView
 | 
							<TextView
 | 
				
			||||||
			android:id="@+id/contact_number"
 | 
								android:id="@+id/contact_number"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -23,7 +23,7 @@
 | 
				
			|||||||
			android:id="@+id/checkbox_allow"
 | 
								android:id="@+id/checkbox_allow"
 | 
				
			||||||
			android:layout_width="wrap_content"
 | 
								android:layout_width="wrap_content"
 | 
				
			||||||
			android:layout_height="wrap_content"
 | 
								android:layout_height="wrap_content"
 | 
				
			||||||
			android:text="允许连接"/>
 | 
								android:text="连接"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        <CheckBox
 | 
					        <CheckBox
 | 
				
			||||||
            android:id="@+id/checkbox_enable"
 | 
					            android:id="@+id/checkbox_enable"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,55 +0,0 @@
 | 
				
			|||||||
<?xml version="1.0" encoding="utf-8"?>
 | 
					 | 
				
			||||||
<HorizontalScrollView
 | 
					 | 
				
			||||||
    xmlns:android="http://schemas.android.com/apk/res/android"
 | 
					 | 
				
			||||||
    xmlns:app="http://schemas.android.com/apk/res-auto"
 | 
					 | 
				
			||||||
	android:layout_width="match_parent"
 | 
					 | 
				
			||||||
    android:layout_height="wrap_content"
 | 
					 | 
				
			||||||
    android:scrollbars="none"
 | 
					 | 
				
			||||||
    android:id="@+id/scrollView">
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    <LinearLayout
 | 
					 | 
				
			||||||
        android:layout_width="wrap_content"
 | 
					 | 
				
			||||||
        android:layout_height="wrap_content"
 | 
					 | 
				
			||||||
        android:orientation="horizontal">
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        <!-- 内容区域 -->
 | 
					 | 
				
			||||||
        <LinearLayout
 | 
					 | 
				
			||||||
            android:id="@+id/content_layout"
 | 
					 | 
				
			||||||
            android:layout_width="match_parent"
 | 
					 | 
				
			||||||
            android:layout_height="wrap_content"
 | 
					 | 
				
			||||||
            android:padding="16dp"
 | 
					 | 
				
			||||||
            android:background="@color/white">
 | 
					 | 
				
			||||||
            <!-- 这里放置你的列表项内容 -->
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            <TextView
 | 
					 | 
				
			||||||
                android:id="@+id/text_view"
 | 
					 | 
				
			||||||
                android:layout_width="0dp"
 | 
					 | 
				
			||||||
                android:layout_height="wrap_content"
 | 
					 | 
				
			||||||
                android:layout_weight="1"
 | 
					 | 
				
			||||||
                android:textSize="16sp"/>
 | 
					 | 
				
			||||||
        </LinearLayout>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        <!-- 操作按钮 -->
 | 
					 | 
				
			||||||
        <LinearLayout
 | 
					 | 
				
			||||||
            android:id="@+id/action_layout"
 | 
					 | 
				
			||||||
            android:layout_width="wrap_content"
 | 
					 | 
				
			||||||
            android:layout_height="match_parent"
 | 
					 | 
				
			||||||
            android:orientation="horizontal"
 | 
					 | 
				
			||||||
            android:background="@color/lightgray">
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            <Button
 | 
					 | 
				
			||||||
                android:id="@+id/edit_btn"
 | 
					 | 
				
			||||||
                android:layout_width="80dp"
 | 
					 | 
				
			||||||
                android:layout_height="match_parent"
 | 
					 | 
				
			||||||
                android:text="编辑"
 | 
					 | 
				
			||||||
                android:background="@color/blue" />
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            <Button
 | 
					 | 
				
			||||||
                android:id="@+id/delete_btn"
 | 
					 | 
				
			||||||
                android:layout_width="80dp"
 | 
					 | 
				
			||||||
                android:layout_height="match_parent"
 | 
					 | 
				
			||||||
                android:text="删除"
 | 
					 | 
				
			||||||
                android:background="@color/red" />
 | 
					 | 
				
			||||||
        </LinearLayout>
 | 
					 | 
				
			||||||
    </LinearLayout>
 | 
					 | 
				
			||||||
</HorizontalScrollView>
 | 
					 | 
				
			||||||
@@ -0,0 +1,35 @@
 | 
				
			|||||||
 | 
					<?xml version="1.0" encoding="utf-8"?>
 | 
				
			||||||
 | 
					<LinearLayout
 | 
				
			||||||
 | 
						xmlns:android="http://schemas.android.com/apk/res/android"
 | 
				
			||||||
 | 
						xmlns:app="http://schemas.android.com/apk/res-auto"
 | 
				
			||||||
 | 
						android:orientation="horizontal"
 | 
				
			||||||
 | 
						android:layout_width="match_parent"
 | 
				
			||||||
 | 
						android:layout_height="wrap_content"
 | 
				
			||||||
 | 
						android:layout_gravity="center_vertical"
 | 
				
			||||||
 | 
						android:gravity="center_vertical">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						<TextView
 | 
				
			||||||
 | 
							android:layout_width="wrap_content"
 | 
				
			||||||
 | 
							android:layout_height="wrap_content"
 | 
				
			||||||
 | 
							android:text="Text"
 | 
				
			||||||
 | 
							android:layout_weight="1.0"
 | 
				
			||||||
 | 
							android:id="@+id/ruletext_tv"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						<CheckBox
 | 
				
			||||||
 | 
							android:id="@+id/checkbox_allow"
 | 
				
			||||||
 | 
							android:layout_width="wrap_content"
 | 
				
			||||||
 | 
							android:layout_height="wrap_content"
 | 
				
			||||||
 | 
							android:text="连接"
 | 
				
			||||||
 | 
							android:clickable="false"
 | 
				
			||||||
 | 
							android:focusable="false"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						<CheckBox
 | 
				
			||||||
 | 
							android:id="@+id/checkbox_enable"
 | 
				
			||||||
 | 
							android:layout_width="wrap_content"
 | 
				
			||||||
 | 
							android:layout_height="wrap_content"
 | 
				
			||||||
 | 
							android:text="启用"
 | 
				
			||||||
 | 
							android:clickable="false"
 | 
				
			||||||
 | 
							android:focusable="false"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					</LinearLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -0,0 +1,9 @@
 | 
				
			|||||||
 | 
					<?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:id="@+id/item_calllog_phonenumber_copy"
 | 
				
			||||||
 | 
					        android:title="Copy"/>
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					</menu>
 | 
				
			||||||
@@ -0,0 +1,9 @@
 | 
				
			|||||||
 | 
					<?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:id="@+id/item_contact_phonenumber_copy"
 | 
				
			||||||
 | 
					        android:title="Copy"/>
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					</menu>
 | 
				
			||||||
@@ -2,6 +2,6 @@
 | 
				
			|||||||
<resources>
 | 
					<resources>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <string name="app_name">Contacts</string>
 | 
					    <string name="app_name">Contacts</string>
 | 
				
			||||||
    <string name="default_bobulltoon_url">http://10.8.0.12:3000/Studio/BoBullToon/archive/main.zip</string>
 | 
					    <string name="default_bobulltoon_url">https://gitea.winboll.cc/Studio/BoBullToon/archive/main.zip</string>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
</resources>
 | 
					</resources>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -21,8 +21,8 @@ android {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
dependencies {
 | 
					dependencies {
 | 
				
			||||||
    api fileTree(dir: 'libs', include: ['*.jar'])
 | 
					    api fileTree(dir: 'libs', include: ['*.jar'])
 | 
				
			||||||
    api 'cc.winboll.studio:libapputils:15.8.2'
 | 
					    api 'cc.winboll.studio:libapputils:15.8.4'
 | 
				
			||||||
    api 'cc.winboll.studio:libappbase:15.8.2'
 | 
					    api 'cc.winboll.studio:libappbase:15.8.4'
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    // 吐司类库
 | 
					    // 吐司类库
 | 
				
			||||||
    api 'com.github.getActivity:ToastUtils:10.5'
 | 
					    api 'com.github.getActivity:ToastUtils:10.5'
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,8 +1,8 @@
 | 
				
			|||||||
#Created by .winboll/winboll_app_build.gradle
 | 
					#Created by .winboll/winboll_app_build.gradle
 | 
				
			||||||
#Thu Jun 19 20:42:26 HKT 2025
 | 
					#Sat Jun 28 12:59:30 HKT 2025
 | 
				
			||||||
stageCount=2
 | 
					stageCount=3
 | 
				
			||||||
libraryProject=libaes
 | 
					libraryProject=libaes
 | 
				
			||||||
baseVersion=15.9
 | 
					baseVersion=15.9
 | 
				
			||||||
publishVersion=15.9.1
 | 
					publishVersion=15.9.2
 | 
				
			||||||
buildCount=0
 | 
					buildCount=0
 | 
				
			||||||
baseBetaVersion=15.9.2
 | 
					baseBetaVersion=15.9.3
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -107,7 +107,7 @@ public class AboutView extends LinearLayout {
 | 
				
			|||||||
        mszAppDescription = mAPPInfo.getAppDescription();
 | 
					        mszAppDescription = mAPPInfo.getAppDescription();
 | 
				
			||||||
        mnAppIcon = mAPPInfo.getAppIcon();
 | 
					        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 {
 | 
					        try {
 | 
				
			||||||
            mszAppVersionName = mContext.getPackageManager().getPackageInfo(mContext.getPackageName(), 0).versionName;
 | 
					            mszAppVersionName = mContext.getPackageManager().getPackageInfo(mContext.getPackageName(), 0).versionName;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,8 +1,8 @@
 | 
				
			|||||||
#Created by .winboll/winboll_app_build.gradle
 | 
					#Created by .winboll/winboll_app_build.gradle
 | 
				
			||||||
#Mon Jun 09 09:38:19 HKT 2025
 | 
					#Thu Jul 17 11:39:14 HKT 2025
 | 
				
			||||||
stageCount=9
 | 
					stageCount=2
 | 
				
			||||||
libraryProject=libappbase
 | 
					libraryProject=libappbase
 | 
				
			||||||
baseVersion=15.8
 | 
					baseVersion=15.9
 | 
				
			||||||
publishVersion=15.8.8
 | 
					publishVersion=15.9.1
 | 
				
			||||||
buildCount=0
 | 
					buildCount=0
 | 
				
			||||||
baseBetaVersion=15.8.9
 | 
					baseBetaVersion=15.9.2
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,8 +1,8 @@
 | 
				
			|||||||
#Created by .winboll/winboll_app_build.gradle
 | 
					#Created by .winboll/winboll_app_build.gradle
 | 
				
			||||||
#Sun Jun 08 21:21:11 HKT 2025
 | 
					#Thu Jul 24 10:16:27 HKT 2025
 | 
				
			||||||
stageCount=1
 | 
					stageCount=2
 | 
				
			||||||
libraryProject=
 | 
					libraryProject=
 | 
				
			||||||
baseVersion=15.1
 | 
					baseVersion=15.1
 | 
				
			||||||
publishVersion=15.1.0
 | 
					publishVersion=15.1.1
 | 
				
			||||||
buildCount=0
 | 
					buildCount=0
 | 
				
			||||||
baseBetaVersion=15.1.1
 | 
					baseBetaVersion=15.1.2
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,6 +3,11 @@
 | 
				
			|||||||
    xmlns:android="http://schemas.android.com/apk/res/android"
 | 
					    xmlns:android="http://schemas.android.com/apk/res/android"
 | 
				
			||||||
    package="cc.winboll.studio.numtable">
 | 
					    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
 | 
					    <application
 | 
				
			||||||
        android:allowBackup="true"
 | 
					        android:allowBackup="true"
 | 
				
			||||||
        android:icon="@drawable/ic_launcher"
 | 
					        android:icon="@drawable/ic_launcher"
 | 
				
			||||||
@@ -29,9 +34,7 @@
 | 
				
			|||||||
        <meta-data
 | 
					        <meta-data
 | 
				
			||||||
            android:name="android.max_aspect"
 | 
					            android:name="android.max_aspect"
 | 
				
			||||||
            android:value="4.0"/>
 | 
					            android:value="4.0"/>
 | 
				
			||||||
 | 
							
 | 
				
			||||||
        <activity android:name=".GlobalApplication$CrashActivity"/>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    </application>
 | 
					    </application>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
</manifest>
 | 
					</manifest>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,10 +1,20 @@
 | 
				
			|||||||
package cc.winboll.studio.numtable;
 | 
					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.os.Bundle;
 | 
				
			||||||
 | 
					import android.view.View;
 | 
				
			||||||
 | 
					import android.widget.Button;
 | 
				
			||||||
 | 
					import android.widget.RadioButton;
 | 
				
			||||||
import androidx.appcompat.app.AppCompatActivity;
 | 
					import androidx.appcompat.app.AppCompatActivity;
 | 
				
			||||||
import androidx.appcompat.widget.Toolbar;
 | 
					import androidx.appcompat.widget.Toolbar;
 | 
				
			||||||
import cc.winboll.studio.libappbase.LogView;
 | 
					import cc.winboll.studio.libappbase.LogView;
 | 
				
			||||||
 | 
					import cc.winboll.studio.numtable.R;
 | 
				
			||||||
import com.hjq.toast.ToastUtils;
 | 
					import com.hjq.toast.ToastUtils;
 | 
				
			||||||
 | 
					import java.util.UUID;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public class MainActivity extends AppCompatActivity {
 | 
					public class MainActivity extends AppCompatActivity {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -19,10 +29,99 @@ public class MainActivity extends AppCompatActivity {
 | 
				
			|||||||
		setSupportActionBar(toolbar);
 | 
							setSupportActionBar(toolbar);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        mLogView = findViewById(R.id.logview);
 | 
					        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
 | 
					    @Override
 | 
				
			||||||
    protected void onResume() {
 | 
					    protected void onResume() {
 | 
				
			||||||
        super.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:orientation="vertical"
 | 
				
			||||||
		android:layout_width="match_parent"
 | 
							android:layout_width="match_parent"
 | 
				
			||||||
		android:layout_height="0dp"
 | 
							android:layout_height="0dp"
 | 
				
			||||||
		android:layout_weight="1.0"
 | 
							android:layout_weight="1.0">
 | 
				
			||||||
		android:gravity="center_vertical|center_horizontal">
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
		<TextView
 | 
							<LinearLayout
 | 
				
			||||||
			android:layout_width="wrap_content"
 | 
								android:orientation="horizontal"
 | 
				
			||||||
 | 
								android:layout_width="match_parent"
 | 
				
			||||||
			android:layout_height="wrap_content"
 | 
								android:layout_height="wrap_content"
 | 
				
			||||||
			android:text="NumTable"
 | 
								android:gravity="right|center_vertical"
 | 
				
			||||||
			android:textAppearance="?android:attr/textAppearanceLarge"/>
 | 
								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>
 | 
						</LinearLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user