Compare commits
13 Commits
9ece6778b7
...
mymessagem
Author | SHA1 | Date | |
---|---|---|---|
![]() |
a40dbcfb61 | ||
![]() |
4d344b299b | ||
![]() |
37b0867d34 | ||
![]() |
b505156211 | ||
![]() |
91b30fb576 | ||
![]() |
ab3ac72d54 | ||
![]() |
870e9a94fb | ||
![]() |
2421ecb943 | ||
![]() |
687fff7216 | ||
![]() |
3795cf8631 | ||
![]() |
b374f3117a | ||
![]() |
6d9adc124e | ||
![]() |
52f738b45b |
@@ -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.9.3'
|
||||||
api 'cc.winboll.studio:libapputils:15.8.4'
|
api 'cc.winboll.studio:libapputils:15.8.6'
|
||||||
api 'cc.winboll.studio:libappbase:15.8.4'
|
api 'cc.winboll.studio:libappbase:15.9.5'
|
||||||
|
|
||||||
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
|
||||||
#Thu Aug 28 21:13:38 HKT 2025
|
#Sat Sep 06 01:57:20 HKT 2025
|
||||||
stageCount=4
|
stageCount=9
|
||||||
libraryProject=
|
libraryProject=
|
||||||
baseVersion=15.3
|
baseVersion=15.3
|
||||||
publishVersion=15.3.3
|
publishVersion=15.3.8
|
||||||
buildCount=0
|
buildCount=0
|
||||||
baseBetaVersion=15.3.4
|
baseBetaVersion=15.3.9
|
||||||
|
@@ -1,5 +1,10 @@
|
|||||||
package cc.winboll.studio.mymessagemanager.activitys;
|
package cc.winboll.studio.mymessagemanager.activitys;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author ZhanGSKen&豆包大模型<zhangsken@188.com>
|
||||||
|
* @Date 2025/08/30 14:32
|
||||||
|
* @Describe 联系人查询与短信发送窗口
|
||||||
|
*/
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.text.Editable;
|
import android.text.Editable;
|
||||||
import android.text.TextWatcher;
|
import android.text.TextWatcher;
|
||||||
@@ -11,13 +16,17 @@ import android.widget.RelativeLayout;
|
|||||||
import android.widget.SimpleAdapter;
|
import android.widget.SimpleAdapter;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toolbar;
|
import android.widget.Toolbar;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.graphics.drawable.Drawable;
|
||||||
|
|
||||||
import cc.winboll.studio.libaes.views.AOHPCTCSeekBar;
|
import cc.winboll.studio.libaes.views.AOHPCTCSeekBar;
|
||||||
import cc.winboll.studio.mymessagemanager.R;
|
import cc.winboll.studio.mymessagemanager.R;
|
||||||
import cc.winboll.studio.mymessagemanager.activitys.ComposeSMSActivity;
|
|
||||||
import cc.winboll.studio.mymessagemanager.beans.PhoneBean;
|
import cc.winboll.studio.mymessagemanager.beans.PhoneBean;
|
||||||
import cc.winboll.studio.mymessagemanager.utils.PhoneUtil;
|
import cc.winboll.studio.mymessagemanager.utils.PhoneUtil;
|
||||||
import cc.winboll.studio.mymessagemanager.utils.SMSUtil;
|
import cc.winboll.studio.mymessagemanager.utils.SMSUtil;
|
||||||
import com.hjq.toast.ToastUtils;
|
import com.hjq.toast.ToastUtils;
|
||||||
|
import cc.winboll.studio.libappbase.LogUtils;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -26,255 +35,331 @@ import java.util.Map;
|
|||||||
public class ComposeSMSActivity extends BaseActivity {
|
public class ComposeSMSActivity extends BaseActivity {
|
||||||
|
|
||||||
public static String TAG = "ComposeSMSActivity";
|
public static String TAG = "ComposeSMSActivity";
|
||||||
|
|
||||||
public static String EXTRA_SMSBODY = "sms_body";
|
public static String EXTRA_SMSBODY = "sms_body";
|
||||||
|
private static final String MAP_NAME = "NAME";
|
||||||
|
private static final String MAP_PHONE = "PHONE";
|
||||||
|
|
||||||
static String MAP_NAME = "NAME";
|
private String mszSMSBody;
|
||||||
static String MAP_PHONE = "PHONE";
|
private String mszScheme;
|
||||||
|
private String mszPhoneTo;
|
||||||
String mszSMSBody;
|
private TextView mtvTOName;
|
||||||
String mszScheme;
|
private EditText metTONameSearch;
|
||||||
String mszPhoneTo;
|
private EditText metTO;
|
||||||
TextView mtvTOName;
|
private EditText metSMSBody;
|
||||||
EditText metTONameSearch;
|
private SimpleAdapter mSimpleAdapter;
|
||||||
EditText metTO;
|
private List<Map<String, Object>> mAdapterData = new ArrayList<Map<String, Object>>();
|
||||||
EditText metSMSBody;
|
private ListView mlvContracts;
|
||||||
SimpleAdapter mSimpleAdapter;
|
private List<PhoneBean> mListPhoneBeanContracts;
|
||||||
List<Map<String,Object>> mAdapterData = new ArrayList<>();
|
private Toolbar mToolbar;
|
||||||
ListView mlvContracts;
|
private AOHPCTCSeekBar mAOHPCTCSeekBar;
|
||||||
List<PhoneBean> mListPhoneBeanContracts;
|
private RelativeLayout mrlContracts;
|
||||||
Toolbar mToolbar;
|
|
||||||
AOHPCTCSeekBar mAOHPCTCSeekBar;
|
|
||||||
RelativeLayout mrlContracts;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
LogUtils.d(TAG, "onCreate");
|
||||||
setContentView(R.layout.activity_composesms);
|
setContentView(R.layout.activity_composesms);
|
||||||
mszSMSBody = getIntent().getStringExtra(EXTRA_SMSBODY);
|
|
||||||
mszScheme = getIntent().getData().getScheme();
|
// 初始化Intent数据(增加空判断,避免NullPointerException)
|
||||||
mszPhoneTo = getIntent().getData().getSchemeSpecificPart();
|
Intent intent = getIntent();
|
||||||
if (!mszScheme.equals("smsto")) {
|
if (intent != null) {
|
||||||
// 其他方式未支持就退出
|
mszSMSBody = intent.getStringExtra(EXTRA_SMSBODY);
|
||||||
finish();
|
if (intent.getData() != null) {
|
||||||
|
mszScheme = intent.getData().getScheme();
|
||||||
|
mszPhoneTo = intent.getData().getSchemeSpecificPart();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// 初始化视图
|
|
||||||
|
// 校验启动方式,非smsto则退出
|
||||||
|
if (mszScheme == null || !"smsto".equals(mszScheme)) {
|
||||||
|
ToastUtils.show("不支持的启动方式");
|
||||||
|
finish();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
initView();
|
initView();
|
||||||
// 设置适配器
|
initAdapter(null); // 初始加载所有联系人
|
||||||
initAdapter(null);
|
|
||||||
// 设置搜索到的匹配位置
|
|
||||||
setListViewPrePositionByPhone();
|
setListViewPrePositionByPhone();
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
private void initView() {
|
||||||
// 初始化视图
|
|
||||||
//
|
|
||||||
void initView() {
|
|
||||||
//Drawable drawableFrame = AppCompatResources.getDrawable(this, R.drawable.bg_frame);
|
|
||||||
|
|
||||||
// 初始化标题栏
|
// 初始化标题栏
|
||||||
mToolbar = findViewById(R.id.activitycomposesmsASupportToolbar1);
|
mToolbar = (Toolbar) findViewById(R.id.activitycomposesmsASupportToolbar1);
|
||||||
mToolbar.setSubtitle(getString(R.string.activity_name_composesms));
|
mToolbar.setSubtitle(getString(R.string.activity_name_composesms));
|
||||||
setActionBar(mToolbar);
|
setActionBar(mToolbar);
|
||||||
|
|
||||||
// 初始化联系人栏目框
|
// 初始化联系人姓名显示和搜索栏
|
||||||
mtvTOName = findViewById(R.id.activitycomposesmsTextView2);
|
mtvTOName = (TextView) findViewById(R.id.activitycomposesmsTextView2);
|
||||||
mrlContracts = findViewById(R.id.activitycomposesmsRelativeLayout1);
|
mrlContracts = (RelativeLayout) findViewById(R.id.activitycomposesmsRelativeLayout1);
|
||||||
//mrlContracts.setBackground(drawableFrame);
|
metTONameSearch = (EditText) findViewById(R.id.activitycomposesmsEditText2);
|
||||||
metTONameSearch = findViewById(R.id.activitycomposesmsEditText2);
|
|
||||||
metTONameSearch.addTextChangedListener(new TextWatcher() {
|
|
||||||
@Override
|
|
||||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
|
||||||
metTO.setText("");
|
|
||||||
setListViewPrePositionByName();
|
|
||||||
}
|
|
||||||
@Override
|
|
||||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
// 姓名搜索框文本变化监听
|
||||||
public void afterTextChanged(Editable s) {
|
metTONameSearch.addTextChangedListener(new TextWatcher() {
|
||||||
|
@Override
|
||||||
|
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||||
|
metTO.setText(""); // 清空号码输入框,避免冲突
|
||||||
|
String input = s == null ? "" : s.toString().trim();
|
||||||
|
if (input.isEmpty()) {
|
||||||
|
initAdapter(null); // 空搜索时显示所有联系人
|
||||||
|
} else {
|
||||||
|
setListViewPrePositionByName(); // 按姓名搜索
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
@Override
|
||||||
});
|
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||||
|
// 无操作
|
||||||
|
}
|
||||||
|
|
||||||
// 初始化联系人列表
|
@Override
|
||||||
mlvContracts = findViewById(R.id.activitycomposesmsListView1);
|
public void afterTextChanged(Editable s) {
|
||||||
|
// 无操作
|
||||||
// 初始化联系人输入框
|
}
|
||||||
metTO = findViewById(R.id.activitycomposesmsEditText1);
|
|
||||||
metTO.setText(mszPhoneTo);
|
|
||||||
metTO.addTextChangedListener(new TextWatcher() {
|
|
||||||
@Override
|
|
||||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
|
||||||
mtvTOName.setText("");
|
|
||||||
//重新加载数据
|
|
||||||
initAdapter(null);
|
|
||||||
setListViewPrePositionByPhone();
|
|
||||||
}
|
|
||||||
@Override
|
|
||||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void afterTextChanged(Editable s) {
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// 初始化发送拉动控件
|
|
||||||
mAOHPCTCSeekBar = findViewById(R.id.viewsmssendpart1AOHPCTCSeekBar1);
|
|
||||||
mAOHPCTCSeekBar.setThumb(getDrawable(R.drawable.ic_message));
|
|
||||||
mAOHPCTCSeekBar.setThumbOffset(20);
|
|
||||||
mAOHPCTCSeekBar.setOnOHPCListener(new AOHPCTCSeekBar.OnOHPCListener() {
|
|
||||||
@Override
|
|
||||||
public void onOHPCommit() {
|
|
||||||
// 空号码不发送
|
|
||||||
mszPhoneTo = metTO.getText().toString();
|
|
||||||
if (mszPhoneTo.trim().equals("")) {
|
|
||||||
ToastUtils.show("没有设置接收号码。");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// 空消息不发送
|
|
||||||
mszSMSBody = metSMSBody.getText().toString();
|
|
||||||
if (mszSMSBody.equals("")) {
|
|
||||||
ToastUtils.show("没有消息内容可发送。");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// 发送消息
|
|
||||||
if (SMSUtil.sendMessageByInterface2(ComposeSMSActivity.this, mszPhoneTo, mszSMSBody)) {
|
|
||||||
ComposeSMSActivity.this.finish();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// 初始化提示框
|
// 初始化联系人列表(关键:设置单选模式,确保选中状态生效)
|
||||||
TextView tvAOHPCTCSeekBarMSG = findViewById(R.id.viewsmssendpart1TextView1);
|
mlvContracts = (ListView) findViewById(R.id.activitycomposesmsListView1);
|
||||||
|
mlvContracts.setChoiceMode(ListView.CHOICE_MODE_SINGLE); // 开启单选,与布局中一致
|
||||||
|
|
||||||
|
// 初始化号码输入框(核心:优化文本变化监听逻辑)
|
||||||
|
metTO = (EditText) findViewById(R.id.activitycomposesmsEditText1);
|
||||||
|
if (mszPhoneTo != null) {
|
||||||
|
metTO.setText(mszPhoneTo);
|
||||||
|
}
|
||||||
|
metTO.addTextChangedListener(new TextWatcher() {
|
||||||
|
@Override
|
||||||
|
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||||
|
mtvTOName.setText(""); // 清空姓名显示
|
||||||
|
String inputPhone = s == null ? "" : s.toString().trim();
|
||||||
|
|
||||||
|
if (inputPhone.isEmpty()) {
|
||||||
|
// 输入为空时,显示所有联系人
|
||||||
|
initAdapter(null);
|
||||||
|
} else {
|
||||||
|
// 输入非空时,按号码搜索并更新列表(无结果则清空)
|
||||||
|
filterListByPhone(inputPhone);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||||
|
// 无操作
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void afterTextChanged(Editable s) {
|
||||||
|
// 无操作
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 初始化发送控件
|
||||||
|
mAOHPCTCSeekBar = (AOHPCTCSeekBar) findViewById(R.id.viewsmssendpart1AOHPCTCSeekBar1);
|
||||||
|
Drawable thumbDrawable = getResources().getDrawable(R.drawable.ic_message); // Java 7兼容写法
|
||||||
|
mAOHPCTCSeekBar.setThumb(thumbDrawable);
|
||||||
|
mAOHPCTCSeekBar.setThumbOffset(20);
|
||||||
|
mAOHPCTCSeekBar.setOnOHPCListener(new AOHPCTCSeekBar.OnOHPCListener() {
|
||||||
|
@Override
|
||||||
|
public void onOHPCommit() {
|
||||||
|
sendSMS();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 初始化短信内容输入框
|
||||||
|
TextView tvAOHPCTCSeekBarMSG = (TextView) findViewById(R.id.viewsmssendpart1TextView1);
|
||||||
tvAOHPCTCSeekBarMSG.setText(R.string.msg_100sendmsg);
|
tvAOHPCTCSeekBarMSG.setText(R.string.msg_100sendmsg);
|
||||||
|
metSMSBody = (EditText) findViewById(R.id.viewsmssendpart1EditText1);
|
||||||
// 初始化发送消息框
|
if (mszSMSBody != null) {
|
||||||
metSMSBody = findViewById(R.id.viewsmssendpart1EditText1);
|
metSMSBody.setText(mszSMSBody);
|
||||||
//metSMSBody.setBackground(drawableFrame);
|
}
|
||||||
metSMSBody.setText(mszSMSBody);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
// 核心优化:根据输入号码筛选列表(无结果则显示空列表,优化选中逻辑)
|
||||||
// 设置号码搜索到的匹配位置
|
private void filterListByPhone(String inputPhone) {
|
||||||
//
|
PhoneUtil phoneUtil = new PhoneUtil(this);
|
||||||
void setListViewPrePositionByPhone() {
|
List<PhoneBean> allContacts = phoneUtil.getPhoneList();
|
||||||
int nPrePosition = getContractsDataPrePositionByPhone(metTO.getText().toString());
|
List<PhoneBean> matchedContacts = new ArrayList<PhoneBean>();
|
||||||
|
|
||||||
PhoneUtil phoneUtils = new PhoneUtil(this);
|
// 遍历所有联系人,匹配包含输入号码的联系人
|
||||||
mtvTOName.setText(phoneUtils.getNameByPhone(metTO.getText().toString()));
|
for (PhoneBean contact : allContacts) {
|
||||||
|
if (contact.getTelPhone().contains(inputPhone)
|
||||||
|
|| phoneUtil.isTheSamePhoneNumber(contact.getTelPhone(), inputPhone)) {
|
||||||
|
matchedContacts.add(contact);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
mlvContracts.setSelected(false);
|
LogUtils.d(TAG, "号码搜索:输入'" + inputPhone + "', 匹配" + matchedContacts.size() + "个结果");
|
||||||
mlvContracts.setSelection(nPrePosition);
|
|
||||||
|
// 用筛选结果更新列表(无结果则传入空列表)
|
||||||
|
initAdapter(matchedContacts.isEmpty() ? new ArrayList<PhoneBean>() : matchedContacts);
|
||||||
|
|
||||||
|
// 定位并选中匹配项(如果有)
|
||||||
|
if (!matchedContacts.isEmpty()) {
|
||||||
|
boolean isFound = false;
|
||||||
|
for (int i = 0; i < matchedContacts.size(); i++) {
|
||||||
|
PhoneBean item = matchedContacts.get(i);
|
||||||
|
// 精确匹配号码(兼容区域码格式)
|
||||||
|
if (phoneUtil.isTheSamePhoneNumber(item.getTelPhone(), inputPhone)) {
|
||||||
|
mtvTOName.setText(item.getName());
|
||||||
|
// 关键:先滚动到目标位置,再设置选中状态
|
||||||
|
mlvContracts.setSelection(i);
|
||||||
|
// 主动设置选中(确保样式生效,兼容部分系统)
|
||||||
|
mlvContracts.setItemChecked(i, true);
|
||||||
|
LogUtils.d(TAG, String.format("%s 匹配 %s,选中位置:%d", inputPhone, item.getTelPhone(), i));
|
||||||
|
isFound = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 若未精确匹配,选中第一个结果
|
||||||
|
/*if (!isFound) {
|
||||||
|
mlvContracts.setSelection(0);
|
||||||
|
mlvContracts.setItemChecked(0, true);
|
||||||
|
mtvTOName.setText(matchedContacts.get(0).getName());
|
||||||
|
}*/
|
||||||
|
} else {
|
||||||
|
mtvTOName.setText(""); // 无结果时清空姓名显示
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 根据姓名搜索联系人
|
||||||
//
|
private void setListViewPrePositionByName() {
|
||||||
// 设置名称搜索到的匹配位置
|
String searchName = metTONameSearch.getText().toString().trim();
|
||||||
//
|
PhoneUtil phoneUtil = new PhoneUtil(this);
|
||||||
void setListViewPrePositionByName() {
|
List<PhoneBean> matchedContacts = phoneUtil.getPhonesByName(searchName);
|
||||||
PhoneUtil phoneUtils = new PhoneUtil(this);
|
initAdapter(matchedContacts);
|
||||||
List<PhoneBean> newPhoneData = phoneUtils.getPhonesByName(metTONameSearch.getText().toString());
|
if (!matchedContacts.isEmpty()) {
|
||||||
// 重新绑定数据
|
// 选中第一个结果并设置样式
|
||||||
initAdapter(newPhoneData);
|
mlvContracts.setSelection(0);
|
||||||
mlvContracts.setSelected(false);
|
mlvContracts.setItemChecked(0, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
// 初始定位号码对应的联系人
|
||||||
// 返回搜索到的匹配位置
|
private void setListViewPrePositionByPhone() {
|
||||||
//
|
String inputPhone = metTO.getText().toString().trim();
|
||||||
int getContractsDataPrePositionByPhone(String szPhone) {
|
if (inputPhone.isEmpty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
filterListByPhone(inputPhone); // 复用筛选逻辑
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取号码匹配的位置(兼容旧逻辑)
|
||||||
|
private int getContractsDataPrePositionByPhone(String szPhone) {
|
||||||
|
if (mListPhoneBeanContracts == null || mListPhoneBeanContracts.isEmpty()) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
for (int i = 0; i < mListPhoneBeanContracts.size(); i++) {
|
for (int i = 0; i < mListPhoneBeanContracts.size(); i++) {
|
||||||
if (mListPhoneBeanContracts.get(i).getTelPhone().compareTo(szPhone) > -1) {
|
PhoneBean bean = mListPhoneBeanContracts.get(i);
|
||||||
|
if (bean.getTelPhone().compareTo(szPhone) >= 0) {
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取姓名匹配的位置(兼容旧逻辑)
|
||||||
//
|
private int getContractsDataPrePositionByName(String szName) {
|
||||||
// 返回搜索到的匹配位置
|
if (mListPhoneBeanContracts == null || mListPhoneBeanContracts.isEmpty()) {
|
||||||
//
|
return 0;
|
||||||
int getContractsDataPrePositionByName(String szName) {
|
}
|
||||||
for (int i = 0; i < mListPhoneBeanContracts.size(); i++) {
|
for (int i = 0; i < mListPhoneBeanContracts.size(); i++) {
|
||||||
if (mListPhoneBeanContracts.get(i).getName().startsWith(szName)) {
|
if (mListPhoneBeanContracts.get(i).getName().startsWith(szName)) {
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
// 初始化或更新列表适配器
|
||||||
// 初始化适配器
|
private void initAdapter(List<PhoneBean> initData) {
|
||||||
//
|
mAdapterData.clear(); // 清空旧数据
|
||||||
/*void initAdapter() {
|
final PhoneUtil phoneUtil = new PhoneUtil(this);
|
||||||
// 初始化联系人数据适配器
|
|
||||||
mAdapterData = new ArrayList<>();
|
|
||||||
// 读取联系人数据
|
|
||||||
final PhoneUtil phoneUtils = new PhoneUtil(this);
|
|
||||||
mListPhoneBeanContracts = phoneUtils.getPhoneList();
|
|
||||||
// 映射联系人数据给适配器数据对象
|
|
||||||
for (int i = 0;i < mListPhoneBeanContracts.size();i++) {
|
|
||||||
Map<String,Object> map =new HashMap<>();
|
|
||||||
map.put(MAP_NAME, mListPhoneBeanContracts.get(i).getName());
|
|
||||||
map.put(MAP_PHONE, mListPhoneBeanContracts.get(i).getTelPhone());
|
|
||||||
mAdapterData.add(map);
|
|
||||||
}
|
|
||||||
// 绑定适配器与数据
|
|
||||||
mSimpleAdapter = new SimpleAdapter(ComposeSMSActivity.this, mAdapterData, R.layout.listview_contracts
|
|
||||||
, new String[]{MAP_NAME, MAP_PHONE}
|
|
||||||
, new int[]{R.id.listviewcontractsTextView1, R.id.listviewcontractsTextView2});
|
|
||||||
mSimpleAdapter.setDropDownViewResource(R.layout.listview_contracts);
|
|
||||||
mlvContracts.setAdapter(mSimpleAdapter);
|
|
||||||
mlvContracts.setOnItemClickListener(new ListView.OnItemClickListener() {
|
|
||||||
|
|
||||||
@Override
|
// 确定数据源:传入的筛选数据或所有联系人
|
||||||
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
|
||||||
metTO.setText(mAdapterData.get(position).get(MAP_PHONE).toString());
|
|
||||||
mListPhoneBeanContracts = phoneUtils.getPhoneList();
|
|
||||||
mtvTOName.setText(phoneUtils.getNameByPhone(metTO.getText().toString()));
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}*/
|
|
||||||
|
|
||||||
void initAdapter(List<PhoneBean> initData) {
|
|
||||||
// 初始化联系人数据适配器
|
|
||||||
mAdapterData = new ArrayList<>();
|
|
||||||
final PhoneUtil phoneUtils = new PhoneUtil(this);
|
|
||||||
if (initData != null) {
|
if (initData != null) {
|
||||||
mListPhoneBeanContracts = initData;
|
mListPhoneBeanContracts = initData;
|
||||||
} else {
|
} else {
|
||||||
// 读取联系人数据
|
mListPhoneBeanContracts = phoneUtil.getPhoneList();
|
||||||
mListPhoneBeanContracts = phoneUtils.getPhoneList();
|
|
||||||
}
|
|
||||||
|
|
||||||
// 映射联系人数据给适配器数据对象
|
|
||||||
for (int i = 0;i < mListPhoneBeanContracts.size();i++) {
|
|
||||||
Map<String,Object> map =new HashMap<>();
|
|
||||||
map.put(MAP_NAME, mListPhoneBeanContracts.get(i).getName());
|
|
||||||
map.put(MAP_PHONE, mListPhoneBeanContracts.get(i).getTelPhone());
|
|
||||||
mAdapterData.add(map);
|
|
||||||
}
|
}
|
||||||
// 绑定适配器与数据
|
|
||||||
mSimpleAdapter = new SimpleAdapter(ComposeSMSActivity.this, mAdapterData, R.layout.listview_contracts
|
|
||||||
, new String[]{MAP_NAME, MAP_PHONE}
|
|
||||||
, new int[]{R.id.listviewcontractsTextView1, R.id.listviewcontractsTextView2});
|
|
||||||
mSimpleAdapter.setDropDownViewResource(R.layout.listview_contracts);
|
|
||||||
mlvContracts.setAdapter(mSimpleAdapter);
|
|
||||||
mlvContracts.setOnItemClickListener(new ListView.OnItemClickListener() {
|
|
||||||
|
|
||||||
@Override
|
// 转换数据为SimpleAdapter所需格式
|
||||||
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
if (mListPhoneBeanContracts != null) {
|
||||||
metTO.setText(mAdapterData.get(position).get(MAP_PHONE).toString());
|
for (PhoneBean bean : mListPhoneBeanContracts) {
|
||||||
mtvTOName.setText(phoneUtils.getNameByPhone(metTO.getText().toString()));
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
}
|
map.put(MAP_NAME, bean.getName());
|
||||||
});
|
map.put(MAP_PHONE, bean.getTelPhone());
|
||||||
|
mAdapterData.add(map);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 初始化或更新适配器
|
||||||
|
if (mSimpleAdapter == null) {
|
||||||
|
mSimpleAdapter = new SimpleAdapter(
|
||||||
|
ComposeSMSActivity.this,
|
||||||
|
mAdapterData,
|
||||||
|
R.layout.listview_contracts,
|
||||||
|
new String[]{MAP_NAME, MAP_PHONE},
|
||||||
|
new int[]{R.id.listviewcontractsTextView1, R.id.listviewcontractsTextView2}
|
||||||
|
);
|
||||||
|
mSimpleAdapter.setDropDownViewResource(R.layout.listview_contracts);
|
||||||
|
mlvContracts.setAdapter(mSimpleAdapter);
|
||||||
|
|
||||||
|
// 列表项点击事件:点击时主动设置选中状态,确保样式突显
|
||||||
|
mlvContracts.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
||||||
|
if (position < mAdapterData.size()) {
|
||||||
|
// 1. 主动设置当前项为选中状态
|
||||||
|
mlvContracts.setItemChecked(position, true);
|
||||||
|
// 2. 更新号码输入框和姓名显示
|
||||||
|
String phone = mAdapterData.get(position).get(MAP_PHONE).toString();
|
||||||
|
metTO.setText(phone);
|
||||||
|
mtvTOName.setText(phoneUtil.getNameByPhone(phone));
|
||||||
|
// 3. 滚动到点击位置(确保可见)
|
||||||
|
mlvContracts.setSelection(position);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 列表项选中状态变化监听(可选,增强选中反馈)
|
||||||
|
mlvContracts.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||||
|
@Override
|
||||||
|
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||||
|
// 选中时可添加额外反馈(如改变文本颜色,可选)
|
||||||
|
if (view != null) {
|
||||||
|
TextView tvName = (TextView) view.findViewById(R.id.listviewcontractsTextView1);
|
||||||
|
TextView tvPhone = (TextView) view.findViewById(R.id.listviewcontractsTextView2);
|
||||||
|
if (tvName != null) tvName.setTextColor(getResources().getColor(R.color.white));
|
||||||
|
if (tvPhone != null) tvPhone.setTextColor(getResources().getColor(R.color.white));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNothingSelected(AdapterView<?> parent) {
|
||||||
|
// 未选中时无操作
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
// 数据更新时,先取消所有旧选中状态,再通知适配器刷新
|
||||||
|
mlvContracts.clearChoices();
|
||||||
|
mSimpleAdapter.notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 发送短信逻辑
|
||||||
|
private void sendSMS() {
|
||||||
|
String phoneTo = metTO.getText().toString().trim();
|
||||||
|
if (phoneTo.isEmpty()) {
|
||||||
|
ToastUtils.show("没有设置接收号码。");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
String smsBody = metSMSBody.getText().toString().trim();
|
||||||
|
if (smsBody.isEmpty()) {
|
||||||
|
ToastUtils.show("没有消息内容可发送。");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (SMSUtil.sendMessageByInterface2(ComposeSMSActivity.this, phoneTo, smsBody)) {
|
||||||
|
finish();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,30 +1,29 @@
|
|||||||
package cc.winboll.studio.mymessagemanager.utils;
|
package cc.winboll.studio.mymessagemanager.utils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author ZhanGSKen<zhangsken@188.com>
|
* @Author ZhanGSKen&豆包大模型<zhangsken@188.com>
|
||||||
* @Date 2024/07/19 14:30:57
|
* @Date 2025/08/30 14:32
|
||||||
* @Describe 手机联系人工具类
|
* @Describe 手机联系人工具类
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import android.content.ContentResolver;
|
import android.content.ContentResolver;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.database.Cursor;
|
import android.database.Cursor;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.provider.ContactsContract;
|
import android.provider.ContactsContract;
|
||||||
import cc.winboll.studio.libappbase.LogUtils;
|
import cc.winboll.studio.libappbase.LogUtils;
|
||||||
|
import cc.winboll.studio.libapputils.utils.RegexPPiUtils;
|
||||||
import cc.winboll.studio.mymessagemanager.beans.PhoneBean;
|
import cc.winboll.studio.mymessagemanager.beans.PhoneBean;
|
||||||
import net.sourceforge.pinyin4j.PinyinHelper;
|
|
||||||
import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType;
|
|
||||||
import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat;
|
|
||||||
import net.sourceforge.pinyin4j.format.HanyuPinyinToneType;
|
|
||||||
import net.sourceforge.pinyin4j.format.exception.BadHanyuPinyinOutputFormatCombination;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
import net.sourceforge.pinyin4j.PinyinHelper;
|
||||||
|
import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType;
|
||||||
|
import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat;
|
||||||
|
import net.sourceforge.pinyin4j.format.HanyuPinyinToneType;
|
||||||
|
import net.sourceforge.pinyin4j.format.exception.BadHanyuPinyinOutputFormatCombination;
|
||||||
|
|
||||||
public class PhoneUtil {
|
public class PhoneUtil {
|
||||||
|
|
||||||
@@ -202,7 +201,7 @@ public class PhoneUtil {
|
|||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean isTheSamePhoneNumber(String szNum1, String szNum2) {
|
public boolean isTheSamePhoneNumber(String szNum1, String szNum2) {
|
||||||
if (szNum1.equals(szNum2)) {
|
if (szNum1.equals(szNum2)) {
|
||||||
LogUtils.d(TAG, "szNum1.equals(szNum2)");
|
LogUtils.d(TAG, "szNum1.equals(szNum2)");
|
||||||
return true;
|
return true;
|
||||||
|
@@ -1,32 +0,0 @@
|
|||||||
package cc.winboll.studio.mymessagemanager.utils;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author ZhanGSKen<zhangsken@188.com>
|
|
||||||
* @Date 2024/12/09 19:00:21
|
|
||||||
* @Describe .* 前置预防针
|
|
||||||
regex pointer preventive injection
|
|
||||||
简称 RegexPPi
|
|
||||||
*/
|
|
||||||
import java.util.regex.Matcher;
|
|
||||||
import java.util.regex.Pattern;
|
|
||||||
|
|
||||||
public class RegexPPiUtils {
|
|
||||||
|
|
||||||
public static final String TAG = "RegexPPiUtils";
|
|
||||||
|
|
||||||
//
|
|
||||||
// 检验文本是否满足适合正则表达式模式计算
|
|
||||||
//
|
|
||||||
public static boolean isPPiOK(String text) {
|
|
||||||
//String text = "这里是一些任意的文本内容";
|
|
||||||
String regex = ".*";
|
|
||||||
Pattern pattern = Pattern.compile(regex);
|
|
||||||
Matcher matcher = pattern.matcher(text);
|
|
||||||
/*if (matcher.matches()) {
|
|
||||||
System.out.println("文本满足该正则表达式模式");
|
|
||||||
} else {
|
|
||||||
System.out.println("文本不满足该正则表达式模式");
|
|
||||||
}*/
|
|
||||||
return matcher.matches();
|
|
||||||
}
|
|
||||||
}
|
|
@@ -8,6 +8,7 @@ package cc.winboll.studio.mymessagemanager.utils;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.util.JsonReader;
|
import android.util.JsonReader;
|
||||||
import cc.winboll.studio.libappbase.LogUtils;
|
import cc.winboll.studio.libappbase.LogUtils;
|
||||||
|
import cc.winboll.studio.libapputils.utils.RegexPPiUtils;
|
||||||
import cc.winboll.studio.mymessagemanager.beans.SMSAcceptRuleBean;
|
import cc.winboll.studio.mymessagemanager.beans.SMSAcceptRuleBean;
|
||||||
import cc.winboll.studio.mymessagemanager.beans.SMSAcceptRuleBean_V1;
|
import cc.winboll.studio.mymessagemanager.beans.SMSAcceptRuleBean_V1;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
@@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<!-- 选中状态:深灰色背景(可根据需求调整颜色) -->
|
||||||
|
<item android:state_selected="true" android:drawable="@color/list_item_selected"/>
|
||||||
|
<!-- 按压状态:浅灰色背景 -->
|
||||||
|
<item android:state_pressed="true" android:drawable="@color/list_item_pressed"/>
|
||||||
|
<!-- 默认状态:透明背景 -->
|
||||||
|
<item android:drawable="@android:color/transparent"/>
|
||||||
|
</selector>
|
@@ -1,109 +1,112 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<cc.winboll.studio.libaes.views.AToolbar
|
<cc.winboll.studio.libaes.views.AToolbar
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/toolbar_height"
|
android:layout_height="@dimen/toolbar_height"
|
||||||
android:id="@+id/activitycomposesmsASupportToolbar1"/>
|
android:id="@+id/activitycomposesmsASupportToolbar1"/>
|
||||||
|
|
||||||
<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:background="@drawable/bg_frame">
|
android:background="@drawable/bg_frame">
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:id="@+id/activitycomposesmsRelativeLayout1">
|
android:id="@+id/activitycomposesmsRelativeLayout1">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:id="@+id/activitycomposesmsLinearLayout1"
|
android:id="@+id/activitycomposesmsLinearLayout1"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_marginRight="10dp"
|
android:layout_marginRight="10dp"
|
||||||
android:layout_marginLeft="10dp"
|
android:layout_marginLeft="10dp"
|
||||||
android:layout_alignParentLeft="true">
|
android:layout_alignParentLeft="true">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="(拼音搜索):"/>
|
android:text="(拼音搜索):"/>
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:layout_width="80dp"
|
android:layout_width="80dp"
|
||||||
android:ems="10"
|
android:ems="10"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:id="@+id/activitycomposesmsEditText2"/>
|
android:id="@+id/activitycomposesmsEditText2"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentTop="true"
|
android:layout_alignParentTop="true"
|
||||||
android:layout_toRightOf="@id/activitycomposesmsEditText2"
|
android:layout_toRightOf="@id/activitycomposesmsEditText2"
|
||||||
android:id="@+id/activitycomposesmsTextView2"
|
android:id="@+id/activitycomposesmsTextView2"
|
||||||
android:layout_weight="1.0"/>
|
android:layout_weight="1.0"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:layout_below="@id/activitycomposesmsLinearLayout1"
|
android:layout_below="@id/activitycomposesmsLinearLayout1"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_marginRight="10dp"
|
android:layout_marginRight="10dp"
|
||||||
android:layout_marginLeft="10dp"
|
android:layout_marginLeft="10dp"
|
||||||
android:layout_alignParentLeft="true"
|
android:layout_alignParentLeft="true"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center_vertical">
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="(SMS TO) :"
|
android:text="(SMS TO) :"
|
||||||
android:id="@+id/activitycomposesmsTextView1"/>
|
android:id="@+id/activitycomposesmsTextView1"/>
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:inputType="phone"
|
android:inputType="phone"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:ems="10"
|
android:ems="10"
|
||||||
android:id="@+id/activitycomposesmsEditText1"/>
|
android:id="@+id/activitycomposesmsEditText1"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:padding="10dp"
|
android:padding="10dp"
|
||||||
android:layout_weight="1.0">
|
android:layout_weight="1.0">
|
||||||
|
|
||||||
<ListView
|
<!-- 关键修改:添加 listSelector 属性,关联选中样式 -->
|
||||||
android:layout_alignParentTop="true"
|
<ListView
|
||||||
android:layout_width="match_parent"
|
android:layout_alignParentTop="true"
|
||||||
android:layout_height="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_above="@+id/activitycomposesmsinclude1"
|
android:layout_height="wrap_content"
|
||||||
android:id="@+id/activitycomposesmsListView1"/>
|
android:layout_above="@+id/activitycomposesmsinclude1"
|
||||||
|
android:id="@+id/activitycomposesmsListView1"
|
||||||
|
android:listSelector="@drawable/listview_item_selector"
|
||||||
|
android:choiceMode="singleChoice"/> <!-- 开启单选模式,确保选中状态唯一 -->
|
||||||
|
|
||||||
<include
|
<include
|
||||||
layout="@layout/view_smssend"
|
layout="@layout/view_smssend"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:id="@+id/activitycomposesmsinclude1"/>
|
android:id="@+id/activitycomposesmsinclude1"/>
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
@@ -27,7 +27,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="60dp"
|
android:layout_height="60dp"
|
||||||
android:padding="10dp"
|
android:padding="10dp"
|
||||||
android:text="@string/text_onlyreceivecontacts"
|
android:text="@string/text_norulesreceivecontacts"
|
||||||
android:id="@+id/activitymainSwitchView2"/>
|
android:id="@+id/activitymainSwitchView2"/>
|
||||||
|
|
||||||
<cc.winboll.studio.mymessagemanager.views.ConfirmSwitchView
|
<cc.winboll.studio.mymessagemanager.views.ConfirmSwitchView
|
||||||
|
@@ -32,7 +32,7 @@
|
|||||||
<string name="text_item_rule_clean">清理设置</string>
|
<string name="text_item_rule_clean">清理设置</string>
|
||||||
<string name="text_sendsms">发送短信</string>
|
<string name="text_sendsms">发送短信</string>
|
||||||
<string name="text_mainservice">短信服务管理总开关</string>
|
<string name="text_mainservice">短信服务管理总开关</string>
|
||||||
<string name="text_onlyreceivecontacts">只接收联系人短信</string>
|
<string name="text_norulesreceivecontacts">无限制接收联系人短信</string>
|
||||||
<string name="text_usingtts">使用TTS语音播报</string>
|
<string name="text_usingtts">使用TTS语音播报</string>
|
||||||
<string name="text_usingttsrule">使用TTS语音自定义规则</string>
|
<string name="text_usingttsrule">使用TTS语音自定义规则</string>
|
||||||
<string name="text_iamhere">短信管理服务已启动。</string>
|
<string name="text_iamhere">短信管理服务已启动。</string>
|
||||||
|
@@ -1,5 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
|
<color name="white">#FFFFFFFF</color>
|
||||||
|
|
||||||
<color name="colorSMSSendColor">#FFDCDA3D</color>
|
<color name="colorSMSSendColor">#FFDCDA3D</color>
|
||||||
<color name="colorSMSInboxColor">#FF3DDC84</color>
|
<color name="colorSMSInboxColor">#FF3DDC84</color>
|
||||||
<color name="colorTTSRuleViewBackgroundColor">#FFDCDA3D</color>
|
<color name="colorTTSRuleViewBackgroundColor">#FFDCDA3D</color>
|
||||||
@@ -7,11 +10,11 @@
|
|||||||
<color name="colorSMSSendColorDepth">#FFA28BFF</color>
|
<color name="colorSMSSendColorDepth">#FFA28BFF</color>
|
||||||
<color name="colorSMSInboxColorDepth">#FF8BAEFF</color>
|
<color name="colorSMSInboxColorDepth">#FF8BAEFF</color>
|
||||||
<color name="colorTTSRuleViewBackgroundColorDepth">#FFA28BFF</color>
|
<color name="colorTTSRuleViewBackgroundColorDepth">#FFA28BFF</color>
|
||||||
|
|
||||||
<color name="colorSMSSendColorSky">#FFFFEB8C</color>
|
<color name="colorSMSSendColorSky">#FFFFEB8C</color>
|
||||||
<color name="colorSMSInboxColorSky">#FF8CD9FF</color>
|
<color name="colorSMSInboxColorSky">#FF8CD9FF</color>
|
||||||
<color name="colorTTSRuleViewBackgroundColorSky">#FFFFEB8C</color>
|
<color name="colorTTSRuleViewBackgroundColorSky">#FFFFEB8C</color>
|
||||||
|
|
||||||
<color name="colorSMSSendColorGolden">#FF78BDFF</color>
|
<color name="colorSMSSendColorGolden">#FF78BDFF</color>
|
||||||
<color name="colorSMSInboxColorGolden">#FFFFED78</color>
|
<color name="colorSMSInboxColorGolden">#FFFFED78</color>
|
||||||
<color name="colorTTSRuleViewBackgroundColorGolden">#FF78BDFF</color>
|
<color name="colorTTSRuleViewBackgroundColorGolden">#FF78BDFF</color>
|
||||||
@@ -19,9 +22,13 @@
|
|||||||
<color name="colorSMSSendColorMemor">#FF5AEB53</color>
|
<color name="colorSMSSendColorMemor">#FF5AEB53</color>
|
||||||
<color name="colorSMSInboxColorMemor">#FFE653EB</color>
|
<color name="colorSMSInboxColorMemor">#FFE653EB</color>
|
||||||
<color name="colorTTSRuleViewBackgroundColorMemor">#FF5AEB53</color>
|
<color name="colorTTSRuleViewBackgroundColorMemor">#FF5AEB53</color>
|
||||||
|
|
||||||
<color name="colorSMSSendColorTao">#FFB4B4B4</color>
|
<color name="colorSMSSendColorTao">#FFB4B4B4</color>
|
||||||
<color name="colorSMSInboxColorTao">#FFD9D9D9</color>
|
<color name="colorSMSInboxColorTao">#FFD9D9D9</color>
|
||||||
<color name="colorTTSRuleViewBackgroundColorTao">#FFB4B4B4</color>
|
<color name="colorTTSRuleViewBackgroundColorTao">#FFB4B4B4</color>
|
||||||
|
|
||||||
|
<!-- 列表项选中颜色(深灰) -->
|
||||||
|
<color name="list_item_selected">#FF696969</color>
|
||||||
|
<!-- 列表项按压颜色(浅灰) -->
|
||||||
|
<color name="list_item_pressed">#FFE0E0E0</color>
|
||||||
</resources>
|
</resources>
|
||||||
|
@@ -34,7 +34,7 @@
|
|||||||
<string name="text_item_rule_clean">Clean Setting</string>
|
<string name="text_item_rule_clean">Clean Setting</string>
|
||||||
<string name="text_sendsms">Send SMS</string>
|
<string name="text_sendsms">Send SMS</string>
|
||||||
<string name="text_mainservice">Main Service</string>
|
<string name="text_mainservice">Main Service</string>
|
||||||
<string name="text_onlyreceivecontacts">Only Receive Contacts</string>
|
<string name="text_norulesreceivecontacts">No rules Receive Contacts</string>
|
||||||
<string name="text_usingtts">Using TTS</string>
|
<string name="text_usingtts">Using TTS</string>
|
||||||
<string name="text_usingttsrule">Using TTS Rule</string>
|
<string name="text_usingttsrule">Using TTS Rule</string>
|
||||||
<string name="text_iamhere">The main service is start.</string>
|
<string name="text_iamhere">The main service is start.</string>
|
||||||
|
Reference in New Issue
Block a user