Compare commits
	
		
			51 Commits
		
	
	
		
			powerbell-
			...
			3e7722e2c0
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					3e7722e2c0 | ||
| 
						 | 
					a1707e73b5 | ||
| 
						 | 
					9dcbaa0d75 | ||
| 
						 | 
					23920a7ff1 | ||
| 
						 | 
					17c373c490 | ||
| 
						 | 
					5f7c94b349 | ||
| 
						 | 
					c2b739d345 | ||
| 
						 | 
					67a05cd457 | ||
| 
						 | 
					554ab758bf | ||
| 
						 | 
					20e118cd34 | ||
| 
						 | 
					f370ae8ffb | ||
| 
						 | 
					c92c874ea1 | ||
| 
						 | 
					90a6116c0a | ||
| 
						 | 
					45208ecbb1 | ||
| 
						 | 
					c28d655fe3 | ||
| 
						 | 
					4b5905f74e | ||
| 
						 | 
					6bd01780ec | ||
| 
						 | 
					a6699262f8 | ||
| 
						 | 
					ea2d38defc | ||
| 
						 | 
					e430b7abe4 | ||
| 
						 | 
					945eadb617 | ||
| 
						 | 
					c5bffc5eef | ||
| 
						 | 
					88597fe407 | ||
| 
						 | 
					53f985533a | ||
| 
						 | 
					a3950f13ad | ||
| 
						 | 
					c878e9dc02 | ||
| 
						 | 
					f2f7cab330 | ||
| 
						 | 
					6c8b0dcfa5 | ||
| 
						 | 
					7de8a4f084 | ||
| 
						 | 
					219c6614be | ||
| 
						 | 
					0f5bb020b9 | ||
| 
						 | 
					7794ff80ec | ||
| 
						 | 
					7463ad3352 | ||
| 
						 | 
					753032efed | ||
| 
						 | 
					2b4c43c9af | ||
| 
						 | 
					711c98d556 | ||
| 
						 | 
					202205588a | ||
| 
						 | 
					42c4978b44 | ||
| 
						 | 
					1a2b7b862d | ||
| 
						 | 
					eb253b374f | ||
| 
						 | 
					c4e88e9593 | ||
| 
						 | 
					08d9d92ae4 | ||
| 
						 | 
					74841c08dc | ||
| 
						 | 
					945bacb825 | ||
| 
						 | 
					0e464495fd | ||
| 
						 | 
					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
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,8 +1,8 @@
 | 
				
			|||||||
#Created by .winboll/winboll_app_build.gradle
 | 
					#Created by .winboll/winboll_app_build.gradle
 | 
				
			||||||
#Sun May 04 05:32:00 GMT 2025
 | 
					#Tue Jun 24 09:54:47 HKT 2025
 | 
				
			||||||
stageCount=1
 | 
					stageCount=3
 | 
				
			||||||
libraryProject=
 | 
					libraryProject=
 | 
				
			||||||
baseVersion=15.2
 | 
					baseVersion=15.2
 | 
				
			||||||
publishVersion=15.2.0
 | 
					publishVersion=15.2.2
 | 
				
			||||||
buildCount=74
 | 
					buildCount=0
 | 
				
			||||||
