listTTSSpeakTextBean) {
+ // 重置播放退出标志位
+ isExist = false;
+
+ // 开始播放
+ if (mTextToSpeech == null) {
+ //ToastUtils.show("mTextToSpeech == null");
+ // 创建TextToSpeech实例
+ mTextToSpeech = new TextToSpeech(mContext, new TextToSpeech.OnInitListener() {
+ @Override
+ public void onInit(int i) {
+ if (i == TextToSpeech.SUCCESS) {
+ speekTTSList(listTTSSpeakTextBean);
+ } else {
+ LogUtils.d(TAG, "TTS init failed : " + Integer.toString(i) + ". The app [https://play.google.com/store/apps/details?id=com.google.android.tts] maybe fix this TTS probrem. ");
+ }
+ }
+ });
+ mTextToSpeech.setOnUtteranceProgressListener(mUtteranceProgressListener);
+ } else {
+ if (mTextToSpeech != null && listTTSSpeakTextBean != null && listTTSSpeakTextBean.size() > 0) {
+ // 清理过期的悬浮窗
+ if (mWindowManager != null && mView != null) {
+ try {
+ mWindowManager.removeView(mView);
+ mView = null;
+ } catch(Exception e) {
+ LogUtils.d(TAG, e, Thread.currentThread().getStackTrace());
+ }
+ }
+
+ // 显示悬浮窗
+ initWindow();
+
+ // 播放 TTS 语音
+ //
+ //ToastUtils.show("initWindow done.");
+ // 设置延迟间隔
+ int nDelay = listTTSSpeakTextBean.get(0).mnDelay;
+ try {
+ Thread.sleep(nDelay);
+ } catch (InterruptedException e) {
+ LogUtils.d(TAG, e, Thread.currentThread().getStackTrace());
+ }
+ //ToastUtils.show("Delay done.");
+ for (int speakPosition = 0; speakPosition < listTTSSpeakTextBean.size() && !isExist; speakPosition++) {
+ // 播放语音
+ String szSpeakContent = listTTSSpeakTextBean.get(speakPosition).mszSpeakContent;
+ isExist = (listTTSSpeakTextBean.size() - 2 < speakPosition);
+ //ToastUtils.show("for isExist is : " + Boolean.toString(isExist));
+ if (speakPosition == 0) {
+ mTextToSpeech.speak(szSpeakContent, TextToSpeech.QUEUE_FLUSH, null, UNIQUE_ID);
+ } else {
+ mTextToSpeech.speak(szSpeakContent, TextToSpeech.QUEUE_ADD, null, UNIQUE_ID);
+ }
+ //ToastUtils.show("mTextToSpeech.speak");
+ }
+ }
+ }
+ }
+
+ UtteranceProgressListener mUtteranceProgressListener = new UtteranceProgressListener() {
+ @Override
+ public void onStart(String utteranceId) {
+ LogUtils.d(TAG, "播放开始");
+ }
+
+ @Override
+ public void onDone(String utteranceId) {
+ LogUtils.d(TAG, "播放结束");
+ //ToastUtils.show("isExist is : " + Boolean.toString(isExist));
+ // 关闭悬浮窗
+ if (isExist && mWindowManager != null && mView != null) {
+ LogUtils.d(TAG, "关闭悬浮窗");
+ mWindowManager.removeView(mView);
+ }
+ }
+
+ @Override
+ public void onError(String utteranceId) {
+ LogUtils.d(TAG, "播放出错");
+ }
+ };
+
+
+ //
+ // 初始化 TTS 悬浮窗
+ //
+ private void initWindow() {
+ //ToastUtils.show("initWindow");
+ // 创建布局参数
+ WindowManager.LayoutParams params = new WindowManager.LayoutParams();
+ //这里需要进行不同的设置
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
+ params.type = WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY;
+ } else {
+ params.type = WindowManager.LayoutParams.TYPE_PHONE;
+ }
+ //设置透明度
+ params.alpha = 0.9f;
+ //设置内部视图对齐方式
+ params.gravity = Gravity.RIGHT | Gravity.BOTTOM;
+ //窗口的右上角角坐标
+ params.x = 20;
+ params.y = 20;
+ //是指定窗口的像素格式为 RGBA_8888。
+ //使用 RGBA_8888 像素格式的窗口可以在保持高质量图像的同时实现透明度效果。
+ params.format = PixelFormat.RGBA_8888;
+ //设置窗口的宽高,这里为自动
+ params.width = WindowManager.LayoutParams.WRAP_CONTENT;
+ params.height = WindowManager.LayoutParams.WRAP_CONTENT;
+ //这段非常重要,是后续是否穿透点击的关键
+ params.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE //表示悬浮窗口不需要获取焦点,这样用户点击悬浮窗口以外的区域,就不需要关闭悬浮窗口。
+ | WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL;//表示悬浮窗口不会阻塞事件传递,即用户点击悬浮窗口以外的区域时,事件会传递给后面的窗口处理。
+ //这里的引入布局文件的方式,也可以动态添加控件
+ mView = View.inflate(mContext, R.layout.view_tts_back, null);
+ LinearLayout llMain = mView.findViewById(R.id.viewttsbackLinearLayout1);
+ llMain.setOnClickListener(new View.OnClickListener(){
+
+ @Override
+ public void onClick(View view) {
+ //ToastUtils.show("onClick");
+ isExist = true;
+ if (mTextToSpeech != null) {
+ mTextToSpeech.stop();
+ }
+ if (mWindowManager != null && mView != null) {
+ mWindowManager.removeView(mView);
+ mView = null;
+ }
+ }
+ });
+ mWindowManager.addView(mView, params);
+ }
+}
diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/ThemeUtil.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/ThemeUtil.java
new file mode 100644
index 0000000..22f0243
--- /dev/null
+++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/ThemeUtil.java
@@ -0,0 +1,47 @@
+package cc.winboll.studio.mymessagemanager.utils;
+
+/**
+ * @Author ZhanGSKen@QQ.COM
+ * @Date 2024/07/19 14:30:57
+ * @Describe 应用主题工具类
+ */
+import cc.winboll.studio.mymessagemanager.R;
+
+public class ThemeUtil {
+/*
+ public static final String SZ_THEME_TYPE = "SZ_THEME_TYPE";
+ public static final String THEME_PREFERENCES = "THEME_PREFERENCES";
+
+ public enum BaseTheme { DEFAULT(0), SKY(1), GOLDEN(2);
+ static String[] _mlistName = { "默认主题", "天空主题", "辉煌主题" };
+ private int value;
+ private BaseTheme(int value) {
+ this.value = value;
+ }
+ }
+
+ public static int getThemeID(BaseTheme baseTheme) {
+ int themeId;
+ if (baseTheme == BaseTheme.DEFAULT) {
+ themeId = R.style.AppTheme_Default;
+ } else if (baseTheme == BaseTheme.SKY) {
+ themeId = R.style.AppTheme_Sky;
+ } else if (baseTheme == BaseTheme.GOLDEN) {
+ themeId = R.style.AppTheme_Golden;
+ } else {
+ themeId = R.style.AppTheme_Default;
+ }
+ return themeId;
+ }
+
+ public static BaseTheme getTheme(int nThemeID) {
+ if (nThemeID == R.style.AppTheme_Sky) {
+ return BaseTheme.SKY;
+ } else if (nThemeID == R.style.AppTheme_Golden) {
+ return BaseTheme.GOLDEN;
+ } else {
+ return BaseTheme.DEFAULT;
+ }
+ }
+ */
+}
diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/UriUtil.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/UriUtil.java
new file mode 100644
index 0000000..f80a892
--- /dev/null
+++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/UriUtil.java
@@ -0,0 +1,131 @@
+package cc.winboll.studio.mymessagemanager.utils;
+
+/**
+ * @Author ZhanGSKen@QQ.COM
+ * @Date 2024/07/19 14:30:57
+ * @Describe Uri 资源管理工具类
+ */
+import android.content.ContentResolver;
+import android.content.Context;
+import android.database.Cursor;
+import android.net.Uri;
+import android.provider.MediaStore;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+public class UriUtil {
+
+ public static final String TAG = "UriUtil";
+
+ //
+ // 获取真实路径
+ //
+ // @param context
+ //
+ public static String getFileFromUri(Context context, Uri uri) {
+ if (uri == null) {
+ return null;
+ }
+ switch (uri.getScheme()) {
+ case ContentResolver.SCHEME_CONTENT:
+ //Android7.0之后的uri content:// URI
+ return getFilePathFromContentUri(context, uri);
+ case ContentResolver.SCHEME_FILE:
+ default:
+ //Android7.0之前的uri file://
+ return new File(uri.getPath()).getAbsolutePath();
+ }
+ }
+
+ //
+ // 从uri获取path
+ //
+ // @param uri content://media/external/file/109009
+ //
+ // FileProvider适配
+ // content://com.tencent.mobileqq.fileprovider/external_files/storage/emulated/0/Tencent/QQfile_recv/
+ // content://com.tencent.mm.external.fileprovider/external/tencent/MicroMsg/Download/
+ //
+ private static String getFilePathFromContentUri(Context context, Uri uri) {
+ if (null == uri) return null;
+ String data = null;
+
+ String[] filePathColumn = {MediaStore.MediaColumns.DATA, MediaStore.MediaColumns.DISPLAY_NAME};
+ Cursor cursor = context.getContentResolver().query(uri, filePathColumn, null, null, null);
+ if (null != cursor) {
+ if (cursor.moveToFirst()) {
+ int index = cursor.getColumnIndex(MediaStore.MediaColumns.DATA);
+ if (index > -1) {
+ data = cursor.getString(index);
+ } else {
+ int nameIndex = cursor.getColumnIndex(MediaStore.MediaColumns.DISPLAY_NAME);
+ String fileName = cursor.getString(nameIndex);
+ data = getPathFromInputStreamUri(context, uri, fileName);
+ }
+ }
+ cursor.close();
+ }
+ return data;
+ }
+
+ //
+ // 用流拷贝文件一份到自己APP私有目录下
+ //
+ // @param context
+ // @param uri
+ // @param fileName
+ //
+ private static String getPathFromInputStreamUri(Context context, Uri uri, String fileName) {
+ InputStream inputStream = null;
+ String filePath = null;
+
+ if (uri.getAuthority() != null) {
+ try {
+ inputStream = context.getContentResolver().openInputStream(uri);
+ File file = createTemporalFileFrom(context, inputStream, fileName);
+ filePath = file.getPath();
+
+ } catch (Exception e) {
+ } finally {
+ try {
+ if (inputStream != null) {
+ inputStream.close();
+ }
+ } catch (Exception e) {
+ }
+ }
+ }
+
+ return filePath;
+ }
+
+ private static File createTemporalFileFrom(Context context, InputStream inputStream, String fileName)
+ throws IOException {
+ File targetFile = null;
+ if (inputStream != null) {
+ int read;
+ byte[] buffer = new byte[8 * 1024];
+ //自己定义拷贝文件路径
+ targetFile = new File(context.getExternalCacheDir(), fileName);
+ if (targetFile.exists()) {
+ targetFile.delete();
+ }
+ OutputStream outputStream = new FileOutputStream(targetFile);
+
+ while ((read = inputStream.read(buffer)) != -1) {
+ outputStream.write(buffer, 0, read);
+ }
+ outputStream.flush();
+
+ try {
+ outputStream.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ return targetFile;
+ }
+}
diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/UserVisionSystemProtectModeUtil.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/UserVisionSystemProtectModeUtil.java
new file mode 100644
index 0000000..2aa9d61
--- /dev/null
+++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/UserVisionSystemProtectModeUtil.java
@@ -0,0 +1,53 @@
+package cc.winboll.studio.mymessagemanager.utils;
+
+/**
+ * @Author ZhanGSKen@QQ.COM
+ * @Date 2024/07/24 16:20:13
+ * @Describe 用户视觉系统保护模式工具集
+ */
+import java.util.Random;
+
+public class UserVisionSystemProtectModeUtil {
+
+ public static final String TAG = "UserVisionSystemProtectModeUtil";
+
+ public static final String PreviewShuffleSMS(String szSMSText, String szRefuseChars, String szReplaceChars) {
+ String szPreview;
+ // 将字符串转换为字符数组
+ char[] charArray = szSMSText.toCharArray();
+ // 打乱字符数组
+ shuffleArray(charArray);
+ // 构建新的字符串并打印
+ szPreview = new String(charArray);
+ szPreview = useProtectedCharsRule(szPreview, szRefuseChars, szReplaceChars);
+ return szPreview;
+ }
+
+ //
+ // 打乱字符数组的方法
+ //
+ // @param array 要被打乱的字符数组
+ //
+ public static void shuffleArray(char[] array) {
+ // 创建随机数生成器
+ Random random = new Random();
+ for (int i = array.length - 1; i > 0; i--) {
+ // 生成一个随机索引j,范围在0到i之间(包括i)
+ int j = random.nextInt(i + 1);
+
+ // 交换array[i]和array[j]的位置
+ char temp = array[i];
+ array[i] = array[j];
+ array[j] = temp;
+ }
+ }
+
+ public static String useProtectedCharsRule(String szContent, String szRefuseChars, String szReplaceChars) {
+ // 正则表达式模式 (寻找 szProtectChars 其中一个字符)
+ String pattern = "[" + szRefuseChars + "]";
+
+ // 替换模式后的字符串
+ String szProtectedContent = szContent.replaceAll(pattern, szReplaceChars);
+ return szProtectedContent;
+ }
+}
diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/ViewUtil.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/ViewUtil.java
new file mode 100644
index 0000000..1b56d0b
--- /dev/null
+++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/utils/ViewUtil.java
@@ -0,0 +1,20 @@
+package cc.winboll.studio.mymessagemanager.utils;
+
+/**
+ * @Author ZhanGSKen@QQ.COM
+ * @Date 2024/07/19 14:30:57
+ * @Describe Uri 视图元素工具类
+ */
+import android.widget.ScrollView;
+
+public class ViewUtil {
+
+ public static void scrollScrollView(final ScrollView scrollView) {
+ scrollView.post(new Runnable() {
+ @Override
+ public void run() {
+ scrollView.fullScroll(ScrollView.FOCUS_DOWN);
+ }
+ });
+ }
+}
diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/views/ConfirmSwitchView.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/views/ConfirmSwitchView.java
new file mode 100644
index 0000000..6c9ebb6
--- /dev/null
+++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/views/ConfirmSwitchView.java
@@ -0,0 +1,76 @@
+package cc.winboll.studio.mymessagemanager.views;
+
+/**
+ * @Author ZhanGSKen@QQ.COM
+ * @Date 2023/07/25 13:37:55
+ */
+import android.content.Context;
+import android.util.AttributeSet;
+import android.view.View;
+import android.widget.Switch;
+import cc.winboll.studio.mymessagemanager.dialogs.YesNoAlertDialog;
+import cc.winboll.studio.shared.log.LogUtils;
+
+public class ConfirmSwitchView extends Switch {
+
+ public static final String TAG = "SwitchView";
+
+ Context mContext;
+
+ public ConfirmSwitchView(Context context) {
+ super(context);
+ initView(context);
+ }
+
+ public ConfirmSwitchView(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ initView(context);
+ }
+
+ public ConfirmSwitchView(Context context, AttributeSet attrs, int defStyleAttr) {
+ super(context, attrs, defStyleAttr);
+ initView(context);
+ }
+
+ public ConfirmSwitchView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
+ super(context, attrs, defStyleAttr, defStyleRes);
+ initView(context);
+ }
+
+ void initView(Context context) {
+ mContext = context;
+ /*TypedArray a = mContext.obtainStyledAttributes(attrs, R.styleable.SMSView, 0, 0);
+ colorInbox = a.getColor(R.styleable.SMSView_attrSMSViewInboxColor, 0);
+ colorSend = a.getColor(R.styleable.SMSView_attrSMSViewSendColor, 0);
+ a.recycle();*/
+ }
+
+ @Override
+ public void setOnClickListener(final View.OnClickListener l) {
+ super.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ final boolean isChecked = isChecked();
+ StringBuilder sbMessage = new StringBuilder("请确定[");
+ sbMessage.append(isChecked ?"开启": "关闭");
+ sbMessage.append("]操作。");
+ // 在这里添加您的点击事件响应逻辑
+ YesNoAlertDialog.show(mContext, getText().toString(), sbMessage.toString(), new YesNoAlertDialog.OnDialogResultListener(){
+ @Override
+ public void onYes() {
+ LogUtils.d(TAG, "onYes");
+ setChecked(isChecked);
+ }
+ @Override
+ public void onNo() {
+ LogUtils.d(TAG, "onNo");
+ setChecked(!isChecked);
+ }
+ });
+ //Toast.makeText(getContext(), "Switch clicked", Toast.LENGTH_SHORT).show();
+ // 确保调用了父类的onClick()方法
+ l.onClick(v);
+ }
+ });
+ }
+}
diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/views/DateAgoTextView.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/views/DateAgoTextView.java
new file mode 100644
index 0000000..e813885
--- /dev/null
+++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/views/DateAgoTextView.java
@@ -0,0 +1,32 @@
+package cc.winboll.studio.mymessagemanager.views;
+
+import android.content.Context;
+import android.util.AttributeSet;
+import androidx.appcompat.widget.AppCompatTextView;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.Locale;
+
+public class DateAgoTextView extends AppCompatTextView {
+ long mnDate;
+
+ public DateAgoTextView(Context context) {
+ super(context);
+ }
+
+ public DateAgoTextView(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ }
+
+ public DateAgoTextView(Context context, AttributeSet attrs, int defStyleAttr) {
+ super(context, attrs, defStyleAttr);
+ }
+
+ public void setDate(long nDate) {
+ SimpleDateFormat dateFormat = new SimpleDateFormat(
+ "yyyy-MM-dd HH:mm:ss", Locale.getDefault());
+ Date d = new Date(nDate);
+
+ setText(dateFormat.format(d));
+ }
+}
diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/views/PhoneListViewForScrollView.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/views/PhoneListViewForScrollView.java
new file mode 100644
index 0000000..b7d5b43
--- /dev/null
+++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/views/PhoneListViewForScrollView.java
@@ -0,0 +1,65 @@
+package cc.winboll.studio.mymessagemanager.views;
+
+import android.content.Context;
+import android.util.AttributeSet;
+import android.widget.ListView;
+
+public class PhoneListViewForScrollView extends ListView {
+
+ public PhoneListViewForScrollView(Context context) {
+ super(context);
+ }
+
+ public PhoneListViewForScrollView(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ }
+
+ public PhoneListViewForScrollView(Context context, AttributeSet attrs, int defStyleAttr) {
+ super(context, attrs, defStyleAttr);
+ }
+
+ /**
+ * 重写onMeasure方法,重新计算高度,达到使ListView适应ScrollView的效果
+ *
+ * @param widthMeasureSpec 宽度测量规则
+ * @param heightMeasureSpec 高度测量规则
+ */
+ @Override
+ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+ /*
+ // 子控件TextView不换行显示
+ ListAdapter listAdapter = this.getAdapter();
+ if (listAdapter == null) {
+ return;
+ }
+ int maxWidth = 0;
+ for (int i = 0; i < listAdapter.getCount(); i++) {
+ View listItem = listAdapter.getView(i, null, this);
+ View cb = listItem.findViewById(R.id.listviewfiledataCheckBox1);
+ View iv = listItem.findViewById(R.id.listviewfiledataImageView1);
+ View tv = listItem.findViewById(R.id.listviewfiledataTextView1);
+
+ cb.measure(0,0);
+ iv.measure(0,0);
+ tv.measure(0,0);
+
+ //listItem.measure(0, 0);
+ //int width = listItem.getMeasuredWidth();
+ int width = cb.getMeasuredWidth() + iv.getMeasuredWidth()+ tv.getMeasuredWidth();
+ if(width>maxWidth) maxWidth = width;
+ }
+ int newHeightMeasureSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST);
+ int newWidthMeasureSpec = MeasureSpec.makeMeasureSpec(maxWidth, MeasureSpec.AT_MOST);
+ super.onMeasure(newWidthMeasureSpec, newHeightMeasureSpec);
+ */
+
+ // 子控件TextView换行显示
+ //Integer.MAX_VALUE:表示int类型能够表示的最大值,值为2的31次方-1
+ //>>2:右移N位相当于除以2的N的幂
+ //MeasureSpec.AT_MOST:子布局可以根据自己的大小选择任意大小的模式
+ int newHeightMeasureSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST);
+ //int newWidthMeasureSpec = MeasureSpec.makeMeasureSpec(widthMeasureSpec, MeasureSpec.AT_MOST);
+
+ super.onMeasure(widthMeasureSpec, newHeightMeasureSpec);
+ }
+}
diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/views/SMSAcceptRuleListViewForScrollView.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/views/SMSAcceptRuleListViewForScrollView.java
new file mode 100644
index 0000000..d60d8f6
--- /dev/null
+++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/views/SMSAcceptRuleListViewForScrollView.java
@@ -0,0 +1,33 @@
+package cc.winboll.studio.mymessagemanager.views;
+
+import android.content.Context;
+import android.util.AttributeSet;
+import android.widget.ListView;
+
+public class SMSAcceptRuleListViewForScrollView extends ListView {
+
+ public SMSAcceptRuleListViewForScrollView(Context context) {
+ super(context);
+ }
+
+ public SMSAcceptRuleListViewForScrollView(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ }
+
+ public SMSAcceptRuleListViewForScrollView(Context context, AttributeSet attrs, int defStyleAttr) {
+ super(context, attrs, defStyleAttr);
+ }
+
+ /**
+ * 重写onMeasure方法,重新计算高度,达到使ListView适应ScrollView的效果
+ *
+ * @param widthMeasureSpec 宽度测量规则
+ * @param heightMeasureSpec 高度测量规则
+ */
+ @Override
+ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+ int newHeightMeasureSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST);
+ super.onMeasure(widthMeasureSpec, newHeightMeasureSpec);
+ }
+
+}
diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/views/SMSListViewForScrollView.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/views/SMSListViewForScrollView.java
new file mode 100644
index 0000000..296882e
--- /dev/null
+++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/views/SMSListViewForScrollView.java
@@ -0,0 +1,73 @@
+package cc.winboll.studio.mymessagemanager.views;
+
+import android.content.Context;
+import android.util.AttributeSet;
+import android.widget.ListView;
+
+public class SMSListViewForScrollView extends ListView {
+ static int nMaxWidth = 0;
+
+ public SMSListViewForScrollView(Context context) {
+ super(context);
+ }
+
+ public SMSListViewForScrollView(Context context, AttributeSet attrs) {
+ super(context, attrs);
+
+ }
+
+ public SMSListViewForScrollView(Context context, AttributeSet attrs, int defStyleAttr) {
+ super(context, attrs, defStyleAttr);
+ }
+
+ /**
+ * 重写onMeasure方法,重新计算高度,达到使ListView适应ScrollView的效果
+ *
+ * @param widthMeasureSpec 宽度测量规则
+ * @param heightMeasureSpec 高度测量规则
+ */
+ @Override
+ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+
+ /*
+ // 子控件TextView不换行显示
+ ListAdapter listAdapter = this.getAdapter();
+ if (listAdapter == null) {
+ return;
+ }
+ int maxWidth = 0;
+ for (int i = 0; i < listAdapter.getCount(); i++) {
+ View listItem = listAdapter.getView(i, null, this);
+ View cb = listItem.findViewById(R.id.listviewfiledataCheckBox1);
+ View iv = listItem.findViewById(R.id.listviewfiledataImageView1);
+ View tv = listItem.findViewById(R.id.listviewfiledataTextView1);
+
+ cb.measure(0,0);
+ iv.measure(0,0);
+ tv.measure(0,0);
+
+ //listItem.measure(0, 0);
+ //int width = listItem.getMeasuredWidth();
+ int width = cb.getMeasuredWidth() + iv.getMeasuredWidth()+ tv.getMeasuredWidth();
+ if(width>maxWidth) maxWidth = width;
+ }
+ int newHeightMeasureSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST);
+ int newWidthMeasureSpec = MeasureSpec.makeMeasureSpec(maxWidth, MeasureSpec.AT_MOST);
+ super.onMeasure(newWidthMeasureSpec, newHeightMeasureSpec);
+ */
+
+ // 子控件TextView换行显示
+ //Integer.MAX_VALUE:表示int类型能够表示的最大值,值为2的31次方-1
+ //>>2:右移N位相当于除以2的N的幂
+ //MeasureSpec.AT_MOST:子布局可以根据自己的大小选择任意大小的模式
+
+ int newHeightMeasureSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST);
+
+ //int newWidthMeasureSpec = MeasureSpec.makeMeasureSpec(widthMeasureSpec, MeasureSpec.AT_MOST);
+
+ //int newHeightMeasureSpec = MeasureSpec.makeMeasureSpec(heightMeasureSpec, MeasureSpec.AT_MOST);
+
+ super.onMeasure(widthMeasureSpec, newHeightMeasureSpec);
+ }
+
+}
diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/views/SMSView.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/views/SMSView.java
new file mode 100644
index 0000000..9ce0bbe
--- /dev/null
+++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/views/SMSView.java
@@ -0,0 +1,78 @@
+package cc.winboll.studio.mymessagemanager.views;
+
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.graphics.Canvas;
+import android.util.AttributeSet;
+import androidx.cardview.widget.CardView;
+import cc.winboll.studio.mymessagemanager.R;
+
+public class SMSView extends CardView {
+
+ public static final String TAG = "SMSView";
+
+ Context mContext;
+ int colorInbox;
+ int colorSend;
+ int colorItem;
+ public enum SMSType { INBOX, SEND }
+ SMSType mSMSType = SMSType.INBOX;
+
+ public void setSMSType(SMSType smsType) {
+ this.mSMSType = smsType;
+ updateViewBackgroundColor();
+ }
+
+ public SMSType getCardType() {
+ return mSMSType;
+ }
+
+ void updateViewBackgroundColor() {
+ if (mSMSType == SMSType.INBOX) {
+ setCardBackgroundColor(colorInbox);
+ } else if (mSMSType == SMSType.SEND) {
+ setCardBackgroundColor(colorSend);
+ }
+ }
+
+ public SMSView(Context context) {
+ super(context);
+ mContext = context;
+ }
+
+ public SMSView(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ mContext = context;
+
+ TypedArray a = mContext.obtainStyledAttributes(attrs, R.styleable.SMSView, 0, 0);
+ String szSMSType = a.getString(R.styleable.SMSView_attrSMSType);
+ if((szSMSType == null)||szSMSType.equals("")) {
+ mSMSType = SMSType.SEND;
+ } else {
+ mSMSType = SMSType.valueOf(szSMSType);
+ }
+ colorInbox = a.getColor(R.styleable.SMSView_attrSMSViewInboxColor, 0);
+ colorSend = a.getColor(R.styleable.SMSView_attrSMSViewSendColor, 0);
+ a.recycle();
+ }
+
+ public SMSView(Context context, AttributeSet attrs, int defStyleAttr) {
+ super(context, attrs, defStyleAttr);
+ mContext = context;
+ }
+
+ @Override
+ protected void onDraw(Canvas canvas) {
+ super.onDraw(canvas);
+ }
+
+ @Override
+ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+ // 子控件TextView换行显示
+ //Integer.MAX_VALUE:表示int类型能够表示的最大值,值为2的31次方-1
+ //>>2:右移N位相当于除以2的N的幂
+ //MeasureSpec.AT_MOST:子布局可以根据自己的大小选择任意大小的模式
+ int newHeightMeasureSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST);
+ super.onMeasure(widthMeasureSpec, newHeightMeasureSpec);
+ }
+}
diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/views/TTSRuleListViewForScrollView.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/views/TTSRuleListViewForScrollView.java
new file mode 100644
index 0000000..be676cb
--- /dev/null
+++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/views/TTSRuleListViewForScrollView.java
@@ -0,0 +1,82 @@
+package cc.winboll.studio.mymessagemanager.views;
+
+import android.content.Context;
+import android.util.AttributeSet;
+import android.widget.ListView;
+
+public class TTSRuleListViewForScrollView extends ListView {
+ static int nMaxWidth = 0;
+
+ public TTSRuleListViewForScrollView(Context context) {
+ super(context);
+ }
+
+ public TTSRuleListViewForScrollView(Context context, AttributeSet attrs) {
+ super(context, attrs);
+
+ }
+
+ public TTSRuleListViewForScrollView(Context context, AttributeSet attrs, int defStyleAttr) {
+ super(context, attrs, defStyleAttr);
+ }
+
+ @Override
+ public void setSelection(int position) {
+ super.setSelection(position);
+ }
+
+ /**
+ * 重写onMeasure方法,重新计算高度,达到使ListView适应ScrollView的效果
+ *
+ * @param widthMeasureSpec 宽度测量规则
+ * @param heightMeasureSpec 高度测量规则
+ */
+ @Override
+ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+
+ /*
+ // 子控件TextView不换行显示
+ ListAdapter listAdapter = this.getAdapter();
+ if (listAdapter == null) {
+ return;
+ }
+ int maxWidth = 0;
+ for (int i = 0; i < listAdapter.getCount(); i++) {
+ View listItem = listAdapter.getView(i, null, this);
+ View cb = listItem.findViewById(R.id.listviewfiledataCheckBox1);
+ View iv = listItem.findViewById(R.id.listviewfiledataImageView1);
+ View tv = listItem.findViewById(R.id.listviewfiledataTextView1);
+
+ cb.measure(0,0);
+ iv.measure(0,0);
+ tv.measure(0,0);
+
+ //listItem.measure(0, 0);
+ //int width = listItem.getMeasuredWidth();
+ int width = cb.getMeasuredWidth() + iv.getMeasuredWidth()+ tv.getMeasuredWidth();
+ if(width>maxWidth) maxWidth = width;
+ }
+ int newHeightMeasureSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST);
+ int newWidthMeasureSpec = MeasureSpec.makeMeasureSpec(maxWidth, MeasureSpec.AT_MOST);
+ super.onMeasure(newWidthMeasureSpec, newHeightMeasureSpec);
+ */
+
+ // 子控件TextView换行显示
+ //Integer.MAX_VALUE:表示int类型能够表示的最大值,值为2的31次方-1
+ //>>2:右移N位相当于除以2的N的幂
+ //MeasureSpec.AT_MOST:子布局可以根据自己的大小选择任意大小的模式
+
+ int newHeightMeasureSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST);
+
+ //int newWidthMeasureSpec = MeasureSpec.makeMeasureSpec(widthMeasureSpec, MeasureSpec.AT_MOST);
+
+ //int newHeightMeasureSpec = MeasureSpec.makeMeasureSpec(heightMeasureSpec, MeasureSpec.AT_MOST);
+
+ super.onMeasure(widthMeasureSpec, newHeightMeasureSpec);
+ }
+
+}
+
+
+
+
diff --git a/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/views/TTSRuleView.java b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/views/TTSRuleView.java
new file mode 100644
index 0000000..60104ce
--- /dev/null
+++ b/mymessagemanager/src/main/java/cc/winboll/studio/mymessagemanager/views/TTSRuleView.java
@@ -0,0 +1,48 @@
+package cc.winboll.studio.mymessagemanager.views;
+
+/**
+ * @Author ZhanGSKen@QQ.COM
+ * @Date 2023/07/24 15:08:31
+ * @Describe TTS语音规则视图
+ */
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.util.AttributeSet;
+import androidx.cardview.widget.CardView;
+import cc.winboll.studio.mymessagemanager.R;
+
+public class TTSRuleView extends CardView {
+
+ public static final String TAG = "TTSRuleView";
+
+ Context mContext;
+
+ public TTSRuleView(Context context) {
+ super(context);
+ mContext = context;
+ }
+
+ public TTSRuleView(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ mContext = context;
+ TypedArray a = mContext.obtainStyledAttributes(attrs, R.styleable.TTSRuleView, 0, 0);
+ int colorBackground = a.getColor(R.styleable.TTSRuleView_attrTTSRuleViewBackgroundColor, 0);
+ a.recycle();
+ setCardBackgroundColor(colorBackground);
+ }
+
+ public TTSRuleView(Context context, AttributeSet attrs, int defStyleAttr) {
+ super(context, attrs, defStyleAttr);
+ mContext = context;
+ }
+
+ @Override
+ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+ //Integer.MAX_VALUE:表示int类型能够表示的最大值,值为2的31次方-1
+ //>>2:右移N位相当于除以2的N的幂
+ //MeasureSpec.AT_MOST:子布局可以根据自己的大小选择任意大小的模式
+ int newHeightMeasureSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST);
+ super.onMeasure(widthMeasureSpec, newHeightMeasureSpec);
+ }
+
+}
diff --git a/mymessagemanager/src/main/res/anim/slow_fade_in.xml b/mymessagemanager/src/main/res/anim/slow_fade_in.xml
new file mode 100644
index 0000000..fa73170
--- /dev/null
+++ b/mymessagemanager/src/main/res/anim/slow_fade_in.xml
@@ -0,0 +1,7 @@
+
+
+
+
diff --git a/mymessagemanager/src/main/res/drawable/bg_frame.xml b/mymessagemanager/src/main/res/drawable/bg_frame.xml
new file mode 100644
index 0000000..75b2b94
--- /dev/null
+++ b/mymessagemanager/src/main/res/drawable/bg_frame.xml
@@ -0,0 +1,41 @@
+
+
+
+
+ -
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
diff --git a/mymessagemanager/src/main/res/drawable/bg_frame_black.xml b/mymessagemanager/src/main/res/drawable/bg_frame_black.xml
new file mode 100644
index 0000000..cfe4379
--- /dev/null
+++ b/mymessagemanager/src/main/res/drawable/bg_frame_black.xml
@@ -0,0 +1,41 @@
+
+
+
+
+ -
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
diff --git a/mymessagemanager/src/main/res/drawable/bg_frame_white.xml b/mymessagemanager/src/main/res/drawable/bg_frame_white.xml
new file mode 100644
index 0000000..002ffe1
--- /dev/null
+++ b/mymessagemanager/src/main/res/drawable/bg_frame_white.xml
@@ -0,0 +1,41 @@
+
+
+
+
+ -
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
diff --git a/mymessagemanager/src/main/res/drawable/cursor_pointer.xml b/mymessagemanager/src/main/res/drawable/cursor_pointer.xml
new file mode 100644
index 0000000..e828063
--- /dev/null
+++ b/mymessagemanager/src/main/res/drawable/cursor_pointer.xml
@@ -0,0 +1,20 @@
+
+
+
+
diff --git a/mymessagemanager/src/main/res/drawable/ic_launcher.xml b/mymessagemanager/src/main/res/drawable/ic_launcher.xml
new file mode 100644
index 0000000..d4d1eaf
--- /dev/null
+++ b/mymessagemanager/src/main/res/drawable/ic_launcher.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
diff --git a/mymessagemanager/src/main/res/drawable/ic_launcher_background.xml b/mymessagemanager/src/main/res/drawable/ic_launcher_background.xml
new file mode 100644
index 0000000..a4f78de
--- /dev/null
+++ b/mymessagemanager/src/main/res/drawable/ic_launcher_background.xml
@@ -0,0 +1,170 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mymessagemanager/src/main/res/drawable/ic_launcher_background_golden.xml b/mymessagemanager/src/main/res/drawable/ic_launcher_background_golden.xml
new file mode 100644
index 0000000..804236c
--- /dev/null
+++ b/mymessagemanager/src/main/res/drawable/ic_launcher_background_golden.xml
@@ -0,0 +1,170 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mymessagemanager/src/main/res/drawable/ic_launcher_background_sky.xml b/mymessagemanager/src/main/res/drawable/ic_launcher_background_sky.xml
new file mode 100644
index 0000000..1ff84d4
--- /dev/null
+++ b/mymessagemanager/src/main/res/drawable/ic_launcher_background_sky.xml
@@ -0,0 +1,170 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mymessagemanager/src/main/res/drawable/ic_launcher_foreground.xml b/mymessagemanager/src/main/res/drawable/ic_launcher_foreground.xml
new file mode 100644
index 0000000..872b04e
--- /dev/null
+++ b/mymessagemanager/src/main/res/drawable/ic_launcher_foreground.xml
@@ -0,0 +1,10 @@
+
+
+
+
diff --git a/mymessagemanager/src/main/res/drawable/ic_message.xml b/mymessagemanager/src/main/res/drawable/ic_message.xml
new file mode 100644
index 0000000..70f1497
--- /dev/null
+++ b/mymessagemanager/src/main/res/drawable/ic_message.xml
@@ -0,0 +1,20 @@
+
+
+
+
diff --git a/mymessagemanager/src/main/res/drawable/shape_gradient.xml b/mymessagemanager/src/main/res/drawable/shape_gradient.xml
new file mode 100644
index 0000000..c164fe9
--- /dev/null
+++ b/mymessagemanager/src/main/res/drawable/shape_gradient.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/mymessagemanager/src/main/res/drawable/speaker.xml b/mymessagemanager/src/main/res/drawable/speaker.xml
new file mode 100644
index 0000000..53e00c1
--- /dev/null
+++ b/mymessagemanager/src/main/res/drawable/speaker.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
diff --git a/mymessagemanager/src/main/res/layout/activity_about.xml b/mymessagemanager/src/main/res/layout/activity_about.xml
new file mode 100644
index 0000000..a2dcf3f
--- /dev/null
+++ b/mymessagemanager/src/main/res/layout/activity_about.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mymessagemanager/src/main/res/layout/activity_appsettings.xml b/mymessagemanager/src/main/res/layout/activity_appsettings.xml
new file mode 100644
index 0000000..2664de4
--- /dev/null
+++ b/mymessagemanager/src/main/res/layout/activity_appsettings.xml
@@ -0,0 +1,248 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mymessagemanager/src/main/res/layout/activity_composesms.xml b/mymessagemanager/src/main/res/layout/activity_composesms.xml
new file mode 100644
index 0000000..09f6358
--- /dev/null
+++ b/mymessagemanager/src/main/res/layout/activity_composesms.xml
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mymessagemanager/src/main/res/layout/activity_main.xml b/mymessagemanager/src/main/res/layout/activity_main.xml
new file mode 100644
index 0000000..c2c12c3
--- /dev/null
+++ b/mymessagemanager/src/main/res/layout/activity_main.xml
@@ -0,0 +1,82 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mymessagemanager/src/main/res/layout/activity_sharedjsonreceive.xml b/mymessagemanager/src/main/res/layout/activity_sharedjsonreceive.xml
new file mode 100644
index 0000000..f719f4f
--- /dev/null
+++ b/mymessagemanager/src/main/res/layout/activity_sharedjsonreceive.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mymessagemanager/src/main/res/layout/activity_sms.xml b/mymessagemanager/src/main/res/layout/activity_sms.xml
new file mode 100644
index 0000000..cf27fd4
--- /dev/null
+++ b/mymessagemanager/src/main/res/layout/activity_sms.xml
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mymessagemanager/src/main/res/layout/activity_smsacceptrulesetting.xml b/mymessagemanager/src/main/res/layout/activity_smsacceptrulesetting.xml
new file mode 100644
index 0000000..ae14d8c
--- /dev/null
+++ b/mymessagemanager/src/main/res/layout/activity_smsacceptrulesetting.xml
@@ -0,0 +1,82 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mymessagemanager/src/main/res/layout/activity_smsrecycle.xml b/mymessagemanager/src/main/res/layout/activity_smsrecycle.xml
new file mode 100644
index 0000000..9d1a408
--- /dev/null
+++ b/mymessagemanager/src/main/res/layout/activity_smsrecycle.xml
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mymessagemanager/src/main/res/layout/activity_ttsplayrule.xml b/mymessagemanager/src/main/res/layout/activity_ttsplayrule.xml
new file mode 100644
index 0000000..066b555
--- /dev/null
+++ b/mymessagemanager/src/main/res/layout/activity_ttsplayrule.xml
@@ -0,0 +1,164 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mymessagemanager/src/main/res/layout/item_ttsplayrule.xml b/mymessagemanager/src/main/res/layout/item_ttsplayrule.xml
new file mode 100644
index 0000000..6ea620c
--- /dev/null
+++ b/mymessagemanager/src/main/res/layout/item_ttsplayrule.xml
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mymessagemanager/src/main/res/layout/item_ttsplayrule_simple.xml b/mymessagemanager/src/main/res/layout/item_ttsplayrule_simple.xml
new file mode 100644
index 0000000..22aa5db
--- /dev/null
+++ b/mymessagemanager/src/main/res/layout/item_ttsplayrule_simple.xml
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mymessagemanager/src/main/res/layout/listview_contracts.xml b/mymessagemanager/src/main/res/layout/listview_contracts.xml
new file mode 100644
index 0000000..45f3322
--- /dev/null
+++ b/mymessagemanager/src/main/res/layout/listview_contracts.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
diff --git a/mymessagemanager/src/main/res/layout/listview_phone.xml b/mymessagemanager/src/main/res/layout/listview_phone.xml
new file mode 100644
index 0000000..c8471bc
--- /dev/null
+++ b/mymessagemanager/src/main/res/layout/listview_phone.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
diff --git a/mymessagemanager/src/main/res/layout/listview_sms.xml b/mymessagemanager/src/main/res/layout/listview_sms.xml
new file mode 100644
index 0000000..d9d4c14
--- /dev/null
+++ b/mymessagemanager/src/main/res/layout/listview_sms.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mymessagemanager/src/main/res/layout/listview_sms_part1.xml b/mymessagemanager/src/main/res/layout/listview_sms_part1.xml
new file mode 100644
index 0000000..278e0b7
--- /dev/null
+++ b/mymessagemanager/src/main/res/layout/listview_sms_part1.xml
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mymessagemanager/src/main/res/layout/listview_smsacceptrule.xml b/mymessagemanager/src/main/res/layout/listview_smsacceptrule.xml
new file mode 100644
index 0000000..96f144d
--- /dev/null
+++ b/mymessagemanager/src/main/res/layout/listview_smsacceptrule.xml
@@ -0,0 +1,89 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mymessagemanager/src/main/res/layout/listview_smsacceptrule_simple.xml b/mymessagemanager/src/main/res/layout/listview_smsacceptrule_simple.xml
new file mode 100644
index 0000000..f52f82a
--- /dev/null
+++ b/mymessagemanager/src/main/res/layout/listview_smsacceptrule_simple.xml
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mymessagemanager/src/main/res/layout/listview_smsrecycle.xml b/mymessagemanager/src/main/res/layout/listview_smsrecycle.xml
new file mode 100644
index 0000000..1f5c15f
--- /dev/null
+++ b/mymessagemanager/src/main/res/layout/listview_smsrecycle.xml
@@ -0,0 +1,84 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mymessagemanager/src/main/res/layout/listview_smsrecycle_simple.xml b/mymessagemanager/src/main/res/layout/listview_smsrecycle_simple.xml
new file mode 100644
index 0000000..d3bd02f
--- /dev/null
+++ b/mymessagemanager/src/main/res/layout/listview_smsrecycle_simple.xml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mymessagemanager/src/main/res/layout/listview_ttsplayrule.xml b/mymessagemanager/src/main/res/layout/listview_ttsplayrule.xml
new file mode 100644
index 0000000..faab960
--- /dev/null
+++ b/mymessagemanager/src/main/res/layout/listview_ttsplayrule.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mymessagemanager/src/main/res/layout/listview_ttsplayrule_simple.xml b/mymessagemanager/src/main/res/layout/listview_ttsplayrule_simple.xml
new file mode 100644
index 0000000..a7e6c68
--- /dev/null
+++ b/mymessagemanager/src/main/res/layout/listview_ttsplayrule_simple.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
diff --git a/mymessagemanager/src/main/res/layout/remoteview.xml b/mymessagemanager/src/main/res/layout/remoteview.xml
new file mode 100644
index 0000000..7a259e7
--- /dev/null
+++ b/mymessagemanager/src/main/res/layout/remoteview.xml
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mymessagemanager/src/main/res/layout/toast_custom_view.xml b/mymessagemanager/src/main/res/layout/toast_custom_view.xml
new file mode 100644
index 0000000..f8becb4
--- /dev/null
+++ b/mymessagemanager/src/main/res/layout/toast_custom_view.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mymessagemanager/src/main/res/layout/toolbar_sendsms.xml b/mymessagemanager/src/main/res/layout/toolbar_sendsms.xml
new file mode 100644
index 0000000..03436b3
--- /dev/null
+++ b/mymessagemanager/src/main/res/layout/toolbar_sendsms.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
diff --git a/mymessagemanager/src/main/res/layout/view_smssend.xml b/mymessagemanager/src/main/res/layout/view_smssend.xml
new file mode 100644
index 0000000..d41b99c
--- /dev/null
+++ b/mymessagemanager/src/main/res/layout/view_smssend.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
diff --git a/mymessagemanager/src/main/res/layout/view_smssend_part1.xml b/mymessagemanager/src/main/res/layout/view_smssend_part1.xml
new file mode 100644
index 0000000..4d48375
--- /dev/null
+++ b/mymessagemanager/src/main/res/layout/view_smssend_part1.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mymessagemanager/src/main/res/layout/view_tts_back.xml b/mymessagemanager/src/main/res/layout/view_tts_back.xml
new file mode 100644
index 0000000..5020d77
--- /dev/null
+++ b/mymessagemanager/src/main/res/layout/view_tts_back.xml
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mymessagemanager/src/main/res/menu/toolbar_about.xml b/mymessagemanager/src/main/res/menu/toolbar_about.xml
new file mode 100644
index 0000000..a5662ee
--- /dev/null
+++ b/mymessagemanager/src/main/res/menu/toolbar_about.xml
@@ -0,0 +1,6 @@
+
+
diff --git a/mymessagemanager/src/main/res/menu/toolbar_item_sms.xml b/mymessagemanager/src/main/res/menu/toolbar_item_sms.xml
new file mode 100644
index 0000000..b186290
--- /dev/null
+++ b/mymessagemanager/src/main/res/menu/toolbar_item_sms.xml
@@ -0,0 +1,23 @@
+
+
diff --git a/mymessagemanager/src/main/res/menu/toolbar_item_smsrecycle.xml b/mymessagemanager/src/main/res/menu/toolbar_item_smsrecycle.xml
new file mode 100644
index 0000000..6f73933
--- /dev/null
+++ b/mymessagemanager/src/main/res/menu/toolbar_item_smsrecycle.xml
@@ -0,0 +1,9 @@
+
+
diff --git a/mymessagemanager/src/main/res/menu/toolbar_main.xml b/mymessagemanager/src/main/res/menu/toolbar_main.xml
new file mode 100644
index 0000000..84780f4
--- /dev/null
+++ b/mymessagemanager/src/main/res/menu/toolbar_main.xml
@@ -0,0 +1,36 @@
+
+
diff --git a/mymessagemanager/src/main/res/menu/toolbar_rule.xml b/mymessagemanager/src/main/res/menu/toolbar_rule.xml
new file mode 100644
index 0000000..736fbc2
--- /dev/null
+++ b/mymessagemanager/src/main/res/menu/toolbar_rule.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/mymessagemanager/src/main/res/menu/toolbar_smsacceptrulebean.xml b/mymessagemanager/src/main/res/menu/toolbar_smsacceptrulebean.xml
new file mode 100644
index 0000000..db92aa3
--- /dev/null
+++ b/mymessagemanager/src/main/res/menu/toolbar_smsacceptrulebean.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/mymessagemanager/src/main/res/menu/toolbar_smsrecycle.xml b/mymessagemanager/src/main/res/menu/toolbar_smsrecycle.xml
new file mode 100644
index 0000000..c3503f8
--- /dev/null
+++ b/mymessagemanager/src/main/res/menu/toolbar_smsrecycle.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
diff --git a/mymessagemanager/src/main/res/menu/toolbar_ttsrule.xml b/mymessagemanager/src/main/res/menu/toolbar_ttsrule.xml
new file mode 100644
index 0000000..ea4ac1d
--- /dev/null
+++ b/mymessagemanager/src/main/res/menu/toolbar_ttsrule.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
diff --git a/mymessagemanager/src/main/res/values-zh/strings.xml b/mymessagemanager/src/main/res/values-zh/strings.xml
new file mode 100644
index 0000000..fa49a11
--- /dev/null
+++ b/mymessagemanager/src/main/res/values-zh/strings.xml
@@ -0,0 +1,45 @@
+
+
+ 我的短信管家
+ 用正则表达式方法自定义短信过滤和语音播报的短信应用。
+ 应用日志
+ 应用主题
+ 默认主题
+ 蓝色天空主题
+ 辉煌历程主题
+ 开发选项
+ 默认应用设置
+ 应用异常崩溃处理测试
+ 关于应用
+ 短信回收站
+ 应用权限申请提示
+ https://winboll.cc/studio/details.php?app=MyMessageManager
+ 短信管理中心
+ JSON 文件处理
+ 发送短信
+ 短信列表
+ 应用日志
+ 关于应用
+ 应用设置
+ 删除时间:
+ 来自:
+ 这是短信服务运行时的提示窗口,您可以在应用设置的通知消息设置中设置为隐藏本类通知。
+ TTS语音播报规则
+ 短信接收规则
+ 分享设置
+ 重置设置
+ 清理设置
+ 发送短信
+ 短信服务管理总开关
+ 只接收联系人短信
+ 使用TTS语音播报
+ 使用TTS语音自定义规则
+ 短信管理服务已启动。
+ 短信管理服务已关闭。
+ (未在联系人列表)
+ 应用设置
+ TTS播放延迟时间(秒):
+ 接收到新的消息。
+ >>>拉图标动到 100% 以发送信息。>>>
+ >>>拉图标动到 100% 应用设置。>>>
+
diff --git a/mymessagemanager/src/main/res/values/attrs.xml b/mymessagemanager/src/main/res/values/attrs.xml
new file mode 100644
index 0000000..da73e91
--- /dev/null
+++ b/mymessagemanager/src/main/res/values/attrs.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mymessagemanager/src/main/res/values/colors.xml b/mymessagemanager/src/main/res/values/colors.xml
new file mode 100644
index 0000000..e75d537
--- /dev/null
+++ b/mymessagemanager/src/main/res/values/colors.xml
@@ -0,0 +1,27 @@
+
+
+ #FFDCDA3D
+ #FF3DDC84
+ #FFDCDA3D
+
+ #FFA28BFF
+ #FF8BAEFF
+ #FFA28BFF
+
+ #FFFFEB8C
+ #FF8CD9FF
+ #FFFFEB8C
+
+ #FF78BDFF
+ #FFFFED78
+ #FF78BDFF
+
+ #FF5AEB53
+ #FFE653EB
+ #FF5AEB53
+
+ #FFB4B4B4
+ #FFD9D9D9
+ #FFB4B4B4
+
+
diff --git a/mymessagemanager/src/main/res/values/dimens.xml b/mymessagemanager/src/main/res/values/dimens.xml
new file mode 100644
index 0000000..03c8154
--- /dev/null
+++ b/mymessagemanager/src/main/res/values/dimens.xml
@@ -0,0 +1,4 @@
+
+
+ 60dp
+
diff --git a/mymessagemanager/src/main/res/values/strings.xml b/mymessagemanager/src/main/res/values/strings.xml
new file mode 100644
index 0000000..17f241c
--- /dev/null
+++ b/mymessagemanager/src/main/res/values/strings.xml
@@ -0,0 +1,51 @@
+
+ My Message Manager
+ MyMessageManager
+ The SMS application of the custom SMS voice broadcast with the regular expression method.Play with regular expressions.
+ Application Log
+ App Theme
+ Default Theme
+ Sky Theme
+ Golden Theme
+ Develop Options
+ Default App Settings
+ Crash Test
+ About APP
+ SMS Recycle
+ APP Permission Require Info
+ https://winboll.cc/studio/details.php?app=MyMessageManager
+ SMS Management Center
+ Shared JSON Handling
+ Message Sender
+ Messages
+ Application Log
+ About APP
+ Settings
+ DeleteDate:
+ Restore SMS
+ Clean SMS Recycle
+ From:
+ TTS Play Rule
+ SMS Receive Rule
+ This is the prompt window when the SMS service runs, which you can set to hide this class notification in the notification message settings.
+ Share Setting
+ Reset Setting
+ Clean Setting
+ Send SMS
+ Main Service
+ Only Receive Contacts
+ Using TTS
+ Using TTS Rule
+ The main service is start.
+ The main service is stoped.
+ (Not In Contacts)
+ Settings
+ TTS Play delay times(second) :
+ Received new message.
+ >>>Seek 100% To Send Message.>>>
+ >>>Seek 100% To Apply settings.>>>
+
+ - "I am here!"
+ - "I think, I am here!"
+
+
diff --git a/mymessagemanager/src/main/res/values/themes.xml b/mymessagemanager/src/main/res/values/themes.xml
new file mode 100644
index 0000000..13c9366
--- /dev/null
+++ b/mymessagemanager/src/main/res/values/themes.xml
@@ -0,0 +1,90 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mymessagemanager/src/main/res/xml/file_provider.xml b/mymessagemanager/src/main/res/xml/file_provider.xml
new file mode 100644
index 0000000..a53d7e6
--- /dev/null
+++ b/mymessagemanager/src/main/res/xml/file_provider.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mymessagemanager/src/stage/AndroidManifest.xml b/mymessagemanager/src/stage/AndroidManifest.xml
new file mode 100644
index 0000000..7b53259
--- /dev/null
+++ b/mymessagemanager/src/stage/AndroidManifest.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mymessagemanager/src/stage/res/values/strings.xml b/mymessagemanager/src/stage/res/values/strings.xml
new file mode 100644
index 0000000..ace0c41
--- /dev/null
+++ b/mymessagemanager/src/stage/res/values/strings.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/settings.gradle-demo b/settings.gradle-demo
index cfef30c..36a92e0 100644
--- a/settings.gradle-demo
+++ b/settings.gradle-demo
@@ -38,7 +38,14 @@
//include ':libaes'
//rootProject.name = "aes"
+// Contacts 项目编译设置
+//include ':contacts'
+//rootProject.name = "contacts"
+
// Positions 项目编译设置
//include ':positions'
//rootProject.name = "positions"
+// MyMessageManager 项目编译设置
+//include ':mymessagemanager'
+//rootProject.name = "mymessagemanager"