|
|
@ -67,9 +67,6 @@ import java.util.regex.Pattern;
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public class NoteEditActivity extends Activity implements OnClickListener,
|
|
|
|
public class NoteEditActivity extends Activity implements OnClickListener,
|
|
|
|
NoteSettingChangedListener, OnTextViewChangeListener {
|
|
|
|
NoteSettingChangedListener, OnTextViewChangeListener {
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 类属性的定义
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
private class HeadViewHolder {
|
|
|
|
private class HeadViewHolder {
|
|
|
|
public TextView tvModified;
|
|
|
|
public TextView tvModified;
|
|
|
|
|
|
|
|
|
|
|
@ -259,7 +256,12 @@ public class NoteEditActivity extends Activity implements OnClickListener,
|
|
|
|
initNoteScreen();
|
|
|
|
initNoteScreen();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* @method initNoteScreen
|
|
|
|
|
|
|
|
* @description 初始化笔记页面
|
|
|
|
|
|
|
|
* @date: 12/24/2023 6:24 PM
|
|
|
|
|
|
|
|
* @author: YangYizhe
|
|
|
|
|
|
|
|
*/
|
|
|
|
private void initNoteScreen() {
|
|
|
|
private void initNoteScreen() {
|
|
|
|
mNoteEditor.setTextAppearance(this, TextAppearanceResources
|
|
|
|
mNoteEditor.setTextAppearance(this, TextAppearanceResources
|
|
|
|
.getTexAppearanceResource(mFontSizeId));
|
|
|
|
.getTexAppearanceResource(mFontSizeId));
|
|
|
@ -286,7 +288,17 @@ public class NoteEditActivity extends Activity implements OnClickListener,
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
showAlertHeader();
|
|
|
|
showAlertHeader();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* @method showAlertHeader
|
|
|
|
|
|
|
|
* @description
|
|
|
|
|
|
|
|
* 根据当前便签是否设置了提醒时间来显示或隐藏提醒信息头部
|
|
|
|
|
|
|
|
* 如果设置了提醒时间,会根据当前时间判断提醒是否过期
|
|
|
|
|
|
|
|
* 如果已经过期,则在头部显示“已过期”字样
|
|
|
|
|
|
|
|
* 否则在头部显示距离提醒时间还有多长时间,同时显示一个提醒图标。
|
|
|
|
|
|
|
|
* 如果没有设置提醒时间,则隐藏提醒信息头部。
|
|
|
|
|
|
|
|
* @date: 12/24/2023 6:24 PM
|
|
|
|
|
|
|
|
* @author: YangYizhe
|
|
|
|
|
|
|
|
*/
|
|
|
|
private void showAlertHeader() {
|
|
|
|
private void showAlertHeader() {
|
|
|
|
if (mWorkingNote.hasClockAlert()) {
|
|
|
|
if (mWorkingNote.hasClockAlert()) {
|
|
|
|
long time = System.currentTimeMillis();
|
|
|
|
long time = System.currentTimeMillis();
|
|
|
@ -398,6 +410,12 @@ public class NoteEditActivity extends Activity implements OnClickListener,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
clearSettingState();
|
|
|
|
clearSettingState();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* @method updateWidget
|
|
|
|
|
|
|
|
* @description 更新小部件的操作
|
|
|
|
|
|
|
|
* @date: 12/24/2023 6:21 PM
|
|
|
|
|
|
|
|
* @author: YangYizhe
|
|
|
|
|
|
|
|
*/
|
|
|
|
private void updateWidget() {
|
|
|
|
private void updateWidget() {
|
|
|
|
Intent intent = new Intent(AppWidgetManager.ACTION_APPWIDGET_UPDATE);
|
|
|
|
Intent intent = new Intent(AppWidgetManager.ACTION_APPWIDGET_UPDATE);
|
|
|
|
if (mWorkingNote.getWidgetType() == Notes.TYPE_WIDGET_2X) {
|
|
|
|
if (mWorkingNote.getWidgetType() == Notes.TYPE_WIDGET_2X) {
|
|
|
@ -454,7 +472,13 @@ public class NoteEditActivity extends Activity implements OnClickListener,
|
|
|
|
saveNote();
|
|
|
|
saveNote();
|
|
|
|
super.onBackPressed();
|
|
|
|
super.onBackPressed();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* @method clearSettingState
|
|
|
|
|
|
|
|
* @description 清除设置状态,
|
|
|
|
|
|
|
|
* @date: 12/24/2023 6:22 PM
|
|
|
|
|
|
|
|
* @author: YangYizhe
|
|
|
|
|
|
|
|
* @return boolean 返回是否成功清除设置状态
|
|
|
|
|
|
|
|
*/
|
|
|
|
private boolean clearSettingState() {
|
|
|
|
private boolean clearSettingState() {
|
|
|
|
if (mNoteBgColorSelector.getVisibility() == View.VISIBLE) {
|
|
|
|
if (mNoteBgColorSelector.getVisibility() == View.VISIBLE) {
|
|
|
|
mNoteBgColorSelector.setVisibility(View.GONE);
|
|
|
|
mNoteBgColorSelector.setVisibility(View.GONE);
|
|
|
@ -465,6 +489,12 @@ public class NoteEditActivity extends Activity implements OnClickListener,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* @method onBackgroundColorChanged
|
|
|
|
|
|
|
|
* @description 当背景颜色改变时调用
|
|
|
|
|
|
|
|
* @date: 12/24/2023 6:23 PM
|
|
|
|
|
|
|
|
* @author: YangYizhe
|
|
|
|
|
|
|
|
*/
|
|
|
|
public void onBackgroundColorChanged() {
|
|
|
|
public void onBackgroundColorChanged() {
|
|
|
|
findViewById(sBgSelectorSelectionMap.get(mWorkingNote.getBgColorId())).setVisibility(
|
|
|
|
findViewById(sBgSelectorSelectionMap.get(mWorkingNote.getBgColorId())).setVisibility(
|
|
|
|
View.VISIBLE);
|
|
|
|
View.VISIBLE);
|
|
|
@ -496,6 +526,14 @@ public class NoteEditActivity extends Activity implements OnClickListener,
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* @method onOptionsItemSelected
|
|
|
|
|
|
|
|
* @description 处理菜单项选择的操作
|
|
|
|
|
|
|
|
* @date: 12/24/2023 6:21 PM
|
|
|
|
|
|
|
|
* @author: YangYizhe
|
|
|
|
|
|
|
|
* @param [item] 被选中的菜单项
|
|
|
|
|
|
|
|
* @return boolean 返回操作是否成功
|
|
|
|
|
|
|
|
*/
|
|
|
|
public boolean onOptionsItemSelected(MenuItem item) {
|
|
|
|
public boolean onOptionsItemSelected(MenuItem item) {
|
|
|
|
int itemId = item.getItemId();
|
|
|
|
int itemId = item.getItemId();
|
|
|
|
if (itemId == R.id.menu_new_note) {
|
|
|
|
if (itemId == R.id.menu_new_note) {
|
|
|
@ -626,9 +664,20 @@ public class NoteEditActivity extends Activity implements OnClickListener,
|
|
|
|
showToast(R.string.error_note_empty_for_clock);
|
|
|
|
showToast(R.string.error_note_empty_for_clock);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 当小部件发生改变时调用updateWidget
|
|
|
|
|
|
|
|
*/
|
|
|
|
public void onWidgetChanged() {
|
|
|
|
public void onWidgetChanged() {
|
|
|
|
updateWidget();
|
|
|
|
updateWidget();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* @method onEditTextDelete
|
|
|
|
|
|
|
|
* @description 删除文本框的操作
|
|
|
|
|
|
|
|
* @date: 12/24/2023 6:19 PM
|
|
|
|
|
|
|
|
* @author: YangYizhe
|
|
|
|
|
|
|
|
* @param index 文本框索引
|
|
|
|
|
|
|
|
* @param text 文本框中的文本内容
|
|
|
|
|
|
|
|
*/
|
|
|
|
public void onEditTextDelete(int index, String text) {
|
|
|
|
public void onEditTextDelete(int index, String text) {
|
|
|
|
int childCount = mEditTextList.getChildCount();
|
|
|
|
int childCount = mEditTextList.getChildCount();
|
|
|
|
if (childCount == 1) {
|
|
|
|
if (childCount == 1) {
|
|
|
@ -654,6 +703,14 @@ public class NoteEditActivity extends Activity implements OnClickListener,
|
|
|
|
edit.requestFocus();
|
|
|
|
edit.requestFocus();
|
|
|
|
edit.setSelection(length);
|
|
|
|
edit.setSelection(length);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* @method onEditTextEnter
|
|
|
|
|
|
|
|
* @description 编辑文本框中按下回车键的操作
|
|
|
|
|
|
|
|
* @date: 12/24/2023 6:19 PM
|
|
|
|
|
|
|
|
* @author: YangYizhe
|
|
|
|
|
|
|
|
* @param index 文本框索引
|
|
|
|
|
|
|
|
* @param text 文本框中的文本内容
|
|
|
|
|
|
|
|
*/
|
|
|
|
public void onEditTextEnter(int index, String text) {
|
|
|
|
public void onEditTextEnter(int index, String text) {
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Should not happen, check for debug
|
|
|
|
* Should not happen, check for debug
|
|
|
@ -672,6 +729,13 @@ public class NoteEditActivity extends Activity implements OnClickListener,
|
|
|
|
.setIndex(i);
|
|
|
|
.setIndex(i);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* @method switchToListMode
|
|
|
|
|
|
|
|
* @description 切换到列表模式
|
|
|
|
|
|
|
|
* @date: 12/24/2023 6:19 PM
|
|
|
|
|
|
|
|
* @author: YangYizhe
|
|
|
|
|
|
|
|
* @param text 列表文本
|
|
|
|
|
|
|
|
*/
|
|
|
|
private void switchToListMode(String text) {
|
|
|
|
private void switchToListMode(String text) {
|
|
|
|
mEditTextList.removeAllViews();
|
|
|
|
mEditTextList.removeAllViews();
|
|
|
|
String[] items = text.split("\n");
|
|
|
|
String[] items = text.split("\n");
|
|
|
@ -688,6 +752,15 @@ public class NoteEditActivity extends Activity implements OnClickListener,
|
|
|
|
mNoteEditor.setVisibility(View.GONE);
|
|
|
|
mNoteEditor.setVisibility(View.GONE);
|
|
|
|
mEditTextList.setVisibility(View.VISIBLE);
|
|
|
|
mEditTextList.setVisibility(View.VISIBLE);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* @method getHighlightQueryResult
|
|
|
|
|
|
|
|
* @description 获取高亮查询结果
|
|
|
|
|
|
|
|
* @date: 12/24/2023 6:18 PM
|
|
|
|
|
|
|
|
* @author: YangYizhe
|
|
|
|
|
|
|
|
* @param fullText 完整文本
|
|
|
|
|
|
|
|
* @param userQuery 用户查询关键词
|
|
|
|
|
|
|
|
* @return 带有高亮效果的 Spannable 对象
|
|
|
|
|
|
|
|
*/
|
|
|
|
private Spannable getHighlightQueryResult(String fullText, String userQuery) {
|
|
|
|
private Spannable getHighlightQueryResult(String fullText, String userQuery) {
|
|
|
|
SpannableString spannable = new SpannableString(fullText == null ? "" : fullText);
|
|
|
|
SpannableString spannable = new SpannableString(fullText == null ? "" : fullText);
|
|
|
|
if (!TextUtils.isEmpty(userQuery)) {
|
|
|
|
if (!TextUtils.isEmpty(userQuery)) {
|
|
|
@ -704,6 +777,15 @@ public class NoteEditActivity extends Activity implements OnClickListener,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return spannable;
|
|
|
|
return spannable;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* @method getListItem
|
|
|
|
|
|
|
|
* @description 获取列表项视图
|
|
|
|
|
|
|
|
* @date: 12/24/2023 6:17 PM
|
|
|
|
|
|
|
|
* @author: YangYizhe
|
|
|
|
|
|
|
|
* @param item 列表项内容
|
|
|
|
|
|
|
|
* @param index 列表项索引
|
|
|
|
|
|
|
|
* @return 列表项视图
|
|
|
|
|
|
|
|
*/
|
|
|
|
private View getListItem(String item, int index) {
|
|
|
|
private View getListItem(String item, int index) {
|
|
|
|
View view = LayoutInflater.from(this).inflate(R.layout.note_edit_list_item, null);
|
|
|
|
View view = LayoutInflater.from(this).inflate(R.layout.note_edit_list_item, null);
|
|
|
|
final NoteEditText edit = (NoteEditText) view.findViewById(R.id.et_edit_text);
|
|
|
|
final NoteEditText edit = (NoteEditText) view.findViewById(R.id.et_edit_text);
|
|
|
@ -734,6 +816,14 @@ public class NoteEditActivity extends Activity implements OnClickListener,
|
|
|
|
edit.setText(getHighlightQueryResult(item, mUserQuery));
|
|
|
|
edit.setText(getHighlightQueryResult(item, mUserQuery));
|
|
|
|
return view;
|
|
|
|
return view;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* @method onTextChange
|
|
|
|
|
|
|
|
* @description 当文本内容发生变化时的处理方法
|
|
|
|
|
|
|
|
* @date: 12/24/2023 6:17 PM
|
|
|
|
|
|
|
|
* @author: YangYizhe
|
|
|
|
|
|
|
|
* @param index 文本索引
|
|
|
|
|
|
|
|
* @param hasText 是否有文本内容
|
|
|
|
|
|
|
|
*/
|
|
|
|
public void onTextChange(int index, boolean hasText) {
|
|
|
|
public void onTextChange(int index, boolean hasText) {
|
|
|
|
if (index >= mEditTextList.getChildCount()) {
|
|
|
|
if (index >= mEditTextList.getChildCount()) {
|
|
|
|
Log.e(TAG, "Wrong index, should not happen");
|
|
|
|
Log.e(TAG, "Wrong index, should not happen");
|
|
|
@ -745,52 +835,64 @@ public class NoteEditActivity extends Activity implements OnClickListener,
|
|
|
|
mEditTextList.getChildAt(index).findViewById(R.id.cb_edit_item).setVisibility(View.GONE);
|
|
|
|
mEditTextList.getChildAt(index).findViewById(R.id.cb_edit_item).setVisibility(View.GONE);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* @method onCheckListModeChanged
|
|
|
|
|
|
|
|
* @description 当检查列表模式发生变化时的处理方法
|
|
|
|
|
|
|
|
* @date: 12/24/2023 6:17 PM
|
|
|
|
|
|
|
|
* @author: YangYizhe
|
|
|
|
|
|
|
|
* @param oldMode 旧的模式
|
|
|
|
|
|
|
|
* @param newMode 新的模式
|
|
|
|
|
|
|
|
*/
|
|
|
|
public void onCheckListModeChanged(int oldMode, int newMode) {
|
|
|
|
public void onCheckListModeChanged(int oldMode, int newMode) {
|
|
|
|
if (newMode == TextNote.MODE_CHECK_LIST) {
|
|
|
|
if (newMode == TextNote.MODE_CHECK_LIST) {
|
|
|
|
switchToListMode(mNoteEditor.getText().toString());
|
|
|
|
switchToListMode(mNoteEditor.getText().toString());
|
|
|
|
//检查模式切换到列表模式
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
if (!getWorkingText()) {
|
|
|
|
if (!getWorkingText()) {
|
|
|
|
mWorkingNote.setWorkingText(mWorkingNote.getContent().replace(TAG_UNCHECKED + " ",
|
|
|
|
mWorkingNote.setWorkingText(mWorkingNote.getContent().replace(TAG_UNCHECKED + " ",
|
|
|
|
""));
|
|
|
|
""));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//若是获取到文本就改变其检查标记
|
|
|
|
|
|
|
|
mNoteEditor.setText(getHighlightQueryResult(mWorkingNote.getContent(), mUserQuery));
|
|
|
|
mNoteEditor.setText(getHighlightQueryResult(mWorkingNote.getContent(), mUserQuery));
|
|
|
|
mEditTextList.setVisibility(View.GONE);
|
|
|
|
mEditTextList.setVisibility(View.GONE);
|
|
|
|
mNoteEditor.setVisibility(View.VISIBLE);
|
|
|
|
mNoteEditor.setVisibility(View.VISIBLE);
|
|
|
|
//修改文本编辑器的内容和可见性
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* @method getWorkingText
|
|
|
|
|
|
|
|
* @description 获取正在编辑的文本内容
|
|
|
|
|
|
|
|
* @date: 12/24/2023 6:12 PM
|
|
|
|
|
|
|
|
* @author: YangYizhe
|
|
|
|
|
|
|
|
* @return 是否存在已打钩的选项
|
|
|
|
|
|
|
|
*/
|
|
|
|
private boolean getWorkingText() {
|
|
|
|
private boolean getWorkingText() {
|
|
|
|
boolean hasChecked = false;
|
|
|
|
boolean hasChecked = false;//初始化check标记
|
|
|
|
//初始化check标记
|
|
|
|
|
|
|
|
if (mWorkingNote.getCheckListMode() == TextNote.MODE_CHECK_LIST) {
|
|
|
|
if (mWorkingNote.getCheckListMode() == TextNote.MODE_CHECK_LIST) {
|
|
|
|
// 若模式为CHECK_LIST
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 若模式为CHECK_LIST
|
|
|
|
|
|
|
|
* 先创建可变字符串
|
|
|
|
|
|
|
|
* 遍历所有子编辑框的视图
|
|
|
|
|
|
|
|
*/
|
|
|
|
StringBuilder sb = new StringBuilder();
|
|
|
|
StringBuilder sb = new StringBuilder();
|
|
|
|
//创建可变字符串
|
|
|
|
|
|
|
|
for (int i = 0; i < mEditTextList.getChildCount(); i++) {
|
|
|
|
for (int i = 0; i < mEditTextList.getChildCount(); i++) {
|
|
|
|
View view = mEditTextList.getChildAt(i);
|
|
|
|
View view = mEditTextList.getChildAt(i);
|
|
|
|
//遍历所有子编辑框的视图
|
|
|
|
|
|
|
|
NoteEditText edit = (NoteEditText) view.findViewById(R.id.et_edit_text);
|
|
|
|
NoteEditText edit = (NoteEditText) view.findViewById(R.id.et_edit_text);
|
|
|
|
if (!TextUtils.isEmpty(edit.getText())) {
|
|
|
|
if (!TextUtils.isEmpty(edit.getText())) {
|
|
|
|
//若文本不为空
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 若文本不为空
|
|
|
|
|
|
|
|
* 该选项框已打钩
|
|
|
|
|
|
|
|
* 扩展字符串为已打钩并把标记置true
|
|
|
|
|
|
|
|
*/
|
|
|
|
if (((CheckBox) view.findViewById(R.id.cb_edit_item)).isChecked()) {
|
|
|
|
if (((CheckBox) view.findViewById(R.id.cb_edit_item)).isChecked()) {
|
|
|
|
//该选项框已打钩
|
|
|
|
|
|
|
|
sb.append(TAG_CHECKED).append(" ").append(edit.getText()).append("\n");
|
|
|
|
sb.append(TAG_CHECKED).append(" ").append(edit.getText()).append("\n");
|
|
|
|
hasChecked = true;
|
|
|
|
hasChecked = true;
|
|
|
|
//扩展字符串为已打钩并把标记置true
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
sb.append(TAG_UNCHECKED).append(" ").append(edit.getText()).append("\n");
|
|
|
|
|
|
|
|
//扩展字符串添加未打钩
|
|
|
|
//扩展字符串添加未打钩
|
|
|
|
|
|
|
|
sb.append(TAG_UNCHECKED).append(" ").append(edit.getText()).append("\n");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
mWorkingNote.setWorkingText(sb.toString());
|
|
|
|
mWorkingNote.setWorkingText(sb.toString());//利用编辑好的字符串设置运行便签的内容
|
|
|
|
//利用编辑好的字符串设置运行便签的内容
|
|
|
|
} else {// 若不是该模式直接用编辑器中的内容设置运行中标签的内容
|
|
|
|
} else {
|
|
|
|
|
|
|
|
mWorkingNote.setWorkingText(mNoteEditor.getText().toString());
|
|
|
|
mWorkingNote.setWorkingText(mNoteEditor.getText().toString());
|
|
|
|
// 若不是该模式直接用编辑器中的内容设置运行中标签的内容
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return hasChecked;
|
|
|
|
return hasChecked;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -800,8 +902,6 @@ public class NoteEditActivity extends Activity implements OnClickListener,
|
|
|
|
* 保存便签,退出时候会自动调本函数
|
|
|
|
* 保存便签,退出时候会自动调本函数
|
|
|
|
* @date: 12/21/2023 8:14 AM
|
|
|
|
* @date: 12/21/2023 8:14 AM
|
|
|
|
* @author: YangYizhe
|
|
|
|
* @author: YangYizhe
|
|
|
|
* @param
|
|
|
|
|
|
|
|
* @return
|
|
|
|
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
private boolean saveNote() {
|
|
|
|
private boolean saveNote() {
|
|
|
|
getWorkingText();
|
|
|
|
getWorkingText();
|
|
|
@ -826,8 +926,6 @@ public class NoteEditActivity extends Activity implements OnClickListener,
|
|
|
|
* send to home功能,发到桌面上
|
|
|
|
* send to home功能,发到桌面上
|
|
|
|
* @date: 12/21/2023 8:15 AM
|
|
|
|
* @date: 12/21/2023 8:15 AM
|
|
|
|
* @author: YangYizhe
|
|
|
|
* @author: YangYizhe
|
|
|
|
* @param
|
|
|
|
|
|
|
|
* @return
|
|
|
|
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
private void sendToDesktop() {
|
|
|
|
private void sendToDesktop() {
|
|
|
|
/**
|
|
|
|
/**
|
|
|
@ -863,6 +961,14 @@ public class NoteEditActivity extends Activity implements OnClickListener,
|
|
|
|
showToast(R.string.error_note_empty_for_send_to_desktop);
|
|
|
|
showToast(R.string.error_note_empty_for_send_to_desktop);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* @method makeShortcutIconTitle
|
|
|
|
|
|
|
|
* @description 生成快捷方式图标标题
|
|
|
|
|
|
|
|
* @date: 12/24/2023 6:11 PM
|
|
|
|
|
|
|
|
* @author: YangYizhe
|
|
|
|
|
|
|
|
* @param content 内容
|
|
|
|
|
|
|
|
* @return 生成的快捷方式图标标题
|
|
|
|
|
|
|
|
*/
|
|
|
|
private String makeShortcutIconTitle(String content) {
|
|
|
|
private String makeShortcutIconTitle(String content) {
|
|
|
|
content = content.replace(TAG_CHECKED, "");
|
|
|
|
content = content.replace(TAG_CHECKED, "");
|
|
|
|
content = content.replace(TAG_UNCHECKED, "");
|
|
|
|
content = content.replace(TAG_UNCHECKED, "");
|
|
|
|