baseBetaVersion=15.2.1
 | 
					baseBetaVersion=15.2.3
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -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>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -42,23 +42,24 @@ android {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    compileOptions {
 | 
					    /*compileOptions {
 | 
				
			||||||
        sourceCompatibility JavaVersion.VERSION_11
 | 
					        sourceCompatibility JavaVersion.VERSION_11
 | 
				
			||||||
        targetCompatibility JavaVersion.VERSION_11
 | 
					        targetCompatibility JavaVersion.VERSION_11
 | 
				
			||||||
    }
 | 
					    }*/
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
dependencies {
 | 
					dependencies {
 | 
				
			||||||
 | 
					    api fileTree(dir: 'libs', include: ['*.jar'])
 | 
				
			||||||
 | 
						api project(':libjc')
 | 
				
			||||||
 | 
						api 'cc.winboll.studio:libaes:15.9.1'
 | 
				
			||||||
 | 
						api 'cc.winboll.studio:libapputils:15.8.4'
 | 
				
			||||||
 | 
						api 'cc.winboll.studio:libappbase:15.8.4'
 | 
				
			||||||
 | 
						
 | 
				
			||||||
    // https://mvnrepository.com/artifact/org.bouncycastle/bcprov-jdk15on
 | 
					    // https://mvnrepository.com/artifact/org.bouncycastle/bcprov-jdk15on
 | 
				
			||||||
    //implementation 'org.bouncycastle:bcprov-jdk15on:1.70'
 | 
					    //implementation 'org.bouncycastle:bcprov-jdk15on:1.70'
 | 
				
			||||||
    implementation 'org.bouncycastle:bcprov-jdk15to18:1.69'
 | 
					    implementation 'org.bouncycastle:bcprov-jdk15to18:1.69'
 | 
				
			||||||
    implementation 'org.bouncycastle:bcpkix-jdk15to18:1.69'
 | 
					    implementation 'org.bouncycastle:bcpkix-jdk15to18:1.69'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	api project(':libjc')
 | 
					 | 
				
			||||||
    api 'androidx.appcompat:appcompat:1.0.0'
 | 
					    api 'androidx.appcompat:appcompat:1.0.0'
 | 
				
			||||||
	api 'com.google.android.material:material:1.0.0'
 | 
						api 'com.google.android.material:material:1.0.0'
 | 
				
			||||||
    
 | 
					 | 
				
			||||||
    api 'cc.winboll.studio:libapputils:9.1.0'
 | 
					 | 
				
			||||||
    api 'cc.winboll.studio:libappbase:1.0.3'
 | 
					 | 
				
			||||||
    api fileTree(dir: 'libs', include: ['*.jar'])
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,8 +1,8 @@
 | 
				
			|||||||
#Created by .winboll/winboll_app_build.gradle
 | 
					#Created by .winboll/winboll_app_build.gradle
 | 
				
			||||||
#Fri Jan 10 22:03:57 GMT 2025
 | 
					#Tue Jun 24 11:17:30 GMT 2025
 | 
				
			||||||
stageCount=0
 | 
					stageCount=0
 | 
				
			||||||
libraryProject=libjc
 | 
					libraryProject=libjc
 | 
				
			||||||
baseVersion=1.0
 | 
					baseVersion=1.0
 | 
				
			||||||
publishVersion=1.0.0
 | 
					publishVersion=1.0.0
 | 
				
			||||||
buildCount=133
 | 
					buildCount=135
 | 
				
			||||||
baseBetaVersion=1.0.1
 | 
					baseBetaVersion=1.0.1
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -15,10 +15,10 @@ import android.widget.LinearLayout;
 | 
				
			|||||||
import android.widget.ScrollView;
 | 
					import android.widget.ScrollView;
 | 
				
			||||||
import android.widget.TextView;
 | 
					import android.widget.TextView;
 | 
				
			||||||
import cc.winboll.studio.jc.R;
 | 
					import cc.winboll.studio.jc.R;
 | 
				
			||||||
import cc.winboll.studio.libapputils.log.LogUtils;
 | 
					 | 
				
			||||||
import cc.winboll.studio.libjc.JAR_RUNNING_MODE;
 | 
					 | 
				
			||||||
import cc.winboll.studio.libjc.JCMainThread;
 | 
					import cc.winboll.studio.libjc.JCMainThread;
 | 
				
			||||||
import cc.winboll.studio.libjc.net.JCSocketClient;
 | 
					import cc.winboll.studio.libjc.net.JCSocketClient;
 | 
				
			||||||
 | 
					import cc.winboll.studio.libjc.util.LogUtils;
 | 
				
			||||||
 | 
					import cc.winboll.studio.libjc.Main;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
final public class MainActivity extends Activity implements JCMainThread.OnMessageListener {
 | 
					final public class MainActivity extends Activity implements JCMainThread.OnMessageListener {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -77,7 +77,7 @@ final public class MainActivity extends Activity implements JCMainThread.OnMessa
 | 
				
			|||||||
        // 启动主线程
 | 
					        // 启动主线程
 | 
				
			||||||
        _JCMainThread = JCMainThread.getInstance(getPackageName());
 | 
					        _JCMainThread = JCMainThread.getInstance(getPackageName());
 | 
				
			||||||
        _JCMainThread.setOnLogListener(this);
 | 
					        _JCMainThread.setOnLogListener(this);
 | 
				
			||||||
        _JCMainThread.setRunningMode(JAR_RUNNING_MODE.JC);
 | 
					        //_JCMainThread.setRunningMode(Main.JAR_RUNNING_MODE.JC);
 | 
				
			||||||
        _JCMainThread.start();
 | 
					        _JCMainThread.start();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // 设置 WinBoll 应用 UI 类型
 | 
					        // 设置 WinBoll 应用 UI 类型
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -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
 | 
				
			||||||
#Fri Jan 10 22:03:57 GMT 2025
 | 
					#Tue Jun 24 11:17:30 GMT 2025
 | 
				
			||||||
stageCount=0
 | 
					stageCount=0
 | 
				
			||||||
libraryProject=libjc
 | 
					libraryProject=libjc
 | 
				
			||||||
baseVersion=1.0
 | 
					baseVersion=1.0
 | 
				
			||||||
publishVersion=1.0.0
 | 
					publishVersion=1.0.0
 | 
				
			||||||
buildCount=133
 | 
					buildCount=135
 | 
				
			||||||
baseBetaVersion=1.0.1
 | 
					baseBetaVersion=1.0.1
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -21,7 +21,7 @@ public class Main {
 | 
				
			|||||||
    public final static int JAR_RUNNING_MODE_JCNDK_DEBUG = 4;
 | 
					    public final static int JAR_RUNNING_MODE_JCNDK_DEBUG = 4;
 | 
				
			||||||
    public final static int JAR_RUNNING_MODE_JC = 5;
 | 
					    public final static int JAR_RUNNING_MODE_JC = 5;
 | 
				
			||||||
    public final static int JAR_RUNNING_MODE_JC_DEBUG = 6;
 | 
					    public final static int JAR_RUNNING_MODE_JC_DEBUG = 6;
 | 
				
			||||||
    public enum JAR_RUNNING_MODE {
 | 
					    public static enum JAR_RUNNING_MODE {
 | 
				
			||||||
        UNKNOWN(JAR_RUNNING_MODE_UNKNOWN),
 | 
					        UNKNOWN(JAR_RUNNING_MODE_UNKNOWN),
 | 
				
			||||||
        CONSOLE(JAR_RUNNING_MODE_CONSOLE),
 | 
					        CONSOLE(JAR_RUNNING_MODE_CONSOLE),
 | 
				
			||||||
        CONSOLE_DEBUG(JAR_RUNNING_MODE_CONSOLE_DEBUG),
 | 
					        CONSOLE_DEBUG(JAR_RUNNING_MODE_CONSOLE_DEBUG),
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -29,7 +29,7 @@ android {
 | 
				
			|||||||
        // versionName 更新后需要手动设置 
 | 
					        // versionName 更新后需要手动设置 
 | 
				
			||||||
        // .winboll/winbollBuildProps.properties 文件的 stageCount=0
 | 
					        // .winboll/winbollBuildProps.properties 文件的 stageCount=0
 | 
				
			||||||
        // Gradle编译环境下合起来的 versionName 就是 "${versionName}.0"
 | 
					        // Gradle编译环境下合起来的 versionName 就是 "${versionName}.0"
 | 
				
			||||||
        versionName "15.2" 
 | 
					        versionName "15.3" 
 | 
				
			||||||
        if(true) {
 | 
					        if(true) {
 | 
				
			||||||
            versionName = genVersionName("${versionName}")
 | 
					            versionName = genVersionName("${versionName}")
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
@@ -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'
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
	api 'io.github.medyo:android-about-page:2.0.0'
 | 
						api 'io.github.medyo:android-about-page:2.0.0'
 | 
				
			||||||
    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
 | 
				
			||||||
#Tue May 20 20:39:06 HKT 2025
 | 
					#Thu Jul 03 13:50:15 HKT 2025
 | 
				
			||||||
stageCount=6
 | 
					stageCount=2
 | 
				
			||||||
libraryProject=
 | 
					libraryProject=
 | 
				
			||||||
baseVersion=15.2
 | 
					baseVersion=15.3
 | 
				
			||||||
publishVersion=15.2.5
 | 
					publishVersion=15.3.1
 | 
				
			||||||
buildCount=0
 | 
					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.App;
 | 
				
			||||||
import cc.winboll.studio.mymessagemanager.R;
 | 
					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";
 | 
					    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.setAppName(getString(R.string.app_name));
 | 
				
			||||||
        appInfo.setAppIcon(cc.winboll.studio.libaes.R.drawable.ic_winboll);
 | 
					        appInfo.setAppIcon(cc.winboll.studio.libaes.R.drawable.ic_winboll);
 | 
				
			||||||
        appInfo.setAppDescription(getString(R.string.app_description));
 | 
					        appInfo.setAppDescription(getString(R.string.app_description));
 | 
				
			||||||
        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=MyMessageManager");
 | 
					        appInfo.setAppHomePage("https://discuz.winboll.cc/forum.php?mod=viewthread&tid=5&extra=page%3D1");
 | 
				
			||||||
        appInfo.setAppAPKName("MyMessageManager");
 | 
					        appInfo.setAppAPKName("MyMessageManager");
 | 
				
			||||||
        appInfo.setAppAPKFolderName("MyMessageManager");
 | 
					        appInfo.setAppAPKFolderName("MyMessageManager");
 | 
				
			||||||
        return new AboutView(mContext, appInfo);
 | 
					        return new AboutView(mContext, appInfo);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -103,6 +103,9 @@ abstract public class BaseActivity extends AppCompatActivity {
 | 
				
			|||||||
        } else if (R.id.item_defaulttheme == item.getItemId()) {
 | 
					        } else if (R.id.item_defaulttheme == item.getItemId()) {
 | 
				
			||||||
            AESThemeUtil.saveThemeStyleID(this, R.style.MyAppTheme);
 | 
					            AESThemeUtil.saveThemeStyleID(this, R.style.MyAppTheme);
 | 
				
			||||||
            recreate();
 | 
					            recreate();
 | 
				
			||||||
 | 
					        } else if (R.id.item_defaulttheme == item.getItemId()) {
 | 
				
			||||||
 | 
					            AESThemeUtil.saveThemeStyleID(this, R.style.MyAppTheme);
 | 
				
			||||||
 | 
					            recreate();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        //ToastUtils.show("nThemeStyleID " + Integer.toString(nThemeStyleID));
 | 
					        //ToastUtils.show("nThemeStyleID " + Integer.toString(nThemeStyleID));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -128,7 +128,7 @@ public class MainActivity extends BaseActivity {
 | 
				
			|||||||
        mToolbar = findViewById(R.id.activitymainASupportToolbar1);
 | 
					        mToolbar = findViewById(R.id.activitymainASupportToolbar1);
 | 
				
			||||||
        mToolbar.setSubtitle(getString(R.string.activity_name_main));
 | 
					        mToolbar.setSubtitle(getString(R.string.activity_name_main));
 | 
				
			||||||
        setSupportActionBar(mToolbar);
 | 
					        setSupportActionBar(mToolbar);
 | 
				
			||||||
        
 | 
					
 | 
				
			||||||
        boolean isEnableService = mAppConfigUtil.mAppConfigBean.isEnableService();
 | 
					        boolean isEnableService = mAppConfigUtil.mAppConfigBean.isEnableService();
 | 
				
			||||||
        msvEnableService = findViewById(R.id.activitymainSwitchView1);
 | 
					        msvEnableService = findViewById(R.id.activitymainSwitchView1);
 | 
				
			||||||
        msvEnableService.setChecked(isEnableService);
 | 
					        msvEnableService.setChecked(isEnableService);
 | 
				
			||||||
@@ -269,17 +269,9 @@ public class MainActivity extends BaseActivity {
 | 
				
			|||||||
    public boolean onCreateOptionsMenu(Menu menu) {
 | 
					    public boolean onCreateOptionsMenu(Menu menu) {
 | 
				
			||||||
        //return super.onCreateOptionsMenu(menu);
 | 
					        //return super.onCreateOptionsMenu(menu);
 | 
				
			||||||
        getMenuInflater().inflate(R.menu.toolbar_main, menu);
 | 
					        getMenuInflater().inflate(R.menu.toolbar_main, menu);
 | 
				
			||||||
 | 
					        super.onCreateOptionsMenu(menu);
 | 
				
			||||||
        /*ThemeUtil.BaseTheme baseTheme = ThemeUtil.getTheme(mAppConfigUtil.mAppConfigBean.getAppThemeID());
 | 
							getMenuInflater().inflate(R.menu.toolbar_main2, menu);
 | 
				
			||||||
        if (baseTheme == ThemeUtil.BaseTheme.DEFAULT) {
 | 
							return true;
 | 
				
			||||||
            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);
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public static void reloadSMS() {
 | 
					    public static void reloadSMS() {
 | 
				
			||||||
@@ -306,7 +298,7 @@ public class MainActivity extends BaseActivity {
 | 
				
			|||||||
            i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
 | 
					            i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
 | 
				
			||||||
            startActivity(i);
 | 
					            startActivity(i);
 | 
				
			||||||
		} else if (nItemId ==  R.id.app_log) {
 | 
							} else if (nItemId ==  R.id.app_log) {
 | 
				
			||||||
            //App.getWinBoLLActivityManager().startLogActivity(this);
 | 
					            App.getWinBoLLActivityManager().startLogActivity(this);
 | 
				
			||||||
        } else if (nItemId ==  R.id.app_unittest) {
 | 
					        } else if (nItemId ==  R.id.app_unittest) {
 | 
				
			||||||
            Intent i = new Intent(MainActivity.this, UnitTestActivity.class);
 | 
					            Intent i = new Intent(MainActivity.this, UnitTestActivity.class);
 | 
				
			||||||
            i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
 | 
					            i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
 | 
				
			||||||
@@ -324,7 +316,7 @@ public class MainActivity extends BaseActivity {
 | 
				
			|||||||
            i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
 | 
					            i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
 | 
				
			||||||
            startActivity(i);
 | 
					            startActivity(i);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        
 | 
					
 | 
				
			||||||
        return super.onOptionsItemSelected(item);
 | 
					        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.libaes.utils.AESThemeUtil;
 | 
				
			||||||
import cc.winboll.studio.libappbase.winboll.IWinBoLLActivity;
 | 
					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;
 | 
					    protected volatile AESThemeBean.ThemeType mThemeType;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -34,7 +34,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	</ScrollView>
 | 
						</ScrollView>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	<cc.winboll.studio.shared.log.LogView
 | 
						<cc.winboll.studio.libappbase.LogView
 | 
				
			||||||
		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"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -17,26 +17,4 @@
 | 
				
			|||||||
    <item
 | 
					    <item
 | 
				
			||||||
        android:id="@+id/app_smsrule"
 | 
					        android:id="@+id/app_smsrule"
 | 
				
			||||||
        android:title="@string/text_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>
 | 
					</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
 | 
					#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>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -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.9.2'
 | 
					    api 'cc.winboll.studio:libaes:15.6.0'
 | 
				
			||||||
    api 'cc.winboll.studio:libapputils:15.8.4'
 | 
					    api 'cc.winboll.studio:libapputils:15.3.4'
 | 
				
			||||||
    api 'cc.winboll.studio:libappbase:15.8.4'
 | 
					    api 'cc.winboll.studio:libappbase:15.7.6'
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    // 吐司提示库
 | 
					    // 吐司提示库
 | 
				
			||||||
    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
 | 
				
			||||||
#Sun Jul 06 12:53:58 HKT 2025
 | 
					#Thu May 29 09:43:37 HKT 2025
 | 
				
			||||||
stageCount=9
 | 
					stageCount=2
 | 
				
			||||||
libraryProject=
 | 
					libraryProject=
 | 
				
			||||||
baseVersion=15.4
 | 
					baseVersion=15.4
 | 
				
			||||||
publishVersion=15.4.8
 | 
					publishVersion=15.4.1
 | 
				
			||||||
buildCount=0
 | 
					buildCount=0
 | 
				
			||||||
baseBetaVersion=15.4.9
 | 
					baseBetaVersion=15.4.2
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -121,8 +121,6 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        <activity android:name="cc.winboll.studio.powerbell.activities.AboutActivity"/>
 | 
					        <activity android:name="cc.winboll.studio.powerbell.activities.AboutActivity"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        <activity android:name="cc.winboll.studio.powerbell.activities.PixelPickerActivity"/>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    </application>
 | 
					    </application>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
</manifest>
 | 
					</manifest>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,6 @@
 | 
				
			|||||||
package cc.winboll.studio.powerbell;
 | 
					package cc.winboll.studio.powerbell;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import android.content.Context;
 | 
					import android.content.Context;
 | 
				
			||||||
import android.os.Environment;
 | 
					 | 
				
			||||||
import android.view.Gravity;
 | 
					import android.view.Gravity;
 | 
				
			||||||
import cc.winboll.studio.libappbase.GlobalApplication;
 | 
					import cc.winboll.studio.libappbase.GlobalApplication;
 | 
				
			||||||
import cc.winboll.studio.powerbell.receivers.GlobalApplicationReceiver;
 | 
					import cc.winboll.studio.powerbell.receivers.GlobalApplicationReceiver;
 | 
				
			||||||
@@ -19,7 +18,7 @@ public class App extends GlobalApplication {
 | 
				
			|||||||
    static AppCacheUtils _mAppCacheUtils;
 | 
					    static AppCacheUtils _mAppCacheUtils;
 | 
				
			||||||
    GlobalApplicationReceiver mReceiver;
 | 
					    GlobalApplicationReceiver mReceiver;
 | 
				
			||||||
    static String szTempDir = "";
 | 
					    static String szTempDir = "";
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
    public static String getTempDirPath() {
 | 
					    public static String getTempDirPath() {
 | 
				
			||||||
        return szTempDir;
 | 
					        return szTempDir;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@@ -27,24 +26,15 @@ public class App extends GlobalApplication {
 | 
				
			|||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
    public void onCreate() {
 | 
					    public void onCreate() {
 | 
				
			||||||
        super.onCreate();
 | 
					        super.onCreate();
 | 
				
			||||||
 | 
					 | 
				
			||||||
        // 临时文件夹方案1
 | 
					 | 
				
			||||||
        // 获取Pictures文件夹路径(Android 10及以上推荐使用MediaStore,此处为传统方式)
 | 
					 | 
				
			||||||
        File picturesDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);
 | 
					 | 
				
			||||||
        // 定义目标文件路径(在Pictures目录下创建"PowerBell"子文件夹及文件)
 | 
					 | 
				
			||||||
        File powerBellDir = new File(picturesDir, "PowerBell");
 | 
					 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        // 临时文件夹方案2 <图片保存失败>
 | 
					        // 初始化临时文件夹目录
 | 
				
			||||||
        // 获取Pictures文件夹路径(Android 10及以上推荐使用MediaStore,此处为传统方式)
 | 
					        File fTempDir = new File(getExternalCacheDir(), "TempDir");
 | 
				
			||||||
        //File powerBellDir = getExternalFilesDir("TempDir");
 | 
					        if(!fTempDir.exists()) {
 | 
				
			||||||
 | 
					            fTempDir.mkdirs();
 | 
				
			||||||
        // 先创建文件夹(如果不存在)
 | 
					 | 
				
			||||||
        if (!powerBellDir.exists()) {
 | 
					 | 
				
			||||||
            powerBellDir.mkdirs();
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        szTempDir = powerBellDir.getAbsolutePath();
 | 
					        szTempDir = fTempDir.getAbsolutePath();
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
        // 初始化 Toast 框架
 | 
					        // 初始化 Toast 框架
 | 
				
			||||||
        ToastUtils.init(this);
 | 
					        ToastUtils.init(this);
 | 
				
			||||||
        // 设置 Toast 布局样式
 | 
					        // 设置 Toast 布局样式
 | 
				
			||||||
@@ -55,7 +45,7 @@ public class App extends GlobalApplication {
 | 
				
			|||||||
        // 设置数据配置存储工具
 | 
					        // 设置数据配置存储工具
 | 
				
			||||||
        _mAppConfigUtils = getAppConfigUtils(this);
 | 
					        _mAppConfigUtils = getAppConfigUtils(this);
 | 
				
			||||||
        _mAppCacheUtils = getAppCacheUtils(this);
 | 
					        _mAppCacheUtils = getAppCacheUtils(this);
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
        mReceiver = new GlobalApplicationReceiver(this);
 | 
					        mReceiver = new GlobalApplicationReceiver(this);
 | 
				
			||||||
        mReceiver.registerAction();
 | 
					        mReceiver.registerAction();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -10,27 +10,23 @@ import android.os.Bundle;
 | 
				
			|||||||
import android.provider.MediaStore;
 | 
					import android.provider.MediaStore;
 | 
				
			||||||
import android.view.Menu;
 | 
					import android.view.Menu;
 | 
				
			||||||
import android.view.MenuItem;
 | 
					import android.view.MenuItem;
 | 
				
			||||||
import android.widget.RelativeLayout;
 | 
					 | 
				
			||||||
import android.widget.Toast;
 | 
					import android.widget.Toast;
 | 
				
			||||||
import cc.winboll.studio.libaes.views.AToolbar;
 | 
					import cc.winboll.studio.libaes.views.AToolbar;
 | 
				
			||||||
import cc.winboll.studio.libappbase.LogUtils;
 | 
					import cc.winboll.studio.libappbase.LogUtils;
 | 
				
			||||||
 | 
					import cc.winboll.studio.libappbase.LogView;
 | 
				
			||||||
import cc.winboll.studio.powerbell.MainActivity;
 | 
					import cc.winboll.studio.powerbell.MainActivity;
 | 
				
			||||||
import cc.winboll.studio.powerbell.activities.AboutActivity;
 | 
					import cc.winboll.studio.powerbell.activities.AboutActivity;
 | 
				
			||||||
import cc.winboll.studio.powerbell.activities.BackgroundPictureActivity;
 | 
					import cc.winboll.studio.powerbell.activities.BackgroundPictureActivity;
 | 
				
			||||||
import cc.winboll.studio.powerbell.activities.BatteryReporterActivity;
 | 
					import cc.winboll.studio.powerbell.activities.BatteryReporterActivity;
 | 
				
			||||||
import cc.winboll.studio.powerbell.activities.ClearRecordActivity;
 | 
					import cc.winboll.studio.powerbell.activities.ClearRecordActivity;
 | 
				
			||||||
import cc.winboll.studio.powerbell.activities.WinBoLLActivity;
 | 
					 | 
				
			||||||
import cc.winboll.studio.powerbell.beans.BackgroundPictureBean;
 | 
					 | 
				
			||||||
import cc.winboll.studio.powerbell.fragments.MainViewFragment;
 | 
					import cc.winboll.studio.powerbell.fragments.MainViewFragment;
 | 
				
			||||||
import cc.winboll.studio.powerbell.utils.BackgroundPictureUtils;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
public class MainActivity extends WinBoLLActivity {
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public class MainActivity extends Activity {
 | 
				
			||||||
    public static final String TAG = "MainActivity";
 | 
					    public static final String TAG = "MainActivity";
 | 
				
			||||||
    public static final int BACKGROUND_PICTURE_REQUEST_CODE = 0;
 | 
					    public static final int BACKGROUND_PICTURE_REQUEST_CODE = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public static MainActivity _mMainActivity;
 | 
					    public static MainActivity _mMainActivity;
 | 
				
			||||||
    //LogView mLogView;
 | 
					    LogView mLogView;
 | 
				
			||||||
    //ArrayList<Fragment> mlistFragment;
 | 
					    //ArrayList<Fragment> mlistFragment;
 | 
				
			||||||
    App mApplication;
 | 
					    App mApplication;
 | 
				
			||||||
    //AppConfigUtils mAppConfigUtils;
 | 
					    //AppConfigUtils mAppConfigUtils;
 | 
				
			||||||
@@ -39,16 +35,6 @@ public class MainActivity extends WinBoLLActivity {
 | 
				
			|||||||
    MainViewFragment mMainViewFragment;
 | 
					    MainViewFragment mMainViewFragment;
 | 
				
			||||||
    AToolbar mAToolbar;
 | 
					    AToolbar mAToolbar;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Override
 | 
					 | 
				
			||||||
    public Activity getActivity() {
 | 
					 | 
				
			||||||
        return this;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    @Override
 | 
					 | 
				
			||||||
    public String getTag() {
 | 
					 | 
				
			||||||
        return TAG;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
    protected void onCreate(Bundle savedInstanceState) {
 | 
					    protected void onCreate(Bundle savedInstanceState) {
 | 
				
			||||||
        //LogUtils.d(TAG, "onCreate(...)");
 | 
					        //LogUtils.d(TAG, "onCreate(...)");
 | 
				
			||||||
@@ -56,10 +42,10 @@ public class MainActivity extends WinBoLLActivity {
 | 
				
			|||||||
        setContentView(R.layout.activity_main);
 | 
					        setContentView(R.layout.activity_main);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // 设置调试日志
 | 
					        // 设置调试日志
 | 
				
			||||||
//        mLogView = findViewById(R.id.logview);
 | 
					        mLogView = findViewById(R.id.logview);
 | 
				
			||||||
//        mLogView.start();
 | 
					        mLogView.start();
 | 
				
			||||||
//        //LogUtils.d(TAG, "LogView Start.");
 | 
					        //LogUtils.d(TAG, "LogView Start.");
 | 
				
			||||||
//        mLogView.updateLogView();
 | 
					        mLogView.updateLogView();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        _mMainActivity = MainActivity.this;
 | 
					        _mMainActivity = MainActivity.this;
 | 
				
			||||||
        mApplication = (App) getApplication();
 | 
					        mApplication = (App) getApplication();
 | 
				
			||||||
@@ -131,8 +117,8 @@ public class MainActivity extends WinBoLLActivity {
 | 
				
			|||||||
        super.onResume();
 | 
					        super.onResume();
 | 
				
			||||||
        // 回到窗口自动取消提醒消息
 | 
					        // 回到窗口自动取消提醒消息
 | 
				
			||||||
        //NotificationHelper.cancelRemindNotification(this);
 | 
					        //NotificationHelper.cancelRemindNotification(this);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        reloadBackground();
 | 
					        reloadBackground();
 | 
				
			||||||
		setBackgroundColor();
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // Menu icons are inflated just as they were with actionbar
 | 
					    // Menu icons are inflated just as they were with actionbar
 | 
				
			||||||
@@ -171,8 +157,6 @@ public class MainActivity extends WinBoLLActivity {
 | 
				
			|||||||
            Intent intent = new Intent();
 | 
					            Intent intent = new Intent();
 | 
				
			||||||
            intent.setClass(this, BackgroundPictureActivity.class);
 | 
					            intent.setClass(this, BackgroundPictureActivity.class);
 | 
				
			||||||
            startActivity(intent);
 | 
					            startActivity(intent);
 | 
				
			||||||
        } else if (menuItemId == R.id.action_log) {
 | 
					 | 
				
			||||||
            App.getWinBoLLActivityManager().startLogActivity(this);
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return true;
 | 
					        return true;
 | 
				
			||||||
@@ -209,12 +193,4 @@ public class MainActivity extends WinBoLLActivity {
 | 
				
			|||||||
            moveTaskToBack(true);
 | 
					            moveTaskToBack(true);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					 | 
				
			||||||
	void setBackgroundColor() {
 | 
					 | 
				
			||||||
		BackgroundPictureUtils utils = BackgroundPictureUtils.getInstance(MainActivity.this);
 | 
					 | 
				
			||||||
		BackgroundPictureBean bean = utils.getBackgroundPictureBean();
 | 
					 | 
				
			||||||
		int nPixelColor = bean.getPixelColor();
 | 
					 | 
				
			||||||
		RelativeLayout mainLayout = findViewById(R.id.activitymainRelativeLayout1);
 | 
					 | 
				
			||||||
		mainLayout.setBackgroundColor(nPixelColor);
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
} 
 | 
					} 
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -53,11 +53,11 @@ public class AboutActivity extends Activity {
 | 
				
			|||||||
        appInfo.setAppName(getString(R.string.app_name));
 | 
					        appInfo.setAppName(getString(R.string.app_name));
 | 
				
			||||||
        appInfo.setAppIcon(R.drawable.ic_launcher);
 | 
					        appInfo.setAppIcon(R.drawable.ic_launcher);
 | 
				
			||||||
        appInfo.setAppDescription(getString(R.string.app_description));
 | 
					        appInfo.setAppDescription(getString(R.string.app_description));
 | 
				
			||||||
        appInfo.setAppGitName("APPBase");
 | 
					        appInfo.setAppGitName("APP");
 | 
				
			||||||
        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=1");
 | 
					        appInfo.setAppHomePage("https://www.winboll.cc/studio/details.php?app=PowerBell");
 | 
				
			||||||
        appInfo.setAppAPKName("PowerBell");
 | 
					        appInfo.setAppAPKName("PowerBell");
 | 
				
			||||||
        appInfo.setAppAPKFolderName("PowerBell");
 | 
					        appInfo.setAppAPKFolderName("PowerBell");
 | 
				
			||||||
        return new AboutView(mContext, appInfo);
 | 
					        return new AboutView(mContext, appInfo);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,27 +1,22 @@
 | 
				
			|||||||
package cc.winboll.studio.powerbell.activities;
 | 
					package cc.winboll.studio.powerbell.activities;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import android.Manifest;
 | 
					 | 
				
			||||||
import android.app.Activity;
 | 
					import android.app.Activity;
 | 
				
			||||||
import android.content.Context;
 | 
					import android.content.Context;
 | 
				
			||||||
import android.content.Intent;
 | 
					import android.content.Intent;
 | 
				
			||||||
import android.content.pm.PackageManager;
 | 
					 | 
				
			||||||
import android.graphics.Bitmap;
 | 
					import android.graphics.Bitmap;
 | 
				
			||||||
import android.graphics.BitmapFactory;
 | 
					 | 
				
			||||||
import android.graphics.drawable.Drawable;
 | 
					import android.graphics.drawable.Drawable;
 | 
				
			||||||
import android.net.Uri;
 | 
					import android.net.Uri;
 | 
				
			||||||
import android.os.Build;
 | 
					 | 
				
			||||||
import android.os.Bundle;
 | 
					import android.os.Bundle;
 | 
				
			||||||
import android.provider.MediaStore;
 | 
					import android.provider.MediaStore;
 | 
				
			||||||
import android.view.View;
 | 
					import android.view.View;
 | 
				
			||||||
import android.widget.ImageView;
 | 
					import android.widget.ImageView;
 | 
				
			||||||
import android.widget.RelativeLayout;
 | 
					import android.widget.Toast;
 | 
				
			||||||
import androidx.core.app.ActivityCompat;
 | 
					 | 
				
			||||||
import androidx.core.content.ContextCompat;
 | 
					 | 
				
			||||||
import cc.winboll.studio.libaes.views.AToolbar;
 | 
					import cc.winboll.studio.libaes.views.AToolbar;
 | 
				
			||||||
import cc.winboll.studio.libappbase.LogUtils;
 | 
					import cc.winboll.studio.libappbase.LogUtils;
 | 
				
			||||||
import cc.winboll.studio.libappbase.utils.ToastUtils;
 | 
					import cc.winboll.studio.libappbase.utils.ToastUtils;
 | 
				
			||||||
import cc.winboll.studio.powerbell.App;
 | 
					import cc.winboll.studio.powerbell.App;
 | 
				
			||||||
import cc.winboll.studio.powerbell.R;
 | 
					import cc.winboll.studio.powerbell.R;
 | 
				
			||||||
 | 
					import cc.winboll.studio.powerbell.activities.BackgroundPictureActivity;
 | 
				
			||||||
import cc.winboll.studio.powerbell.beans.BackgroundPictureBean;
 | 
					import cc.winboll.studio.powerbell.beans.BackgroundPictureBean;
 | 
				
			||||||
import cc.winboll.studio.powerbell.dialogs.BackgroundPicturePreviewDialog;
 | 
					import cc.winboll.studio.powerbell.dialogs.BackgroundPicturePreviewDialog;
 | 
				
			||||||
import cc.winboll.studio.powerbell.utils.BackgroundPictureUtils;
 | 
					import cc.winboll.studio.powerbell.utils.BackgroundPictureUtils;
 | 
				
			||||||
@@ -29,45 +24,42 @@ import cc.winboll.studio.powerbell.utils.FileUtils;
 | 
				
			|||||||
import cc.winboll.studio.powerbell.utils.UriUtil;
 | 
					import cc.winboll.studio.powerbell.utils.UriUtil;
 | 
				
			||||||
import java.io.BufferedOutputStream;
 | 
					import java.io.BufferedOutputStream;
 | 
				
			||||||
import java.io.File;
 | 
					import java.io.File;
 | 
				
			||||||
import java.io.FileNotFoundException;
 | 
					 | 
				
			||||||
import java.io.FileOutputStream;
 | 
					import java.io.FileOutputStream;
 | 
				
			||||||
import java.io.IOException;
 | 
					import java.io.IOException;
 | 
				
			||||||
import java.io.OutputStream;
 | 
					import java.io.OutputStream;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public class BackgroundPictureActivity extends WinBoLLActivity implements BackgroundPicturePreviewDialog.IOnRecivedPictureListener {
 | 
					public class BackgroundPictureActivity extends Activity
 | 
				
			||||||
 | 
					implements BackgroundPicturePreviewDialog.IOnRecivedPictureListener {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public static final String TAG = "BackgroundPictureActivity";
 | 
					    public static final String TAG = "BackgroundPictureActivity";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public BackgroundPictureUtils mBackgroundPictureUtils;
 | 
					    public BackgroundPictureUtils mBackgroundPictureUtils;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // 图片选择请求码
 | 
					    // 图片选择请求
 | 
				
			||||||
    public static final int REQUEST_SELECT_PICTURE = 0;
 | 
					    public static final int REQUEST_SELECT_PICTURE = 0;
 | 
				
			||||||
 | 
					    // 照相选择请求
 | 
				
			||||||
    public static final int REQUEST_TAKE_PHOTO = 1;
 | 
					    public static final int REQUEST_TAKE_PHOTO = 1;
 | 
				
			||||||
 | 
					    // 图片裁剪选择请求
 | 
				
			||||||
    public static final int REQUEST_CROP_IMAGE = 2;
 | 
					    public static final int REQUEST_CROP_IMAGE = 2;
 | 
				
			||||||
    private static final int STORAGE_PERMISSION_REQUEST = 100;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    private AToolbar mAToolbar;
 | 
					    AToolbar mAToolbar;
 | 
				
			||||||
    private File mfBackgroundDir;       // 背景图片存储文件夹
 | 
					    // 所有图片存储的文件夹
 | 
				
			||||||
    private File mfPictureDir;          // 拍照与剪裁临时文件夹
 | 
					    File mfBackgroundDir;
 | 
				
			||||||
    private File mfTakePhoto;           // 拍照文件
 | 
					    // 拍照与剪裁的文件夹
 | 
				
			||||||
    private File mfRecivedPicture;      // 接收的图片文件
 | 
					    File mfPictureDir;
 | 
				
			||||||
    private File mfTempCropPicture;     // 剪裁临时文件
 | 
					    // 拍照文件类
 | 
				
			||||||
    private File mfRecivedCropPicture;  // 剪裁后的目标文件
 | 
					    File mfTakePhoto;
 | 
				
			||||||
 | 
					    // 接收到的图片文件类
 | 
				
			||||||
    // 静态变量
 | 
					    public File mfRecivedPicture;
 | 
				
			||||||
 | 
					    // 剪裁文件类
 | 
				
			||||||
 | 
					    File mfTempCropPicture;
 | 
				
			||||||
 | 
					    // 剪裁接收后的文件的文件名
 | 
				
			||||||
    public static String _mszRecivedCropPicture = "RecivedCrop.jpg";
 | 
					    public static String _mszRecivedCropPicture = "RecivedCrop.jpg";
 | 
				
			||||||
    private static String _mszCommonFileType = "jpeg";
 | 
					    File mfRecivedCropPicture;
 | 
				
			||||||
    private int mnPictureCompress = 100;
 | 
					    static String _mszCommonFileType = "jpeg";
 | 
				
			||||||
    private static String _RecivedPictureFileName;
 | 
					    // 背景图片的压缩比
 | 
				
			||||||
 | 
					    int mnPictureCompress = 100;
 | 
				
			||||||
	@Override
 | 
					    static String _RecivedPictureFileName;
 | 
				
			||||||
	public Activity getActivity() {
 | 
					 | 
				
			||||||
		return this;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	@Override
 | 
					 | 
				
			||||||
	public String getTag() {
 | 
					 | 
				
			||||||
		return TAG;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
    protected void onCreate(Bundle savedInstanceState) {
 | 
					    protected void onCreate(Bundle savedInstanceState) {
 | 
				
			||||||
@@ -75,29 +67,30 @@ public class BackgroundPictureActivity extends WinBoLLActivity implements Backgr
 | 
				
			|||||||
        setContentView(R.layout.activity_backgroundpicture);
 | 
					        setContentView(R.layout.activity_backgroundpicture);
 | 
				
			||||||
        initEnv();
 | 
					        initEnv();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // 初始化工具类和文件夹
 | 
					 | 
				
			||||||
        mBackgroundPictureUtils = BackgroundPictureUtils.getInstance(this);
 | 
					        mBackgroundPictureUtils = BackgroundPictureUtils.getInstance(this);
 | 
				
			||||||
        mfBackgroundDir = new File(mBackgroundPictureUtils.getBackgroundDir());
 | 
					        mfBackgroundDir = new File(mBackgroundPictureUtils.getBackgroundDir());
 | 
				
			||||||
        if (!mfBackgroundDir.exists()) {
 | 
					        if (!mfBackgroundDir.exists()) {
 | 
				
			||||||
            mfBackgroundDir.mkdirs();
 | 
					            mfBackgroundDir.mkdirs();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					        //mfPictureDir = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES), getString(R.string.app_projectname));
 | 
				
			||||||
        mfPictureDir = new File(App.getTempDirPath());
 | 
					        mfPictureDir = new File(App.getTempDirPath());
 | 
				
			||||||
        if (!mfPictureDir.exists()) {
 | 
					        if (!mfPictureDir.exists()) {
 | 
				
			||||||
            mfPictureDir.mkdirs();
 | 
					            mfPictureDir.mkdirs();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					 | 
				
			||||||
        // 初始化文件对象
 | 
					 | 
				
			||||||
        mfTakePhoto = new File(mfPictureDir, "TakePhoto.jpg");
 | 
					        mfTakePhoto = new File(mfPictureDir, "TakePhoto.jpg");
 | 
				
			||||||
        mfTempCropPicture = new File(mfPictureDir, "TempCrop.jpg");
 | 
					        mfTempCropPicture = new File(mfPictureDir, "TempCrop.jpg");
 | 
				
			||||||
 | 
					 | 
				
			||||||
        mfRecivedPicture = getRecivedPictureFile(this);
 | 
					        mfRecivedPicture = getRecivedPictureFile(this);
 | 
				
			||||||
        mfRecivedCropPicture = new File(mfBackgroundDir, _mszRecivedCropPicture);
 | 
					        mfRecivedCropPicture = new File(mfBackgroundDir, _mszRecivedCropPicture);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // 初始化工具栏
 | 
					        // 初始化工具栏
 | 
				
			||||||
        mAToolbar = (AToolbar) findViewById(R.id.toolbar);
 | 
					        mAToolbar = (AToolbar) findViewById(R.id.toolbar);
 | 
				
			||||||
        setActionBar(mAToolbar);
 | 
					        setActionBar(mAToolbar);
 | 
				
			||||||
 | 
					        //mAToolbar.setTitle(getTitle() + "-" + getString(R.string.subtitle_activity_backgroundpicture));
 | 
				
			||||||
        mAToolbar.setSubtitle(R.string.subtitle_activity_backgroundpicture);
 | 
					        mAToolbar.setSubtitle(R.string.subtitle_activity_backgroundpicture);
 | 
				
			||||||
 | 
					        //mAToolbar.setTitleTextAppearance(this, R.style.Toolbar_TitleText);
 | 
				
			||||||
 | 
					        //mAToolbar.setSubtitleTextAppearance(this, R.style.Toolbar_SubTitleText);
 | 
				
			||||||
 | 
					        //mAToolbar.setBackgroundColor(getColor(R.color.colorPrimary));
 | 
				
			||||||
 | 
					        setActionBar(mAToolbar);
 | 
				
			||||||
        getActionBar().setDisplayHomeAsUpEnabled(true);
 | 
					        getActionBar().setDisplayHomeAsUpEnabled(true);
 | 
				
			||||||
        mAToolbar.setNavigationOnClickListener(new View.OnClickListener() {
 | 
					        mAToolbar.setNavigationOnClickListener(new View.OnClickListener() {
 | 
				
			||||||
                @Override
 | 
					                @Override
 | 
				
			||||||
@@ -106,30 +99,41 @@ public class BackgroundPictureActivity extends WinBoLLActivity implements Backgr
 | 
				
			|||||||
                }
 | 
					                }
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // 设置按钮点击事件
 | 
					        //给按钮设置点击事件
 | 
				
			||||||
        findViewById(R.id.activitybackgroundpictureAButton5).setOnClickListener(onOriginNullClickListener);
 | 
					        findViewById(R.id.activitybackgroundpictureAButton5).setOnClickListener(onOriginNullClickListener);
 | 
				
			||||||
        findViewById(R.id.activitybackgroundpictureAButton4).setOnClickListener(onReceivedPictureClickListener);
 | 
					        findViewById(R.id.activitybackgroundpictureAButton4).setOnClickListener(onReceivedPictureClickListener);
 | 
				
			||||||
        findViewById(R.id.activitybackgroundpictureAButton1).setOnClickListener(onTakePhotoClickListener);
 | 
					        findViewById(R.id.activitybackgroundpictureAButton1).setOnClickListener(onTakePhotoClickListener);
 | 
				
			||||||
        findViewById(R.id.activitybackgroundpictureAButton2).setOnClickListener(onSelectPictureClickListener);
 | 
					        findViewById(R.id.activitybackgroundpictureAButton2).setOnClickListener(onSelectPictureClickListener);
 | 
				
			||||||
        findViewById(R.id.activitybackgroundpictureAButton3).setOnClickListener(onCropPictureClickListener);
 | 
					        findViewById(R.id.activitybackgroundpictureAButton3).setOnClickListener(onCropPictureClickListener);
 | 
				
			||||||
        findViewById(R.id.activitybackgroundpictureAButton6).setOnClickListener(onCropFreePictureClickListener);
 | 
					        findViewById(R.id.activitybackgroundpictureAButton6).setOnClickListener(onCropFreePictureClickListener);
 | 
				
			||||||
		findViewById(R.id.activitybackgroundpictureAButton7).setOnClickListener(onPixelPickerClickListener);
 | 
					 | 
				
			||||||
		findViewById(R.id.activitybackgroundpictureAButton8).setOnClickListener(onCleanPixelClickListener);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
        updatePreviewBackground();
 | 
					        updatePreviewBackground();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // 处理分享的图片
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        // 判断并且处理应用分享到的文件
 | 
				
			||||||
 | 
					        //
 | 
				
			||||||
 | 
					        //ToastUtils.show("Activity Opened.");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        // 预备接收参数
 | 
				
			||||||
        Intent intent = getIntent();
 | 
					        Intent intent = getIntent();
 | 
				
			||||||
        String action = intent.getAction();
 | 
					        String action = intent.getAction();
 | 
				
			||||||
        String type = intent.getType();
 | 
					        String type = intent.getType();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (Intent.ACTION_SEND.equals(action) && type != null && isImageType(type)) {
 | 
					        //LogUtils.d(TAG, "action : " + action);
 | 
				
			||||||
            BackgroundPicturePreviewDialog dlg = new BackgroundPicturePreviewDialog(this);
 | 
					        //LogUtils.d(TAG, "type : " + type);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        // 判断是否进入图片分享状态
 | 
				
			||||||
 | 
					        if (Intent.ACTION_SEND.equals(action)
 | 
				
			||||||
 | 
					            && type != null
 | 
				
			||||||
 | 
					            && ("image/*".equals(type) || "image/jpeg".equals(type) || "image/jpg".equals(type) || "image/png".equals(type) || "image/webp".equals(type))) {
 | 
				
			||||||
 | 
					            // 预览图片
 | 
				
			||||||
 | 
					            BackgroundPicturePreviewDialog dlg= new BackgroundPicturePreviewDialog(this);
 | 
				
			||||||
            dlg.show();
 | 
					            dlg.show();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    private void initEnv() {
 | 
					    void initEnv() {
 | 
				
			||||||
        LogUtils.d(TAG, "initEnv()");
 | 
					        LogUtils.d(TAG, "initEnv()");
 | 
				
			||||||
        _RecivedPictureFileName = "Recived.data";
 | 
					        _RecivedPictureFileName = "Recived.data";
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@@ -140,55 +144,47 @@ public class BackgroundPictureActivity extends WinBoLLActivity implements Backgr
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
    public void onAcceptRecivedPicture(String szPreRecivedPictureName) {
 | 
					    public void onAcceptRecivedPicture(String szPreRecivedPictureName) {
 | 
				
			||||||
 | 
					        //ToastUtils.show("onAcceptRecivedPicture");
 | 
				
			||||||
        BackgroundPictureUtils utils = BackgroundPictureUtils.getInstance(this);
 | 
					        BackgroundPictureUtils utils = BackgroundPictureUtils.getInstance(this);
 | 
				
			||||||
        utils.getBackgroundPictureBean().setIsUseBackgroundFile(true);
 | 
					        utils.getBackgroundPictureBean().setIsUseBackgroundFile(true);
 | 
				
			||||||
        utils.saveData();
 | 
					        utils.saveData();
 | 
				
			||||||
 | 
					        File fPreRecivedPictureName = new File(utils.getBackgroundDir(), szPreRecivedPictureName);
 | 
				
			||||||
        File sourceFile = new File(utils.getBackgroundDir(), szPreRecivedPictureName);
 | 
					        FileUtils.copyFile(fPreRecivedPictureName, mfRecivedPicture);
 | 
				
			||||||
        if (FileUtils.copyFile(sourceFile, mfRecivedPicture)) {
 | 
					        // 加载背景
 | 
				
			||||||
            startCropImageActivity(false);
 | 
					        startCropImageActivity(false);
 | 
				
			||||||
        } else {
 | 
					 | 
				
			||||||
            ToastUtils.show("图片复制失败,请重试");
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    //
 | 
				
			||||||
     * 更新背景图片预览
 | 
					    // 更新预览背景
 | 
				
			||||||
     */
 | 
					    //
 | 
				
			||||||
    public void updatePreviewBackground() {
 | 
					    public void updatePreviewBackground() {
 | 
				
			||||||
        LogUtils.d(TAG, "updatePreviewBackground");
 | 
					        LogUtils.d(TAG, "updatePreviewBackground");
 | 
				
			||||||
        ImageView ivPreviewBackground = (ImageView) findViewById(R.id.activitybackgroundpictureImageView1);
 | 
					        ImageView ivPreviewBackground = findViewById(R.id.activitybackgroundpictureImageView1);
 | 
				
			||||||
        BackgroundPictureUtils utils = BackgroundPictureUtils.getInstance(this);
 | 
					        BackgroundPictureUtils utils = BackgroundPictureUtils.getInstance(this);
 | 
				
			||||||
        utils.loadBackgroundPictureBean();
 | 
					        utils.loadBackgroundPictureBean();
 | 
				
			||||||
 | 
					 | 
				
			||||||
        boolean isUseBackgroundFile = utils.getBackgroundPictureBean().isUseBackgroundFile();
 | 
					        boolean isUseBackgroundFile = utils.getBackgroundPictureBean().isUseBackgroundFile();
 | 
				
			||||||
        if (isUseBackgroundFile && mfRecivedCropPicture.exists()) {
 | 
					        if (isUseBackgroundFile && mfRecivedCropPicture.exists()) {
 | 
				
			||||||
            try {
 | 
					            try {
 | 
				
			||||||
                String filePath = utils.getBackgroundDir() + getBackgroundFileName();
 | 
					                String szBackgroundFilePath = utils.getBackgroundDir() + getBackgroundFileName();
 | 
				
			||||||
                Drawable drawable = FileUtils.getImageDrawable(filePath);
 | 
					                Drawable drawableBackground = FileUtils.getImageDrawable(szBackgroundFilePath);
 | 
				
			||||||
                if (drawable != null) {
 | 
					                drawableBackground.setAlpha(120);
 | 
				
			||||||
                    //drawable.setAlpha(120);
 | 
					                ivPreviewBackground.setImageDrawable(drawableBackground);
 | 
				
			||||||
                    ivPreviewBackground.setImageDrawable(drawable);
 | 
					                ToastUtils.show("Use acceptRecived background.");
 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
                //ToastUtils.show("背景图片已更新");
 | 
					 | 
				
			||||||
            } catch (IOException e) {
 | 
					            } catch (IOException e) {
 | 
				
			||||||
                LogUtils.d(TAG, e, Thread.currentThread().getStackTrace());
 | 
					                LogUtils.d(TAG, e, Thread.currentThread().getStackTrace());
 | 
				
			||||||
                ToastUtils.show("背景图片加载失败");
 | 
					 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            ToastUtils.show("未使用背景图片");
 | 
					            ToastUtils.show(" No background.");
 | 
				
			||||||
            Drawable drawable = getResources().getDrawable(R.drawable.blank10x10);
 | 
					            Drawable drawableBackground = getDrawable(R.drawable.blank10x10);
 | 
				
			||||||
            if (drawable != null) {
 | 
					            drawableBackground.setAlpha(120);
 | 
				
			||||||
                drawable.setAlpha(120);
 | 
					            ivPreviewBackground.setImageDrawable(drawableBackground);
 | 
				
			||||||
                ivPreviewBackground.setImageDrawable(drawable);
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // 点击事件监听器
 | 
					 | 
				
			||||||
    private View.OnClickListener onOriginNullClickListener = new View.OnClickListener() {
 | 
					    private View.OnClickListener onOriginNullClickListener = new View.OnClickListener() {
 | 
				
			||||||
        @Override
 | 
					        @Override
 | 
				
			||||||
        public void onClick(View v) {
 | 
					        public void onClick(View v) {
 | 
				
			||||||
 | 
					            // 选择原始空白背景
 | 
				
			||||||
            BackgroundPictureUtils utils = BackgroundPictureUtils.getInstance(BackgroundPictureActivity.this);
 | 
					            BackgroundPictureUtils utils = BackgroundPictureUtils.getInstance(BackgroundPictureActivity.this);
 | 
				
			||||||
            BackgroundPictureBean bean = utils.getBackgroundPictureBean();
 | 
					            BackgroundPictureBean bean = utils.getBackgroundPictureBean();
 | 
				
			||||||
            bean.setIsUseBackgroundFile(false);
 | 
					            bean.setIsUseBackgroundFile(false);
 | 
				
			||||||
@@ -200,10 +196,11 @@ public class BackgroundPictureActivity extends WinBoLLActivity implements Backgr
 | 
				
			|||||||
    private View.OnClickListener onSelectPictureClickListener = new View.OnClickListener() {
 | 
					    private View.OnClickListener onSelectPictureClickListener = new View.OnClickListener() {
 | 
				
			||||||
        @Override
 | 
					        @Override
 | 
				
			||||||
        public void onClick(View v) {
 | 
					        public void onClick(View v) {
 | 
				
			||||||
            if (checkAndRequestStoragePermission()) {
 | 
					            // 导入外部图片
 | 
				
			||||||
                Intent intent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
 | 
					            Intent intent = new Intent(
 | 
				
			||||||
                startActivityForResult(intent, REQUEST_SELECT_PICTURE);
 | 
					                Intent.ACTION_PICK,
 | 
				
			||||||
            }
 | 
					                android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
 | 
				
			||||||
 | 
					            startActivityForResult(intent, REQUEST_SELECT_PICTURE);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -214,7 +211,7 @@ public class BackgroundPictureActivity extends WinBoLLActivity implements Backgr
 | 
				
			|||||||
            if (fCheck.exists()) {
 | 
					            if (fCheck.exists()) {
 | 
				
			||||||
                startCropImageActivity(false);
 | 
					                startCropImageActivity(false);
 | 
				
			||||||
            } else {
 | 
					            } else {
 | 
				
			||||||
                ToastUtils.show("没有可剪裁的图片");
 | 
					                ToastUtils.show("There is not any picture to crop.");
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
@@ -226,7 +223,7 @@ public class BackgroundPictureActivity extends WinBoLLActivity implements Backgr
 | 
				
			|||||||
            if (fCheck.exists()) {
 | 
					            if (fCheck.exists()) {
 | 
				
			||||||
                startCropImageActivity(true);
 | 
					                startCropImageActivity(true);
 | 
				
			||||||
            } else {
 | 
					            } else {
 | 
				
			||||||
                ToastUtils.show("没有可剪裁的图片");
 | 
					                ToastUtils.show("There is not any picture to crop.");
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
@@ -236,7 +233,6 @@ public class BackgroundPictureActivity extends WinBoLLActivity implements Backgr
 | 
				
			|||||||
        public void onClick(View v) {
 | 
					        public void onClick(View v) {
 | 
				
			||||||
            LogUtils.d(TAG, "onTakePhotoClickListener");
 | 
					            LogUtils.d(TAG, "onTakePhotoClickListener");
 | 
				
			||||||
            LogUtils.d(TAG, "mfTakePhoto : " + mfTakePhoto.getPath());
 | 
					            LogUtils.d(TAG, "mfTakePhoto : " + mfTakePhoto.getPath());
 | 
				
			||||||
 | 
					 | 
				
			||||||
            if (mfTakePhoto.exists()) {
 | 
					            if (mfTakePhoto.exists()) {
 | 
				
			||||||
                mfTakePhoto.delete();
 | 
					                mfTakePhoto.delete();
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
@@ -244,94 +240,56 @@ public class BackgroundPictureActivity extends WinBoLLActivity implements Backgr
 | 
				
			|||||||
                mfTakePhoto.createNewFile();
 | 
					                mfTakePhoto.createNewFile();
 | 
				
			||||||
            } catch (IOException e) {
 | 
					            } catch (IOException e) {
 | 
				
			||||||
                LogUtils.d(TAG, e, Thread.currentThread().getStackTrace());
 | 
					                LogUtils.d(TAG, e, Thread.currentThread().getStackTrace());
 | 
				
			||||||
                ToastUtils.show("拍照文件创建失败");
 | 
					 | 
				
			||||||
                return;
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            if (checkAndRequestStoragePermission()) {
 | 
					 | 
				
			||||||
                Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
 | 
					 | 
				
			||||||
                startActivityForResult(takePictureIntent, REQUEST_TAKE_PHOTO);
 | 
					 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					            Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
 | 
				
			||||||
 | 
					            startActivityForResult(takePictureIntent, REQUEST_TAKE_PHOTO);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    private View.OnClickListener onReceivedPictureClickListener = new View.OnClickListener() {
 | 
					    private View.OnClickListener onReceivedPictureClickListener = new View.OnClickListener() {
 | 
				
			||||||
        @Override
 | 
					        @Override
 | 
				
			||||||
        public void onClick(View v) {
 | 
					        public void onClick(View v) {
 | 
				
			||||||
 | 
					            // 选择接收到的背景图片
 | 
				
			||||||
            BackgroundPictureUtils utils = BackgroundPictureUtils.getInstance(BackgroundPictureActivity.this);
 | 
					            BackgroundPictureUtils utils = BackgroundPictureUtils.getInstance(BackgroundPictureActivity.this);
 | 
				
			||||||
            utils.getBackgroundPictureBean().setIsUseBackgroundFile(true);
 | 
								utils.getBackgroundPictureBean().setIsUseBackgroundFile(true);
 | 
				
			||||||
            utils.saveData();
 | 
					            utils.saveData();
 | 
				
			||||||
            updatePreviewBackground();
 | 
					            updatePreviewBackground();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	private View.OnClickListener onPixelPickerClickListener = new View.OnClickListener() {
 | 
					 | 
				
			||||||
        @Override
 | 
					 | 
				
			||||||
        public void onClick(View v) {
 | 
					 | 
				
			||||||
			// 从文件路径启动像素拾取活动
 | 
					 | 
				
			||||||
			//String imagePath = "/storage/emulated/0/DCIM/Camera/sample.jpg";
 | 
					 | 
				
			||||||
			String imagePath = mfRecivedCropPicture.toString();
 | 
					 | 
				
			||||||
			Intent intent = new Intent(getApplicationContext(), PixelPickerActivity.class);
 | 
					 | 
				
			||||||
			intent.putExtra("imagePath", imagePath);
 | 
					 | 
				
			||||||
			startActivity(intent);
 | 
					 | 
				
			||||||
            //App.getWinBoLLActivityManager().startWinBoLLActivity(getActivity(), intent, PixelPickerActivity.class);
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
    };
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	private View.OnClickListener onCleanPixelClickListener = new View.OnClickListener() {
 | 
					 | 
				
			||||||
        @Override
 | 
					 | 
				
			||||||
        public void onClick(View v) {
 | 
					 | 
				
			||||||
			BackgroundPictureUtils utils = BackgroundPictureUtils.getInstance(BackgroundPictureActivity.this);
 | 
					 | 
				
			||||||
			BackgroundPictureBean bean = utils.getBackgroundPictureBean();
 | 
					 | 
				
			||||||
			bean.setPixelColor(0);
 | 
					 | 
				
			||||||
			utils.saveData();
 | 
					 | 
				
			||||||
			setBackgroundColor();
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
    };
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
     * 压缩图片并保存到接收文件
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    void compressQualityToRecivedPicture(Bitmap bitmap) {
 | 
					    void compressQualityToRecivedPicture(Bitmap bitmap) {
 | 
				
			||||||
 | 
					        // 设置输出流
 | 
				
			||||||
        OutputStream outStream = null;
 | 
					        OutputStream outStream = null;
 | 
				
			||||||
        try {
 | 
					        try {
 | 
				
			||||||
 | 
					            // 创建输出流对象,准备写入压缩后的图片文件
 | 
				
			||||||
            mfRecivedPicture = getRecivedPictureFile(this);
 | 
					            mfRecivedPicture = getRecivedPictureFile(this);
 | 
				
			||||||
 | 
					            // 创建新的接收文件
 | 
				
			||||||
            if (!mfRecivedPicture.exists()) {
 | 
					            if (!mfRecivedPicture.exists()) {
 | 
				
			||||||
                mfRecivedPicture.createNewFile();
 | 
					                mfRecivedPicture.createNewFile();
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            FileOutputStream fos = new FileOutputStream(mfRecivedPicture);
 | 
					            FileOutputStream fos = new FileOutputStream(mfRecivedPicture);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            // 获取输出流对象
 | 
				
			||||||
            outStream = new BufferedOutputStream(fos);
 | 
					            outStream = new BufferedOutputStream(fos);
 | 
				
			||||||
            bitmap.compress(Bitmap.CompressFormat.JPEG, 100, outStream);
 | 
					
 | 
				
			||||||
 | 
					            // 使用默认的质量参数压缩图片
 | 
				
			||||||
 | 
					            bitmap.compress(Bitmap.CompressFormat.JPEG, 100, outStream); // 70% 的质量
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            // 关闭输出流以完成文件操作
 | 
				
			||||||
            outStream.flush();
 | 
					            outStream.flush();
 | 
				
			||||||
 | 
					            outStream.close();
 | 
				
			||||||
        } catch (IOException e) {
 | 
					        } catch (IOException e) {
 | 
				
			||||||
            LogUtils.d(TAG, e, Thread.currentThread().getStackTrace());
 | 
					            LogUtils.d(TAG, e, Thread.currentThread().getStackTrace());
 | 
				
			||||||
            ToastUtils.show("图片压缩失败");
 | 
					 | 
				
			||||||
        } finally {
 | 
					 | 
				
			||||||
            if (outStream != null) {
 | 
					 | 
				
			||||||
                try {
 | 
					 | 
				
			||||||
                    outStream.close();
 | 
					 | 
				
			||||||
                } catch (IOException e) {
 | 
					 | 
				
			||||||
                    LogUtils.d(TAG, e, Thread.currentThread().getStackTrace());
 | 
					 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
            if (bitmap != null && !bitmap.isRecycled()) {
 | 
					 | 
				
			||||||
                bitmap.recycle();
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
     * 启动图片裁剪活动
 | 
					 | 
				
			||||||
     * @param isCropFree 是否自由裁剪
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    public void startCropImageActivity(boolean isCropFree) {
 | 
					    public void startCropImageActivity(boolean isCropFree) {
 | 
				
			||||||
        LogUtils.d(TAG, "startCropImageActivity");
 | 
					        LogUtils.d(TAG, "startCropImageActivity");
 | 
				
			||||||
        BackgroundPictureBean bean = mBackgroundPictureUtils.loadBackgroundPictureBean();
 | 
					        BackgroundPictureBean bean = mBackgroundPictureUtils.loadBackgroundPictureBean();
 | 
				
			||||||
        mfRecivedPicture = getRecivedPictureFile(this);
 | 
					        mfRecivedPicture = getRecivedPictureFile(this);
 | 
				
			||||||
        Uri uri = UriUtil.getUriForFile(this, mfRecivedPicture);
 | 
					        Uri uri = UriUtil.getUriForFile(this, mfRecivedPicture);
 | 
				
			||||||
        LogUtils.d(TAG, "uri : " + uri.toString());
 | 
					        LogUtils.d(TAG, "uri : " + uri.toString());
 | 
				
			||||||
 | 
					 | 
				
			||||||
        if (mfTempCropPicture.exists()) {
 | 
					        if (mfTempCropPicture.exists()) {
 | 
				
			||||||
            mfTempCropPicture.delete();
 | 
					            mfTempCropPicture.delete();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
@@ -339,24 +297,27 @@ public class BackgroundPictureActivity extends WinBoLLActivity implements Backgr
 | 
				
			|||||||
            mfTempCropPicture.createNewFile();
 | 
					            mfTempCropPicture.createNewFile();
 | 
				
			||||||
        } catch (IOException e) {
 | 
					        } catch (IOException e) {
 | 
				
			||||||
            LogUtils.d(TAG, e, Thread.currentThread().getStackTrace());
 | 
					            LogUtils.d(TAG, e, Thread.currentThread().getStackTrace());
 | 
				
			||||||
            ToastUtils.show("剪裁临时文件创建失败");
 | 
					 | 
				
			||||||
            return;
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					        // 使用正确的文件路径构建 Uri
 | 
				
			||||||
        Uri cropOutPutUri = Uri.fromFile(mfTempCropPicture);
 | 
					        Uri cropOutPutUri = Uri.fromFile(mfTempCropPicture);
 | 
				
			||||||
        LogUtils.d(TAG, "mfTempCropPicture : " + mfTempCropPicture.getPath());
 | 
					        LogUtils.d(TAG, "mfTempCropPicture : " + mfTempCropPicture.getPath());
 | 
				
			||||||
 | 
					 | 
				
			||||||
        Intent intent = new Intent("com.android.camera.action.CROP");
 | 
					        Intent intent = new Intent("com.android.camera.action.CROP");
 | 
				
			||||||
        intent.setDataAndType(uri, "image/" + _mszCommonFileType);
 | 
					        intent.setDataAndType(uri, "image/" + _mszCommonFileType);
 | 
				
			||||||
 | 
					        // 下面这个crop=true是设置在开启的Intent中设置显示的VIEW可裁剪
 | 
				
			||||||
        intent.putExtra("crop", "true");
 | 
					        intent.putExtra("crop", "true");
 | 
				
			||||||
        intent.putExtra("noFaceDetection", true);
 | 
					        intent.putExtra("noFaceDetection", true);
 | 
				
			||||||
 | 
					 | 
				
			||||||
        if (!isCropFree) {
 | 
					        if (!isCropFree) {
 | 
				
			||||||
 | 
					            // aspectX aspectY 是宽高的比例
 | 
				
			||||||
            intent.putExtra("aspectX", bean.getBackgroundWidth());
 | 
					            intent.putExtra("aspectX", bean.getBackgroundWidth());
 | 
				
			||||||
            intent.putExtra("aspectY", bean.getBackgroundHeight());
 | 
					            intent.putExtra("aspectY", bean.getBackgroundHeight());
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					        // outputX outputY 是裁剪图片宽高
 | 
				
			||||||
 | 
					        //intent.putExtra("outputX", 100);
 | 
				
			||||||
 | 
					        //intent.putExtra("outputY", 100);
 | 
				
			||||||
 | 
					        //return-data =false 意味着裁剪成功后不能在onActivityResult 的intent 中获得图片
 | 
				
			||||||
 | 
					        //intent.putExtra("return-data", false);
 | 
				
			||||||
        intent.putExtra("return-data", true);
 | 
					        intent.putExtra("return-data", true);
 | 
				
			||||||
 | 
					        //裁剪后的图片输出至  cropOutPutUri
 | 
				
			||||||
        intent.putExtra(MediaStore.EXTRA_OUTPUT, cropOutPutUri);
 | 
					        intent.putExtra(MediaStore.EXTRA_OUTPUT, cropOutPutUri);
 | 
				
			||||||
        intent.putExtra("scale", true);
 | 
					        intent.putExtra("scale", true);
 | 
				
			||||||
        intent.putExtra("outputFormat", Bitmap.CompressFormat.JPEG.toString());
 | 
					        intent.putExtra("outputFormat", Bitmap.CompressFormat.JPEG.toString());
 | 
				
			||||||
@@ -364,102 +325,13 @@ public class BackgroundPictureActivity extends WinBoLLActivity implements Backgr
 | 
				
			|||||||
        startActivityForResult(intent, REQUEST_CROP_IMAGE);
 | 
					        startActivityForResult(intent, REQUEST_CROP_IMAGE);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    // 启动裁剪窗口,裁剪操作文件为 uirImage
 | 
				
			||||||
     * 保存剪裁后的Bitmap(优化版)
 | 
					    //
 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    private void saveCropBitmap(Bitmap bitmap) {
 | 
					 | 
				
			||||||
        if (bitmap == null) {
 | 
					 | 
				
			||||||
            ToastUtils.show("剪裁图片为空");
 | 
					 | 
				
			||||||
            return;
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        // 内存优化:大图片自动缩放
 | 
					 | 
				
			||||||
        Bitmap scaledBitmap = bitmap;
 | 
					 | 
				
			||||||
        if (bitmap.getByteCount() > 10 * 1024 * 1024) { // 超过10MB
 | 
					 | 
				
			||||||
            float scale = 1.0f;
 | 
					 | 
				
			||||||
            while (scaledBitmap.getByteCount() > 5 * 1024 * 1024) {
 | 
					 | 
				
			||||||
                scale -= 0.2f; // 每次缩小20%
 | 
					 | 
				
			||||||
                if (scale < 0.2f) break; // 最小缩放到20%
 | 
					 | 
				
			||||||
                scaledBitmap = scaleBitmap(scaledBitmap, scale);
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
            if (scaledBitmap != bitmap) {
 | 
					 | 
				
			||||||
                bitmap.recycle(); // 回收原Bitmap
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        // 优化:创建保存目录
 | 
					 | 
				
			||||||
        File backgroundDir = new File(mBackgroundPictureUtils.getBackgroundDir());
 | 
					 | 
				
			||||||
        if (!backgroundDir.exists()) {
 | 
					 | 
				
			||||||
            if (!backgroundDir.mkdirs()) {
 | 
					 | 
				
			||||||
                ToastUtils.show("无法创建保存目录");
 | 
					 | 
				
			||||||
                if (scaledBitmap != bitmap) scaledBitmap.recycle();
 | 
					 | 
				
			||||||
                return;
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        File saveFile = new File(backgroundDir, getBackgroundFileName());
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        // 优化:检查文件是否可写
 | 
					 | 
				
			||||||
        if (saveFile.exists() && !saveFile.canWrite()) {
 | 
					 | 
				
			||||||
            if (!saveFile.delete()) {
 | 
					 | 
				
			||||||
                ToastUtils.show("无法删除旧文件");
 | 
					 | 
				
			||||||
                if (scaledBitmap != bitmap) scaledBitmap.recycle();
 | 
					 | 
				
			||||||
                return;
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        FileOutputStream fos = null;
 | 
					 | 
				
			||||||
        try {
 | 
					 | 
				
			||||||
            fos = new FileOutputStream(saveFile);
 | 
					 | 
				
			||||||
            boolean success = scaledBitmap.compress(Bitmap.CompressFormat.JPEG, 80, fos);
 | 
					 | 
				
			||||||
            fos.flush();
 | 
					 | 
				
			||||||
            if (success) {
 | 
					 | 
				
			||||||
                ToastUtils.show("保存成功");
 | 
					 | 
				
			||||||
                // 更新数据
 | 
					 | 
				
			||||||
                mBackgroundPictureUtils.getBackgroundPictureBean().setIsUseBackgroundFile(true);
 | 
					 | 
				
			||||||
                updatePreviewBackground();
 | 
					 | 
				
			||||||
            } else {
 | 
					 | 
				
			||||||
                ToastUtils.show("图片压缩保存失败");
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
        } catch (FileNotFoundException e) {
 | 
					 | 
				
			||||||
            LogUtils.e(TAG, "文件未找到" + e);
 | 
					 | 
				
			||||||
            ToastUtils.show("保存失败:文件路径错误");
 | 
					 | 
				
			||||||
        } catch (IOException e) {
 | 
					 | 
				
			||||||
            LogUtils.e(TAG, "写入异常" + e);
 | 
					 | 
				
			||||||
            ToastUtils.show("保存失败:磁盘可能已满或路径错误");
 | 
					 | 
				
			||||||
        } finally {
 | 
					 | 
				
			||||||
            if (fos != null) {
 | 
					 | 
				
			||||||
                try {
 | 
					 | 
				
			||||||
                    fos.close();
 | 
					 | 
				
			||||||
                } catch (IOException e) {
 | 
					 | 
				
			||||||
                    LogUtils.e(TAG, "流关闭异常" + e);
 | 
					 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
            if (scaledBitmap != null && !scaledBitmap.isRecycled()) {
 | 
					 | 
				
			||||||
                scaledBitmap.recycle();
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
     * 缩放Bitmap
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    private Bitmap scaleBitmap(Bitmap original, float scale) {
 | 
					 | 
				
			||||||
        if (original == null) {
 | 
					 | 
				
			||||||
            return null;
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        int width = (int) (original.getWidth() * scale);
 | 
					 | 
				
			||||||
        int height = (int) (original.getHeight() * scale);
 | 
					 | 
				
			||||||
        return Bitmap.createScaledBitmap(original, width, height, true);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
     * 分享图片
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    void sharePicture() {
 | 
					    void sharePicture() {
 | 
				
			||||||
        Uri uri = UriUtil.getUriForFile(this, mfRecivedPicture);
 | 
					        Uri uri = UriUtil.getUriForFile(this, mfRecivedPicture);
 | 
				
			||||||
        Intent shareIntent = new Intent(Intent.ACTION_SEND);
 | 
					        Intent shareIntent = new Intent();    
 | 
				
			||||||
        shareIntent.putExtra(Intent.EXTRA_STREAM, uri);
 | 
					        shareIntent.setAction(Intent.ACTION_SEND);    
 | 
				
			||||||
 | 
					        shareIntent.putExtra(Intent.EXTRA_STREAM, uri);    
 | 
				
			||||||
        shareIntent.setType("image/" + _mszCommonFileType);
 | 
					        shareIntent.setType("image/" + _mszCommonFileType);
 | 
				
			||||||
        shareIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
 | 
					        shareIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
 | 
				
			||||||
        startActivity(Intent.createChooser(shareIntent, "Share Image"));
 | 
					        startActivity(Intent.createChooser(shareIntent, "Share Image"));
 | 
				
			||||||
@@ -473,121 +345,45 @@ public class BackgroundPictureActivity extends WinBoLLActivity implements Backgr
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
 | 
					    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        super.onActivityResult(requestCode, resultCode, data);
 | 
					        super.onActivityResult(requestCode, resultCode, data);
 | 
				
			||||||
        if (requestCode == REQUEST_SELECT_PICTURE && resultCode == RESULT_OK) {
 | 
					        if (requestCode == REQUEST_SELECT_PICTURE) {
 | 
				
			||||||
            try {
 | 
					            // 处理选择后图片
 | 
				
			||||||
                Uri selectedImage = data.getData();
 | 
					            if (resultCode == RESULT_OK) {
 | 
				
			||||||
                LogUtils.d(TAG, "Uri is : " + selectedImage.toString());
 | 
					                try {
 | 
				
			||||||
                File fSrcImage = new File(UriUtil.getFilePathFromUri(this, selectedImage));
 | 
					                    Uri selectedImage = data.getData(); 
 | 
				
			||||||
                mfRecivedPicture = getRecivedPictureFile(this);
 | 
					                    LogUtils.d(TAG, "Uri is : " + selectedImage.toString());
 | 
				
			||||||
                if (FileUtils.copyFile(fSrcImage, mfRecivedPicture)) {
 | 
					                    File fSrcImage = new File(UriUtil.getFilePathFromUri(this, selectedImage));
 | 
				
			||||||
 | 
					                    mfRecivedPicture = getRecivedPictureFile(this);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    FileUtils.copyFile(fSrcImage, mfRecivedPicture);
 | 
				
			||||||
 | 
					                    // 启动剪裁文件窗口
 | 
				
			||||||
                    startCropImageActivity(false);
 | 
					                    startCropImageActivity(false);
 | 
				
			||||||
                } else {
 | 
					                } catch (Exception e) {
 | 
				
			||||||
                    ToastUtils.show("图片复制失败,请重试");
 | 
					                    LogUtils.d(TAG, e, Thread.currentThread().getStackTrace());
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            } catch (Exception e) {
 | 
					 | 
				
			||||||
                LogUtils.e(TAG, "选择图片异常" + e);
 | 
					 | 
				
			||||||
                ToastUtils.show("选择图片失败:" + e.getMessage());
 | 
					 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        } else if (requestCode == REQUEST_TAKE_PHOTO && resultCode == RESULT_OK) {
 | 
					        } else if (requestCode == REQUEST_TAKE_PHOTO) {
 | 
				
			||||||
            LogUtils.d(TAG, "REQUEST_TAKE_PHOTO");
 | 
					            if (resultCode == RESULT_OK) {
 | 
				
			||||||
            Bundle extras = data.getExtras();
 | 
					                LogUtils.d(TAG, "REQUEST_TAKE_PHOTO");
 | 
				
			||||||
            if (extras != null) {
 | 
					                Bundle extras = data.getExtras();
 | 
				
			||||||
                Bitmap imageBitmap = (Bitmap) extras.get("data");
 | 
					                Bitmap imageBitmap = (Bitmap) extras.get("data");
 | 
				
			||||||
                if (imageBitmap != null) {
 | 
					                compressQualityToRecivedPicture(imageBitmap);
 | 
				
			||||||
                    compressQualityToRecivedPicture(imageBitmap);
 | 
					                startCropImageActivity(false);
 | 
				
			||||||
                    startCropImageActivity(false);
 | 
					            }
 | 
				
			||||||
                } else {
 | 
					        } else if (requestCode == REQUEST_CROP_IMAGE) {
 | 
				
			||||||
                    ToastUtils.show("拍照图片为空");
 | 
					            if (resultCode == RESULT_OK) {
 | 
				
			||||||
                }
 | 
					                LogUtils.d(TAG, "CROP_IMAGE_REQUEST_CODE");
 | 
				
			||||||
            } else {
 | 
					                FileUtils.copyFile(mfTempCropPicture, mfRecivedCropPicture);
 | 
				
			||||||
                ToastUtils.show("拍照数据获取失败");
 | 
					                mfTempCropPicture.delete();
 | 
				
			||||||
 | 
					                mBackgroundPictureUtils.getBackgroundPictureBean().setIsUseBackgroundFile(true);
 | 
				
			||||||
 | 
					                updatePreviewBackground();
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        } else if (requestCode == REQUEST_CROP_IMAGE && resultCode == RESULT_OK) {
 | 
					 | 
				
			||||||
            LogUtils.d(TAG, "CROP_IMAGE_REQUEST_CODE");
 | 
					 | 
				
			||||||
            try {
 | 
					 | 
				
			||||||
                Bitmap cropBitmap = null;
 | 
					 | 
				
			||||||
                // 方案1:通过Intent获取剪裁后的Bitmap
 | 
					 | 
				
			||||||
                if (data != null && data.hasExtra("data")) {
 | 
					 | 
				
			||||||
                    cropBitmap = data.getParcelableExtra("data");
 | 
					 | 
				
			||||||
                } else if (mfTempCropPicture.exists()) {
 | 
					 | 
				
			||||||
                    cropBitmap = BitmapFactory.decodeFile(mfTempCropPicture.getPath());
 | 
					 | 
				
			||||||
                } else {
 | 
					 | 
				
			||||||
                    ToastUtils.show("剪裁文件不存在");
 | 
					 | 
				
			||||||
                    return;
 | 
					 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
                if (cropBitmap != null) {
 | 
					        } else {
 | 
				
			||||||
                    saveCropBitmap(cropBitmap);
 | 
					            String sz = "Unsolved requestCode = " + Integer.toString(requestCode);
 | 
				
			||||||
                } else {
 | 
					            Toast.makeText(getApplication(), sz, Toast.LENGTH_SHORT).show();
 | 
				
			||||||
                    ToastUtils.show("获取剪裁图片失败");
 | 
					            LogUtils.d(TAG, sz);
 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
            } catch (OutOfMemoryError e) {
 | 
					 | 
				
			||||||
                LogUtils.e(TAG, "内存溢出" + e);
 | 
					 | 
				
			||||||
                ToastUtils.show("保存失败:内存不足,请尝试裁剪更小的图片");
 | 
					 | 
				
			||||||
            } catch (Exception e) {
 | 
					 | 
				
			||||||
                LogUtils.e(TAG, "剪裁保存异常" + e);
 | 
					 | 
				
			||||||
                ToastUtils.show("保存失败:" + e.getMessage());
 | 
					 | 
				
			||||||
            }/* finally {
 | 
					 | 
				
			||||||
			 // 安全删除临时文件
 | 
					 | 
				
			||||||
			 if (mfTempCropPicture.exists()) {
 | 
					 | 
				
			||||||
			 mfTempCropPicture.delete();
 | 
					 | 
				
			||||||
			 }
 | 
					 | 
				
			||||||
			 }*/
 | 
					 | 
				
			||||||
        } else if (resultCode != RESULT_OK) {
 | 
					 | 
				
			||||||
            LogUtils.d(TAG, "操作取消或失败,requestCode: " + requestCode);
 | 
					 | 
				
			||||||
            ToastUtils.show("操作已取消");
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
     * 检查类型是否为图片
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    private boolean isImageType(String type) {
 | 
					 | 
				
			||||||
        return type.startsWith("image/") || "image/jpeg".equals(type) || 
 | 
					 | 
				
			||||||
            "image/jpg".equals(type) || "image/png".equals(type) || 
 | 
					 | 
				
			||||||
            "image/webp".equals(type);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
     * 检查并申请存储权限
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    private boolean checkAndRequestStoragePermission() {
 | 
					 | 
				
			||||||
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
 | 
					 | 
				
			||||||
            if (ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
 | 
					 | 
				
			||||||
                ActivityCompat.requestPermissions(this, 
 | 
					 | 
				
			||||||
                                                  new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, 
 | 
					 | 
				
			||||||
                                                  STORAGE_PERMISSION_REQUEST);
 | 
					 | 
				
			||||||
                return false;
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        return true;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    @Override
 | 
					 | 
				
			||||||
    public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
 | 
					 | 
				
			||||||
        super.onRequestPermissionsResult(requestCode, permissions, grantResults);
 | 
					 | 
				
			||||||
        if (requestCode == STORAGE_PERMISSION_REQUEST) {
 | 
					 | 
				
			||||||
            if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
 | 
					 | 
				
			||||||
                ToastUtils.show("存储权限已获取");
 | 
					 | 
				
			||||||
            } else {
 | 
					 | 
				
			||||||
                ToastUtils.show("需要存储权限才能保存图片");
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	void setBackgroundColor() {
 | 
					 | 
				
			||||||
		BackgroundPictureUtils utils = BackgroundPictureUtils.getInstance(BackgroundPictureActivity.this);
 | 
					 | 
				
			||||||
		BackgroundPictureBean bean = utils.getBackgroundPictureBean();
 | 
					 | 
				
			||||||
		int nPixelColor = bean.getPixelColor();
 | 
					 | 
				
			||||||
		RelativeLayout mainLayout = findViewById(R.id.activitybackgroundpictureRelativeLayout1);
 | 
					 | 
				
			||||||
		mainLayout.setBackgroundColor(nPixelColor);
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	@Override
 | 
					 | 
				
			||||||
	protected void onResume() {
 | 
					 | 
				
			||||||
		super.onResume();
 | 
					 | 
				
			||||||
		setBackgroundColor();
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,251 +0,0 @@
 | 
				
			|||||||
package cc.winboll.studio.powerbell.activities;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/**
 | 
					 | 
				
			||||||
 * @Author ZhanGSKen<zhangsken@188.com>
 | 
					 | 
				
			||||||
 * @Date 2025/06/22 14:15
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
import android.app.Activity;
 | 
					 | 
				
			||||||
import android.app.Dialog;
 | 
					 | 
				
			||||||
import android.graphics.Bitmap;
 | 
					 | 
				
			||||||
import android.graphics.BitmapFactory;
 | 
					 | 
				
			||||||
import android.graphics.Color;
 | 
					 | 
				
			||||||
import android.os.Bundle;
 | 
					 | 
				
			||||||
import android.view.MenuItem;
 | 
					 | 
				
			||||||
import android.view.MotionEvent;
 | 
					 | 
				
			||||||
import android.view.View;
 | 
					 | 
				
			||||||
import android.view.ViewGroup;
 | 
					 | 
				
			||||||
import android.widget.Button;
 | 
					 | 
				
			||||||
import android.widget.ImageView;
 | 
					 | 
				
			||||||
import android.widget.RelativeLayout;
 | 
					 | 
				
			||||||
import android.widget.TextView;
 | 
					 | 
				
			||||||
import android.widget.Toast;
 | 
					 | 
				
			||||||
import cc.winboll.studio.libaes.views.AToolbar;
 | 
					 | 
				
			||||||
import cc.winboll.studio.libappbase.GlobalApplication;
 | 
					 | 
				
			||||||
import cc.winboll.studio.libappbase.winboll.IWinBoLLActivity;
 | 
					 | 
				
			||||||
import cc.winboll.studio.powerbell.MainActivity;
 | 
					 | 
				
			||||||
import cc.winboll.studio.powerbell.R;
 | 
					 | 
				
			||||||
import cc.winboll.studio.powerbell.activities.PixelPickerActivity;
 | 
					 | 
				
			||||||
import cc.winboll.studio.powerbell.beans.BackgroundPictureBean;
 | 
					 | 
				
			||||||
import cc.winboll.studio.powerbell.utils.BackgroundPictureUtils;
 | 
					 | 
				
			||||||
import java.io.File;
 | 
					 | 
				
			||||||
import java.io.FileInputStream;
 | 
					 | 
				
			||||||
import java.io.FileNotFoundException;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
public class PixelPickerActivity extends WinBoLLActivity implements IWinBoLLActivity {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	public static final String TAG = "PixelPickerActivity";
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	@Override
 | 
					 | 
				
			||||||
	public Activity getActivity() {
 | 
					 | 
				
			||||||
		return this;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	@Override
 | 
					 | 
				
			||||||
	public String getTag() {
 | 
					 | 
				
			||||||
		return TAG;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	private AToolbar mAToolbar;
 | 
					 | 
				
			||||||
	private ImageView imageView;
 | 
					 | 
				
			||||||
	private Bitmap originalBitmap;
 | 
					 | 
				
			||||||
	private TextView infoText;
 | 
					 | 
				
			||||||
	private ViewGroup imageContainer;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	@Override
 | 
					 | 
				
			||||||
	protected void onCreate(Bundle savedInstanceState) {
 | 
					 | 
				
			||||||
		super.onCreate(savedInstanceState);
 | 
					 | 
				
			||||||
		setContentView(R.layout.activity_pixelpicker);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        // 初始化工具栏
 | 
					 | 
				
			||||||
        mAToolbar = (AToolbar) findViewById(R.id.toolbar);
 | 
					 | 
				
			||||||
        setActionBar(mAToolbar);
 | 
					 | 
				
			||||||
        mAToolbar.setSubtitle(R.string.subtitle_activity_pixelpicker);
 | 
					 | 
				
			||||||
        getActionBar().setDisplayHomeAsUpEnabled(true);
 | 
					 | 
				
			||||||
        mAToolbar.setNavigationOnClickListener(new View.OnClickListener() {
 | 
					 | 
				
			||||||
                @Override
 | 
					 | 
				
			||||||
                public void onClick(View v) {
 | 
					 | 
				
			||||||
                    finish();
 | 
					 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
            });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		imageView = findViewById(R.id.imageView);
 | 
					 | 
				
			||||||
		infoText = findViewById(R.id.infoText);
 | 
					 | 
				
			||||||
		imageContainer = findViewById(R.id.imageContainer);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		// 从Intent获取图片路径并加载
 | 
					 | 
				
			||||||
		String imagePath = getIntent().getStringExtra("imagePath");
 | 
					 | 
				
			||||||
		if (imagePath != null) {
 | 
					 | 
				
			||||||
			loadImage(imagePath);
 | 
					 | 
				
			||||||
		} else {
 | 
					 | 
				
			||||||
			infoText.setText("未找到图片路径");
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		// 设置图片点击事件
 | 
					 | 
				
			||||||
		imageContainer.setOnTouchListener(new View.OnTouchListener() {
 | 
					 | 
				
			||||||
				@Override
 | 
					 | 
				
			||||||
				public boolean onTouch(View v, MotionEvent event) {
 | 
					 | 
				
			||||||
					if (event.getAction() == MotionEvent.ACTION_DOWN && originalBitmap != null) {
 | 
					 | 
				
			||||||
						// 计算点击位置在图片上的实际坐标
 | 
					 | 
				
			||||||
						float touchX = event.getX();
 | 
					 | 
				
			||||||
						float touchY = event.getY();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
						int pixelX = -1, pixelY = -1;
 | 
					 | 
				
			||||||
						try {
 | 
					 | 
				
			||||||
							// 获取图片在容器中的实际位置和尺寸
 | 
					 | 
				
			||||||
							int[] imageLocation = new int[2];
 | 
					 | 
				
			||||||
							imageView.getLocationInWindow(imageLocation);
 | 
					 | 
				
			||||||
							int imageWidth = imageView.getWidth();
 | 
					 | 
				
			||||||
							int imageHeight = imageView.getHeight();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
							// 计算缩放比例
 | 
					 | 
				
			||||||
							float scaleX = (float) originalBitmap.getWidth() / imageWidth;
 | 
					 | 
				
			||||||
							float scaleY = (float) originalBitmap.getHeight() / imageHeight;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
							// 调整触摸坐标到图片坐标系
 | 
					 | 
				
			||||||
							float adjustedX = touchX - imageLocation[0];
 | 
					 | 
				
			||||||
							float adjustedY = touchY - imageLocation[1];
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
							// 检查是否在图片范围内
 | 
					 | 
				
			||||||
							if (adjustedX >= 0 && adjustedX <= imageWidth && adjustedY >= 0 && adjustedY <= imageHeight) {
 | 
					 | 
				
			||||||
								// 计算实际像素坐标
 | 
					 | 
				
			||||||
								pixelX = (int) (adjustedX * scaleX);
 | 
					 | 
				
			||||||
								pixelY = (int) (adjustedY * scaleY);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
								// 再次检查像素坐标是否在有效范围内
 | 
					 | 
				
			||||||
								if (pixelX >= 0 && pixelX < originalBitmap.getWidth() && 
 | 
					 | 
				
			||||||
									pixelY >= 0 && pixelY < originalBitmap.getHeight()) {
 | 
					 | 
				
			||||||
									int pixelColor = originalBitmap.getPixel(pixelX, pixelY);
 | 
					 | 
				
			||||||
									showPixelDialog(pixelColor, pixelX, pixelY);
 | 
					 | 
				
			||||||
								} else {
 | 
					 | 
				
			||||||
									Toast.makeText(PixelPickerActivity.this, "像素坐标超出范围", Toast.LENGTH_SHORT).show();
 | 
					 | 
				
			||||||
								}
 | 
					 | 
				
			||||||
							} else {
 | 
					 | 
				
			||||||
								Toast.makeText(PixelPickerActivity.this, "点击位置超出图片显示范围", Toast.LENGTH_SHORT).show();
 | 
					 | 
				
			||||||
							}
 | 
					 | 
				
			||||||
						} catch (Exception e) {
 | 
					 | 
				
			||||||
							e.printStackTrace();
 | 
					 | 
				
			||||||
							Toast.makeText(PixelPickerActivity.this, "计算像素位置失败", Toast.LENGTH_SHORT).show();
 | 
					 | 
				
			||||||
						}
 | 
					 | 
				
			||||||
					}
 | 
					 | 
				
			||||||
					return true;
 | 
					 | 
				
			||||||
				}
 | 
					 | 
				
			||||||
			});
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	/**
 | 
					 | 
				
			||||||
	 * 加载图片
 | 
					 | 
				
			||||||
	 */
 | 
					 | 
				
			||||||
	private void loadImage(String imagePath) {
 | 
					 | 
				
			||||||
		try {
 | 
					 | 
				
			||||||
			File file = new File(imagePath);
 | 
					 | 
				
			||||||
			if (file.exists()) {
 | 
					 | 
				
			||||||
				// 解码图片
 | 
					 | 
				
			||||||
				BitmapFactory.Options options = new BitmapFactory.Options();
 | 
					 | 
				
			||||||
				options.inSampleSize = 1; // 加载原图
 | 
					 | 
				
			||||||
				originalBitmap = BitmapFactory.decodeStream(new FileInputStream(file), null, options);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
				if (originalBitmap != null) {
 | 
					 | 
				
			||||||
					imageView.setImageBitmap(originalBitmap);
 | 
					 | 
				
			||||||
					infoText.setText("图片已加载,点击获取像素值");
 | 
					 | 
				
			||||||
				} else {
 | 
					 | 
				
			||||||
					infoText.setText("图片加载失败");
 | 
					 | 
				
			||||||
				}
 | 
					 | 
				
			||||||
			} else {
 | 
					 | 
				
			||||||
				infoText.setText("图片文件不存在");
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		} catch (FileNotFoundException e) {
 | 
					 | 
				
			||||||
			e.printStackTrace();
 | 
					 | 
				
			||||||
			infoText.setText("图片文件未找到");
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	/**
 | 
					 | 
				
			||||||
	 * 显示像素对话框
 | 
					 | 
				
			||||||
	 */
 | 
					 | 
				
			||||||
	private void showPixelDialog(final int pixelColor, int x, int y) {
 | 
					 | 
				
			||||||
		final Dialog dialog = new Dialog(this);
 | 
					 | 
				
			||||||
		dialog.setContentView(R.layout.dialog_pixel);
 | 
					 | 
				
			||||||
		dialog.setCancelable(true);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		// 设置像素颜色视图背景
 | 
					 | 
				
			||||||
		TextView colorView = dialog.findViewById(R.id.pixelColorView);
 | 
					 | 
				
			||||||
		colorView.setBackgroundColor(pixelColor);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		// 显示颜色信息
 | 
					 | 
				
			||||||
		TextView infoText = dialog.findViewById(R.id.colorInfoText);
 | 
					 | 
				
			||||||
		String colorInfo = String.format(
 | 
					 | 
				
			||||||
			"RGB: (%d, %d, %d)\n" +
 | 
					 | 
				
			||||||
			"ARGB: #%08X\n" +
 | 
					 | 
				
			||||||
			"实际像素位置: (%d, %d)",
 | 
					 | 
				
			||||||
			Color.red(pixelColor),
 | 
					 | 
				
			||||||
			Color.green(pixelColor),
 | 
					 | 
				
			||||||
			Color.blue(pixelColor),
 | 
					 | 
				
			||||||
			pixelColor,
 | 
					 | 
				
			||||||
			x, y);
 | 
					 | 
				
			||||||
		infoText.setText(colorInfo);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		// 设置确定按钮点击事件
 | 
					 | 
				
			||||||
		Button confirmButton = dialog.findViewById(R.id.confirmButton);
 | 
					 | 
				
			||||||
		confirmButton.setOnClickListener(new View.OnClickListener() {
 | 
					 | 
				
			||||||
				@Override
 | 
					 | 
				
			||||||
				public void onClick(View v) {
 | 
					 | 
				
			||||||
					dialog.dismiss();
 | 
					 | 
				
			||||||
					// 可以在这里添加确定后的回调逻辑
 | 
					 | 
				
			||||||
					BackgroundPictureUtils utils = BackgroundPictureUtils.getInstance(PixelPickerActivity.this);
 | 
					 | 
				
			||||||
					BackgroundPictureBean bean = utils.getBackgroundPictureBean();
 | 
					 | 
				
			||||||
					bean.setPixelColor(pixelColor);
 | 
					 | 
				
			||||||
					utils.saveData();
 | 
					 | 
				
			||||||
					Toast.makeText(PixelPickerActivity.this, "已记录像素值", Toast.LENGTH_SHORT).show();
 | 
					 | 
				
			||||||
					setBackgroundColor();
 | 
					 | 
				
			||||||
				}
 | 
					 | 
				
			||||||
			});
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		dialog.show();
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	@Override
 | 
					 | 
				
			||||||
	protected void onDestroy() {
 | 
					 | 
				
			||||||
		super.onDestroy();
 | 
					 | 
				
			||||||
		// 回收Bitmap资源
 | 
					 | 
				
			||||||
		if (originalBitmap != null && !originalBitmap.isRecycled()) {
 | 
					 | 
				
			||||||
			originalBitmap.recycle();
 | 
					 | 
				
			||||||
			originalBitmap = null;
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	void setBackgroundColor() {
 | 
					 | 
				
			||||||
		BackgroundPictureUtils utils = BackgroundPictureUtils.getInstance(PixelPickerActivity.this);
 | 
					 | 
				
			||||||
		BackgroundPictureBean bean = utils.getBackgroundPictureBean();
 | 
					 | 
				
			||||||
		int nPixelColor = bean.getPixelColor();
 | 
					 | 
				
			||||||
		RelativeLayout mainLayout = findViewById(R.id.activitypixelpickerRelativeLayout1);
 | 
					 | 
				
			||||||
		mainLayout.setBackgroundColor(nPixelColor);
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	@Override
 | 
					 | 
				
			||||||
	protected void onResume() {
 | 
					 | 
				
			||||||
		super.onResume();
 | 
					 | 
				
			||||||
		setBackgroundColor();
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    @Override
 | 
					 | 
				
			||||||
    public boolean onOptionsItemSelected(MenuItem item) {
 | 
					 | 
				
			||||||
        if (item.getItemId() == android.R.id.home) {
 | 
					 | 
				
			||||||
            GlobalApplication.getWinBoLLActivityManager().startWinBoLLActivity(getApplicationContext(), BackgroundPictureActivity.class);
 | 
					 | 
				
			||||||
            return true;
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        // 在switch语句中处理每个ID,并在处理完后返回true,未处理的情况返回false。
 | 
					 | 
				
			||||||
        return super.onOptionsItemSelected(item);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	@Override
 | 
					 | 
				
			||||||
	public void onBackPressed() {
 | 
					 | 
				
			||||||
		super.onBackPressed();
 | 
					 | 
				
			||||||
		GlobalApplication.getWinBoLLActivityManager().startWinBoLLActivity(getApplicationContext(), BackgroundPictureActivity.class);
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	
 | 
					 | 
				
			||||||
@@ -1,53 +0,0 @@
 | 
				
			|||||||
package cc.winboll.studio.powerbell.activities;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/**
 | 
					 | 
				
			||||||
 * @Author ZhanGSKen<zhangsken@188.com>
 | 
					 | 
				
			||||||
 * @Date 2025/06/19 20:35
 | 
					 | 
				
			||||||
 * @Describe 应用窗口基类
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
import android.app.Activity;
 | 
					 | 
				
			||||||
import android.os.Bundle;
 | 
					 | 
				
			||||||
import android.view.MenuItem;
 | 
					 | 
				
			||||||
import cc.winboll.studio.libappbase.GlobalApplication;
 | 
					 | 
				
			||||||
import cc.winboll.studio.libappbase.winboll.IWinBoLLActivity;
 | 
					 | 
				
			||||||
import cc.winboll.studio.powerbell.App;
 | 
					 | 
				
			||||||
import cc.winboll.studio.powerbell.MainActivity;
 | 
					 | 
				
			||||||
import cc.winboll.studio.powerbell.R;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
public abstract class WinBoLLActivity extends Activity implements IWinBoLLActivity {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    public static final String TAG = "WinBoLLActivity";
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    @Override
 | 
					 | 
				
			||||||
    protected void onCreate(Bundle savedInstanceState) {
 | 
					 | 
				
			||||||
        super.onCreate(savedInstanceState);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    @Override
 | 
					 | 
				
			||||||
    protected void onPostCreate(Bundle savedInstanceState) {
 | 
					 | 
				
			||||||
        super.onPostCreate(savedInstanceState);
 | 
					 | 
				
			||||||
        GlobalApplication.getWinBoLLActivityManager().add(this);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    @Override
 | 
					 | 
				
			||||||
    protected void onDestroy() {
 | 
					 | 
				
			||||||
        super.onDestroy();
 | 
					 | 
				
			||||||
        GlobalApplication.getWinBoLLActivityManager().registeRemove(this);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    @Override
 | 
					 | 
				
			||||||
    public boolean onOptionsItemSelected(MenuItem item) {
 | 
					 | 
				
			||||||
        if (item.getItemId() == android.R.id.home) {
 | 
					 | 
				
			||||||
            GlobalApplication.getWinBoLLActivityManager().startWinBoLLActivity(getApplicationContext(), MainActivity.class);
 | 
					 | 
				
			||||||
            return true;
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        // 在switch语句中处理每个ID,并在处理完后返回true,未处理的情况返回false。
 | 
					 | 
				
			||||||
        return super.onOptionsItemSelected(item);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	@Override
 | 
					 | 
				
			||||||
	public void onBackPressed() {
 | 
					 | 
				
			||||||
		super.onBackPressed();
 | 
					 | 
				
			||||||
		GlobalApplication.getWinBoLLActivityManager().startWinBoLLActivity(getApplicationContext(), MainActivity.class);
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@@ -17,8 +17,6 @@ public class BackgroundPictureBean extends BaseBean {
 | 
				
			|||||||
    int backgroundWidth = 100;
 | 
					    int backgroundWidth = 100;
 | 
				
			||||||
    int backgroundHeight = 100;
 | 
					    int backgroundHeight = 100;
 | 
				
			||||||
    boolean isUseBackgroundFile = false;
 | 
					    boolean isUseBackgroundFile = false;
 | 
				
			||||||
	// 图片拾取像素颜色
 | 
					 | 
				
			||||||
	int pixelColor = 0;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public BackgroundPictureBean() {
 | 
					    public BackgroundPictureBean() {
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@@ -27,14 +25,6 @@ public class BackgroundPictureBean extends BaseBean {
 | 
				
			|||||||
        this.isUseBackgroundFile = isUseBackgroundFile;
 | 
					        this.isUseBackgroundFile = isUseBackgroundFile;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	public void setPixelColor(int pixelColor) {
 | 
					 | 
				
			||||||
		this.pixelColor = pixelColor;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	public int getPixelColor() {
 | 
					 | 
				
			||||||
		return pixelColor;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    public void setBackgroundWidth(int backgroundWidth) {
 | 
					    public void setBackgroundWidth(int backgroundWidth) {
 | 
				
			||||||
        this.backgroundWidth = backgroundWidth;
 | 
					        this.backgroundWidth = backgroundWidth;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@@ -71,7 +61,6 @@ public class BackgroundPictureBean extends BaseBean {
 | 
				
			|||||||
        jsonWriter.name("backgroundWidth").value(bean.getBackgroundWidth());
 | 
					        jsonWriter.name("backgroundWidth").value(bean.getBackgroundWidth());
 | 
				
			||||||
        jsonWriter.name("backgroundHeight").value(bean.getBackgroundHeight());
 | 
					        jsonWriter.name("backgroundHeight").value(bean.getBackgroundHeight());
 | 
				
			||||||
        jsonWriter.name("isUseBackgroundFile").value(bean.isUseBackgroundFile());
 | 
					        jsonWriter.name("isUseBackgroundFile").value(bean.isUseBackgroundFile());
 | 
				
			||||||
		jsonWriter.name("pixelColor").value(bean.getPixelColor());
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
@@ -86,8 +75,6 @@ public class BackgroundPictureBean extends BaseBean {
 | 
				
			|||||||
                bean.setBackgroundHeight(jsonReader.nextInt());
 | 
					                bean.setBackgroundHeight(jsonReader.nextInt());
 | 
				
			||||||
            } else if (name.equals("isUseBackgroundFile")) {
 | 
					            } else if (name.equals("isUseBackgroundFile")) {
 | 
				
			||||||
                bean.setIsUseBackgroundFile(jsonReader.nextBoolean());
 | 
					                bean.setIsUseBackgroundFile(jsonReader.nextBoolean());
 | 
				
			||||||
            } else if (name.equals("pixelColor")) {
 | 
					 | 
				
			||||||
                bean.setPixelColor(jsonReader.nextInt());
 | 
					 | 
				
			||||||
            } else {
 | 
					            } else {
 | 
				
			||||||
                jsonReader.skipValue();
 | 
					                jsonReader.skipValue();
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -311,11 +311,11 @@ public class MainViewFragment extends Fragment {
 | 
				
			|||||||
        LogUtils.d(TAG, String.format("fBackgroundFilePath.exists() %s", fBackgroundFilePath.exists()));
 | 
					        LogUtils.d(TAG, String.format("fBackgroundFilePath.exists() %s", fBackgroundFilePath.exists()));
 | 
				
			||||||
        if (bean.isUseBackgroundFile() && fBackgroundFilePath.exists()) {
 | 
					        if (bean.isUseBackgroundFile() && fBackgroundFilePath.exists()) {
 | 
				
			||||||
            Drawable drawableBackground = Drawable.createFromPath(szBackgroundFilePath);
 | 
					            Drawable drawableBackground = Drawable.createFromPath(szBackgroundFilePath);
 | 
				
			||||||
            //drawableBackground.setAlpha(120);
 | 
					            drawableBackground.setAlpha(120);
 | 
				
			||||||
            imageView.setImageDrawable(drawableBackground);
 | 
					            imageView.setImageDrawable(drawableBackground);
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            Drawable drawableBackground = getActivity().getDrawable(R.drawable.blank10x10);
 | 
					            Drawable drawableBackground = getActivity().getDrawable(R.drawable.blank10x10);
 | 
				
			||||||
            //drawableBackground.setAlpha(120);
 | 
					            drawableBackground.setAlpha(120);
 | 
				
			||||||
            imageView.setImageDrawable(drawableBackground);
 | 
					            imageView.setImageDrawable(drawableBackground);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
<?xml version="1.0" encoding="utf-8"?>
 | 
					<?xml version="1.0" encoding="utf-8"?>
 | 
				
			||||||
<LinearLayout
 | 
					<RelativeLayout
 | 
				
			||||||
	xmlns:android="http://schemas.android.com/apk/res/android"
 | 
						xmlns:android="http://schemas.android.com/apk/res/android"
 | 
				
			||||||
	xmlns:app="http://schemas.android.com/apk/res-auto"
 | 
						xmlns:app="http://schemas.android.com/apk/res-auto"
 | 
				
			||||||
	android:orientation="vertical"
 | 
						android:orientation="vertical"
 | 
				
			||||||
@@ -12,110 +12,83 @@
 | 
				
			|||||||
		android:id="@+id/toolbar"
 | 
							android:id="@+id/toolbar"
 | 
				
			||||||
		style="@style/DefaultAToolbar"/>
 | 
							style="@style/DefaultAToolbar"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	<RelativeLayout
 | 
						<ImageView
 | 
				
			||||||
		android:layout_width="wrap_content"
 | 
							android:layout_width="match_parent"
 | 
				
			||||||
		android:layout_height="wrap_content">
 | 
							android:layout_height="match_parent"
 | 
				
			||||||
 | 
							android:id="@+id/activitybackgroundpictureImageView1"
 | 
				
			||||||
 | 
							android:layout_below="@id/toolbar">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						</ImageView>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						<LinearLayout
 | 
				
			||||||
 | 
							android:orientation="vertical"
 | 
				
			||||||
 | 
							android:layout_width="match_parent"
 | 
				
			||||||
 | 
							android:layout_height="wrap_content"
 | 
				
			||||||
 | 
							android:layout_below="@id/toolbar">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		<RelativeLayout
 | 
							<RelativeLayout
 | 
				
			||||||
			android:layout_width="match_parent"
 | 
								android:layout_width="wrap_content"
 | 
				
			||||||
			android:layout_height="match_parent"
 | 
								android:layout_height="wrap_content">
 | 
				
			||||||
			android:id="@+id/activitybackgroundpictureRelativeLayout1"/>
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								<cc.winboll.studio.libaes.views.AButton
 | 
				
			||||||
 | 
									android:layout_width="160dp"
 | 
				
			||||||
 | 
									android:layout_height="36dp"
 | 
				
			||||||
 | 
									android:text="Origin BG"
 | 
				
			||||||
 | 
									android:id="@+id/activitybackgroundpictureAButton5"
 | 
				
			||||||
 | 
									android:layout_alignParentLeft="true"
 | 
				
			||||||
 | 
									android:layout_margin="5dp"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		<ImageView
 | 
								<cc.winboll.studio.libaes.views.AButton
 | 
				
			||||||
			android:layout_width="match_parent"
 | 
									android:layout_width="160dp"
 | 
				
			||||||
			android:layout_height="match_parent"
 | 
									android:layout_height="36dp"
 | 
				
			||||||
			android:id="@+id/activitybackgroundpictureImageView1"
 | 
									android:text="Received BG"
 | 
				
			||||||
			android:layout_below="@id/toolbar">
 | 
									android:id="@+id/activitybackgroundpictureAButton4"
 | 
				
			||||||
 | 
									android:layout_alignParentRight="true"
 | 
				
			||||||
 | 
									android:layout_margin="5dp"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		</ImageView>
 | 
							</RelativeLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		<LinearLayout
 | 
							<LinearLayout
 | 
				
			||||||
			android:orientation="vertical"
 | 
								android:orientation="horizontal"
 | 
				
			||||||
			android:layout_width="match_parent"
 | 
								android:layout_width="match_parent"
 | 
				
			||||||
			android:layout_height="wrap_content"
 | 
								android:layout_height="wrap_content"
 | 
				
			||||||
			android:layout_below="@id/toolbar">
 | 
								android:gravity="right">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			<RelativeLayout
 | 
								<cc.winboll.studio.libaes.views.AButton
 | 
				
			||||||
				android:layout_width="wrap_content"
 | 
									android:layout_width="50dp"
 | 
				
			||||||
				android:layout_height="wrap_content">
 | 
									android:layout_height="36dp"
 | 
				
			||||||
 | 
									android:text="◎"
 | 
				
			||||||
 | 
									android:layout_gravity="center_vertical"
 | 
				
			||||||
 | 
									android:layout_margin="10dp"
 | 
				
			||||||
 | 
									android:id="@+id/activitybackgroundpictureAButton1"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				<cc.winboll.studio.libaes.views.AButton
 | 
								<cc.winboll.studio.libaes.views.AButton
 | 
				
			||||||
					android:layout_width="160dp"
 | 
									android:layout_width="50dp"
 | 
				
			||||||
					android:layout_height="36dp"
 | 
									android:layout_height="36dp"
 | 
				
			||||||
					android:text="Origin BG"
 | 
									android:text="☑"
 | 
				
			||||||
					android:id="@+id/activitybackgroundpictureAButton5"
 | 
									android:layout_gravity="center_vertical"
 | 
				
			||||||
					android:layout_alignParentLeft="true"
 | 
									android:layout_margin="10dp"
 | 
				
			||||||
					android:layout_margin="5dp"/>
 | 
									android:id="@+id/activitybackgroundpictureAButton2"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				<cc.winboll.studio.libaes.views.AButton
 | 
								<cc.winboll.studio.libaes.views.AButton
 | 
				
			||||||
					android:layout_width="160dp"
 | 
									android:layout_width="50dp"
 | 
				
			||||||
					android:layout_height="36dp"
 | 
									android:layout_height="36dp"
 | 
				
			||||||
					android:text="Received BG"
 | 
									android:text="[+]"
 | 
				
			||||||
					android:id="@+id/activitybackgroundpictureAButton4"
 | 
									android:layout_gravity="center_vertical"
 | 
				
			||||||
					android:layout_alignParentRight="true"
 | 
									android:layout_margin="10dp"
 | 
				
			||||||
					android:layout_margin="5dp"/>
 | 
									android:id="@+id/activitybackgroundpictureAButton3"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			</RelativeLayout>
 | 
								<cc.winboll.studio.libaes.views.AButton
 | 
				
			||||||
 | 
									android:layout_width="50dp"
 | 
				
			||||||
			<LinearLayout
 | 
									android:layout_height="36dp"
 | 
				
			||||||
				android:orientation="horizontal"
 | 
									android:text="[+~]"
 | 
				
			||||||
				android:layout_width="match_parent"
 | 
									android:layout_gravity="center_vertical"
 | 
				
			||||||
				android:layout_height="wrap_content"
 | 
									android:layout_margin="10dp"
 | 
				
			||||||
				android:gravity="right">
 | 
									android:id="@+id/activitybackgroundpictureAButton6"/>
 | 
				
			||||||
 | 
					 | 
				
			||||||
				<cc.winboll.studio.libaes.views.AButton
 | 
					 | 
				
			||||||
					android:layout_width="50dp"
 | 
					 | 
				
			||||||
					android:layout_height="36dp"
 | 
					 | 
				
			||||||
					android:text="◎"
 | 
					 | 
				
			||||||
					android:layout_gravity="center_vertical"
 | 
					 | 
				
			||||||
					android:layout_margin="5dp"
 | 
					 | 
				
			||||||
					android:id="@+id/activitybackgroundpictureAButton1"/>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
				<cc.winboll.studio.libaes.views.AButton
 | 
					 | 
				
			||||||
					android:layout_width="50dp"
 | 
					 | 
				
			||||||
					android:layout_height="36dp"
 | 
					 | 
				
			||||||
					android:text="☑"
 | 
					 | 
				
			||||||
					android:layout_gravity="center_vertical"
 | 
					 | 
				
			||||||
					android:layout_margin="5dp"
 | 
					 | 
				
			||||||
					android:id="@+id/activitybackgroundpictureAButton2"/>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
				<cc.winboll.studio.libaes.views.AButton
 | 
					 | 
				
			||||||
					android:layout_width="50dp"
 | 
					 | 
				
			||||||
					android:layout_height="36dp"
 | 
					 | 
				
			||||||
					android:text="[+]"
 | 
					 | 
				
			||||||
					android:layout_gravity="center_vertical"
 | 
					 | 
				
			||||||
					android:layout_margin="5dp"
 | 
					 | 
				
			||||||
					android:id="@+id/activitybackgroundpictureAButton3"/>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
				<cc.winboll.studio.libaes.views.AButton
 | 
					 | 
				
			||||||
					android:layout_width="50dp"
 | 
					 | 
				
			||||||
					android:layout_height="36dp"
 | 
					 | 
				
			||||||
					android:text="[+~]"
 | 
					 | 
				
			||||||
					android:layout_gravity="center_vertical"
 | 
					 | 
				
			||||||
					android:layout_margin="5dp"
 | 
					 | 
				
			||||||
					android:id="@+id/activitybackgroundpictureAButton6"/>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
				<cc.winboll.studio.libaes.views.AButton
 | 
					 | 
				
			||||||
					android:layout_width="50dp"
 | 
					 | 
				
			||||||
					android:layout_height="36dp"
 | 
					 | 
				
			||||||
					android:text="[◐]"
 | 
					 | 
				
			||||||
					android:layout_gravity="center_vertical"
 | 
					 | 
				
			||||||
					android:layout_margin="5dp"
 | 
					 | 
				
			||||||
					android:id="@+id/activitybackgroundpictureAButton7"/>
 | 
					 | 
				
			||||||
				
 | 
					 | 
				
			||||||
				<cc.winboll.studio.libaes.views.AButton
 | 
					 | 
				
			||||||
					android:layout_width="50dp"
 | 
					 | 
				
			||||||
					android:layout_height="36dp"
 | 
					 | 
				
			||||||
					android:text="[○]"
 | 
					 | 
				
			||||||
					android:layout_gravity="center_vertical"
 | 
					 | 
				
			||||||
					android:layout_margin="5dp"
 | 
					 | 
				
			||||||
					android:id="@+id/activitybackgroundpictureAButton8"/>
 | 
					 | 
				
			||||||
				
 | 
					 | 
				
			||||||
			</LinearLayout>
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
		</LinearLayout>
 | 
							</LinearLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	</RelativeLayout>
 | 
						</LinearLayout>
 | 
				
			||||||
</LinearLayout>
 | 
					
 | 
				
			||||||
 | 
					</RelativeLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,34 +2,42 @@
 | 
				
			|||||||
<LinearLayout
 | 
					<LinearLayout
 | 
				
			||||||
	xmlns:android="http://schemas.android.com/apk/res/android"
 | 
						xmlns:android="http://schemas.android.com/apk/res/android"
 | 
				
			||||||
	xmlns:app="http://schemas.android.com/apk/res-auto"
 | 
						xmlns:app="http://schemas.android.com/apk/res-auto"
 | 
				
			||||||
	android:layout_width="match_parent"
 | 
					    android:layout_width="match_parent"
 | 
				
			||||||
	android:layout_height="match_parent"
 | 
						android:layout_height="match_parent"
 | 
				
			||||||
	android:orientation="vertical">
 | 
						android:orientation="vertical">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	<cc.winboll.studio.libaes.views.AToolbar
 | 
						<LinearLayout
 | 
				
			||||||
 | 
							android:orientation="horizontal"
 | 
				
			||||||
		android:layout_width="match_parent"
 | 
							android:layout_width="match_parent"
 | 
				
			||||||
		android:layout_height="@dimen/toolbar_height"
 | 
							android:layout_height="wrap_content">
 | 
				
			||||||
		android:id="@+id/toolbar"
 | 
					 | 
				
			||||||
		android:gravity="center_vertical"
 | 
					 | 
				
			||||||
		style="@style/DefaultAToolbar"/>
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	<RelativeLayout
 | 
							<cc.winboll.studio.libaes.views.AToolbar
 | 
				
			||||||
		android:layout_width="match_parent"
 | 
					 | 
				
			||||||
		android:layout_height="0dp"
 | 
					 | 
				
			||||||
		android:layout_weight="1.0">
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		<RelativeLayout
 | 
					 | 
				
			||||||
			android:layout_width="match_parent"
 | 
								android:layout_width="match_parent"
 | 
				
			||||||
			android:layout_height="match_parent"
 | 
								android:layout_height="@dimen/toolbar_height"
 | 
				
			||||||
			android:id="@+id/activitymainRelativeLayout1"
 | 
								android:id="@+id/toolbar"
 | 
				
			||||||
			android:background="#FFEE2121"/>
 | 
								android:gravity="center_vertical"
 | 
				
			||||||
 | 
								style="@style/DefaultAToolbar"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						</LinearLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						<LinearLayout
 | 
				
			||||||
 | 
							android:orientation="vertical"
 | 
				
			||||||
 | 
							android:layout_width="match_parent"
 | 
				
			||||||
 | 
							android:layout_height="wrap_content"
 | 
				
			||||||
 | 
							android:layout_weight="1.0">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		<FrameLayout
 | 
							<FrameLayout
 | 
				
			||||||
			android:layout_width="match_parent"
 | 
								android:layout_width="match_parent"
 | 
				
			||||||
			android:layout_height="match_parent"
 | 
								android:layout_height="match_parent"
 | 
				
			||||||
			android:id="@+id/activitymainFrameLayout1"/>
 | 
								android:id="@+id/activitymainFrameLayout1"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	</RelativeLayout>
 | 
						</LinearLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						<cc.winboll.studio.libappbase.LogView
 | 
				
			||||||
 | 
							android:orientation="horizontal"
 | 
				
			||||||
 | 
							android:layout_width="match_parent"
 | 
				
			||||||
 | 
							android:layout_height="200dp"
 | 
				
			||||||
 | 
							android:id="@+id/logview"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
</LinearLayout>
 | 
					</LinearLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,54 +0,0 @@
 | 
				
			|||||||
<?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:layout_width="match_parent"
 | 
					 | 
				
			||||||
	android:layout_height="match_parent"
 | 
					 | 
				
			||||||
	android:orientation="vertical">
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	<cc.winboll.studio.libaes.views.AToolbar
 | 
					 | 
				
			||||||
		android:layout_width="match_parent"
 | 
					 | 
				
			||||||
		android:layout_height="@dimen/toolbar_height"
 | 
					 | 
				
			||||||
		android:id="@+id/toolbar"
 | 
					 | 
				
			||||||
		android:gravity="center_vertical"
 | 
					 | 
				
			||||||
		style="@style/DefaultAToolbar"/>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	<RelativeLayout
 | 
					 | 
				
			||||||
		android:layout_width="match_parent"
 | 
					 | 
				
			||||||
		android:layout_height="0dp"
 | 
					 | 
				
			||||||
		android:layout_weight="1.0">
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		<RelativeLayout
 | 
					 | 
				
			||||||
			android:layout_width="match_parent"
 | 
					 | 
				
			||||||
			android:layout_height="match_parent"
 | 
					 | 
				
			||||||
			android:background="#FFEE2121"
 | 
					 | 
				
			||||||
			android:id="@+id/activitypixelpickerRelativeLayout1"/>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		<FrameLayout
 | 
					 | 
				
			||||||
			android:id="@+id/imageContainer"
 | 
					 | 
				
			||||||
			android:layout_width="match_parent"
 | 
					 | 
				
			||||||
			android:layout_height="match_parent">
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
			<ImageView
 | 
					 | 
				
			||||||
				android:id="@+id/imageView"
 | 
					 | 
				
			||||||
				android:layout_width="match_parent"
 | 
					 | 
				
			||||||
				android:layout_height="match_parent"
 | 
					 | 
				
			||||||
				android:src="@drawable/ic_launcher"/>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		</FrameLayout>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		<TextView
 | 
					 | 
				
			||||||
			android:id="@+id/infoText"
 | 
					 | 
				
			||||||
			android:layout_width="wrap_content"
 | 
					 | 
				
			||||||
			android:layout_height="wrap_content"
 | 
					 | 
				
			||||||
			android:layout_alignParentBottom="true"
 | 
					 | 
				
			||||||
			android:layout_centerHorizontal="true"
 | 
					 | 
				
			||||||
			android:padding="10dp"
 | 
					 | 
				
			||||||
			android:background="#80000000"
 | 
					 | 
				
			||||||
			android:textColor="#FFFFFF"
 | 
					 | 
				
			||||||
			android:text="点击图片获取像素值"/>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	</RelativeLayout>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
</LinearLayout>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
@@ -1,32 +0,0 @@
 | 
				
			|||||||
<?xml version="1.0" encoding="utf-8"?>
 | 
					 | 
				
			||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
 | 
					 | 
				
			||||||
    android:layout_width="240dp"
 | 
					 | 
				
			||||||
    android:layout_height="wrap_content"
 | 
					 | 
				
			||||||
    android:orientation="vertical"
 | 
					 | 
				
			||||||
    android:padding="16dp">
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    <TextView
 | 
					 | 
				
			||||||
        android:id="@+id/pixelColorView"
 | 
					 | 
				
			||||||
        android:layout_width="200dp"
 | 
					 | 
				
			||||||
        android:layout_height="200dp"
 | 
					 | 
				
			||||||
        android:layout_gravity="center_horizontal" />
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    <TextView
 | 
					 | 
				
			||||||
        android:id="@+id/colorInfoText"
 | 
					 | 
				
			||||||
        android:layout_width="wrap_content"
 | 
					 | 
				
			||||||
        android:layout_height="wrap_content"
 | 
					 | 
				
			||||||
        android:layout_gravity="center_horizontal"
 | 
					 | 
				
			||||||
        android:layout_marginTop="8dp"
 | 
					 | 
				
			||||||
        android:textColor="#333333"
 | 
					 | 
				
			||||||
        android:textSize="14sp" />
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    <Button
 | 
					 | 
				
			||||||
        android:id="@+id/confirmButton"
 | 
					 | 
				
			||||||
        android:layout_width="match_parent"
 | 
					 | 
				
			||||||
        android:layout_height="wrap_content"
 | 
					 | 
				
			||||||
        android:layout_marginTop="16dp"
 | 
					 | 
				
			||||||
        android:background="@android:color/holo_blue_light"
 | 
					 | 
				
			||||||
        android:text="确定"
 | 
					 | 
				
			||||||
        android:textColor="@android:color/white" />
 | 
					 | 
				
			||||||
</LinearLayout>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
@@ -43,6 +43,15 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
			</LinearLayout>
 | 
								</LinearLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								<TextView
 | 
				
			||||||
 | 
									android:layout_width="match_parent"
 | 
				
			||||||
 | 
									android:layout_height="wrap_content"
 | 
				
			||||||
 | 
									android:text="Tips"
 | 
				
			||||||
 | 
									android:textSize="@dimen/text_content_size"
 | 
				
			||||||
 | 
									android:id="@+id/fragmentandroidviewTextView1"
 | 
				
			||||||
 | 
									android:background="@drawable/bg_frame"
 | 
				
			||||||
 | 
									android:padding="10dp"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		</LinearLayout>
 | 
							</LinearLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		<LinearLayout
 | 
							<LinearLayout
 | 
				
			||||||
@@ -196,21 +205,6 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
		</LinearLayout>
 | 
							</LinearLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		<LinearLayout
 | 
					 | 
				
			||||||
			android:layout_height="wrap_content"
 | 
					 | 
				
			||||||
			android:layout_width="match_parent">
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
			<TextView
 | 
					 | 
				
			||||||
				android:layout_width="match_parent"
 | 
					 | 
				
			||||||
				android:layout_height="wrap_content"
 | 
					 | 
				
			||||||
				android:text="Tips"
 | 
					 | 
				
			||||||
				android:textSize="@dimen/text_content_size"
 | 
					 | 
				
			||||||
				android:id="@+id/fragmentandroidviewTextView1"
 | 
					 | 
				
			||||||
				android:background="@drawable/bg_frame"
 | 
					 | 
				
			||||||
				android:padding="10dp"/>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		</LinearLayout>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	</LinearLayout>
 | 
						</LinearLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
</RelativeLayout>
 | 
					</RelativeLayout>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -9,9 +9,6 @@
 | 
				
			|||||||
    <item
 | 
					    <item
 | 
				
			||||||
        android:id="@+id/action_changepicture"
 | 
					        android:id="@+id/action_changepicture"
 | 
				
			||||||
        android:title="@string/item_changepicture"/>
 | 
					        android:title="@string/item_changepicture"/>
 | 
				
			||||||
    <item
 | 
					 | 
				
			||||||
        android:id="@+id/action_log"
 | 
					 | 
				
			||||||
        android:title="@string/item_logview"/>
 | 
					 | 
				
			||||||
    <item
 | 
					    <item
 | 
				
			||||||
        android:id="@+id/action_about"
 | 
					        android:id="@+id/action_about"
 | 
				
			||||||
        android:title="@string/item_aboutview"/>
 | 
					        android:title="@string/item_aboutview"/>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -15,7 +15,6 @@
 | 
				
			|||||||
    <string name="texthint_CustomSlideToCleanRecord">Slide Right To Clean Up APP Record.</string>
 | 
					    <string name="texthint_CustomSlideToCleanRecord">Slide Right To Clean Up APP Record.</string>
 | 
				
			||||||
    <string name="subtitle_activity_clearrecord">清理记录</string>
 | 
					    <string name="subtitle_activity_clearrecord">清理记录</string>
 | 
				
			||||||
    <string name="subtitle_activity_backgroundpicture">更换背景图片</string>
 | 
					    <string name="subtitle_activity_backgroundpicture">更换背景图片</string>
 | 
				
			||||||
    <string name="subtitle_activity_pixelpicker">背景像素拾取</string>
 | 
					 | 
				
			||||||
    <string name="subtitle_activity_about">关于应用</string>
 | 
					    <string name="subtitle_activity_about">关于应用</string>
 | 
				
			||||||
    <string name="msg_AOHPCTCSeekBar_ClearRecord">>>>Seek 100% To Clear Battery Record.>>></string>
 | 
					    <string name="msg_AOHPCTCSeekBar_ClearRecord">>>>Seek 100% To Clear Battery Record.>>></string>
 | 
				
			||||||
</resources>
 | 
					</resources>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -18,7 +18,6 @@
 | 
				
			|||||||
    <string name="texthint_CustomSlideToCleanRecord">Slide Right To Clean Up APP Record.</string>
 | 
					    <string name="texthint_CustomSlideToCleanRecord">Slide Right To Clean Up APP Record.</string>
 | 
				
			||||||
    <string name="subtitle_activity_clearrecord">Clean Record</string>
 | 
					    <string name="subtitle_activity_clearrecord">Clean Record</string>
 | 
				
			||||||
    <string name="subtitle_activity_backgroundpicture">Background Picture</string>
 | 
					    <string name="subtitle_activity_backgroundpicture">Background Picture</string>
 | 
				
			||||||
    <string name="subtitle_activity_pixelpicker">Pixel Picker</string>
 | 
					 | 
				
			||||||
    <string name="subtitle_activity_about">About The APP</string>
 | 
					    <string name="subtitle_activity_about">About The APP</string>
 | 
				
			||||||
    <string name="msg_AOHPCTCSeekBar_ClearRecord">>>>Seek 100% To Clear Battery Record.>>></string>
 | 
					    <string name="msg_AOHPCTCSeekBar_ClearRecord">>>>Seek 100% To Clear Battery Record.>>></string>
 | 
				
			||||||
</resources>
 | 
					</resources>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -22,6 +22,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
// JC 项目编译设置
 | 
					// JC 项目编译设置
 | 
				
			||||||
//include ':jc'
 | 
					//include ':jc'
 | 
				
			||||||
 | 
					//include ':libjc'
 | 
				
			||||||
//rootProject.name = "jc"
 | 
					//rootProject.name = "jc"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// AES 项目编译设置
 | 
					// AES 项目编译设置
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user