master
eazzy 11 months ago committed by SheYu
parent d59eca4218
commit d83cc703e2

@ -25,6 +25,7 @@ import android.util.Log;
import java.util.HashMap;
/**
<<<<<<<< HEAD:src/main/java/net/micode/notes/data/Contact.java
* @Package: net.micode.notes.data
* @ClassName: Contact
* @Description:
@ -36,6 +37,29 @@ public class Contact {
private static HashMap<String, String> sContactCache;
private static final String TAG = "Contact";
========
* @Package: net.micode.notes.data
* @ClassName: Contact
* @Description:
* Contact
* HashMap
* getContact
*
* SQL
* 线线使
* @Author: YangYizhe
* @CreateDate: 12/17/2023 10:10 AM
* @Version: 1.0
*/
public class Contact {
/**
* ,
*/
private static HashMap<String, String> sContactCache;
private static final String TAG = "Contact";//设置日志TAG标签
//查询联系人的SQL筛选语句
>>>>>>>> b654a61 (code):src/Notes/app/src/main/java/net/micode/notes/data/Contact.java
private static final String CALLER_ID_SELECTION = "PHONE_NUMBERS_EQUAL(" + Phone.NUMBER
+ ",?) AND " + Data.MIMETYPE + "='" + Phone.CONTENT_ITEM_TYPE + "'"
+ " AND " + Data.RAW_CONTACT_ID + " IN "

@ -71,6 +71,12 @@ import java.util.regex.Pattern;
*/
public class NoteEditActivity extends Activity implements OnClickListener,
NoteSettingChangedListener, OnTextViewChangeListener {
<<<<<<<< HEAD:src/main/java/net/micode/notes/ui/NoteEditActivity.java
========
/**
*
*/
>>>>>>>> b654a61 (code):src/Notes/app/src/main/java/net/micode/notes/ui/NoteEditActivity.java
private class HeadViewHolder {
public TextView tvModified;
@ -382,6 +388,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
showAlertHeader();
convertToImage();//将路径转化未图片
}
<<<<<<<< HEAD:src/main/java/net/micode/notes/ui/NoteEditActivity.java
/**
* @method showAlertHeader
* @description
@ -393,6 +400,9 @@ public class NoteEditActivity extends Activity implements OnClickListener,
* @date: 12/24/2023 6:24 PM
* @author: YangYizhe
*/
========
>>>>>>>> b654a61 (code):src/Notes/app/src/main/java/net/micode/notes/ui/NoteEditActivity.java
private void showAlertHeader() {
if (mWorkingNote.hasClockAlert()) {
long time = System.currentTimeMillis();
@ -505,12 +515,15 @@ public class NoteEditActivity extends Activity implements OnClickListener,
}
clearSettingState();
}
<<<<<<<< HEAD:src/main/java/net/micode/notes/ui/NoteEditActivity.java
/**
* @method updateWidget
* @description
* @date: 12/24/2023 6:21 PM
* @author: YangYizhe
*/
========
>>>>>>>> b654a61 (code):src/Notes/app/src/main/java/net/micode/notes/ui/NoteEditActivity.java
private void updateWidget() {
Intent intent = new Intent(AppWidgetManager.ACTION_APPWIDGET_UPDATE);
if (mWorkingNote.getWidgetType() == Notes.TYPE_WIDGET_2X) {
@ -758,6 +771,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
showToast(R.string.error_note_empty_for_clock);
}
}
<<<<<<<< HEAD:src/main/java/net/micode/notes/ui/NoteEditActivity.java
/**
* updateWidget
*/
@ -772,6 +786,11 @@ public class NoteEditActivity extends Activity implements OnClickListener,
* @param index
* @param text
*/
========
public void onWidgetChanged() {
updateWidget();
}
>>>>>>>> b654a61 (code):src/Notes/app/src/main/java/net/micode/notes/ui/NoteEditActivity.java
public void onEditTextDelete(int index, String text) {
int childCount = mEditTextList.getChildCount();
if (childCount == 1) {
@ -797,6 +816,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
edit.requestFocus();
edit.setSelection(length);
}
<<<<<<<< HEAD:src/main/java/net/micode/notes/ui/NoteEditActivity.java
/**
* @method onEditTextEnter
* @description
@ -805,6 +825,8 @@ public class NoteEditActivity extends Activity implements OnClickListener,
* @param index
* @param text
*/
========
>>>>>>>> b654a61 (code):src/Notes/app/src/main/java/net/micode/notes/ui/NoteEditActivity.java
public void onEditTextEnter(int index, String text) {
/**
* Should not happen, check for debug
@ -823,6 +845,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
.setIndex(i);
}
}
<<<<<<<< HEAD:src/main/java/net/micode/notes/ui/NoteEditActivity.java
/**
* @method switchToListMode
* @description
@ -830,6 +853,8 @@ public class NoteEditActivity extends Activity implements OnClickListener,
* @author: YangYizhe
* @param text
*/
========
>>>>>>>> b654a61 (code):src/Notes/app/src/main/java/net/micode/notes/ui/NoteEditActivity.java
private void switchToListMode(String text) {
mEditTextList.removeAllViews();
String[] items = text.split("\n");
@ -846,6 +871,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
mNoteEditor.setVisibility(View.GONE);
mEditTextList.setVisibility(View.VISIBLE);
}
<<<<<<<< HEAD:src/main/java/net/micode/notes/ui/NoteEditActivity.java
/**
* @method getHighlightQueryResult
* @description
@ -855,6 +881,8 @@ public class NoteEditActivity extends Activity implements OnClickListener,
* @param userQuery
* @return Spannable
*/
========
>>>>>>>> b654a61 (code):src/Notes/app/src/main/java/net/micode/notes/ui/NoteEditActivity.java
private Spannable getHighlightQueryResult(String fullText, String userQuery) {
SpannableString spannable = new SpannableString(fullText == null ? "" : fullText);
if (!TextUtils.isEmpty(userQuery)) {
@ -871,6 +899,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
}
return spannable;
}
<<<<<<<< HEAD:src/main/java/net/micode/notes/ui/NoteEditActivity.java
/**
* @method getListItem
* @description
@ -880,6 +909,8 @@ public class NoteEditActivity extends Activity implements OnClickListener,
* @param index
* @return
*/
========
>>>>>>>> b654a61 (code):src/Notes/app/src/main/java/net/micode/notes/ui/NoteEditActivity.java
private View getListItem(String item, int index) {
View view = LayoutInflater.from(this).inflate(R.layout.note_edit_list_item, null);
final NoteEditText edit = (NoteEditText) view.findViewById(R.id.et_edit_text);
@ -910,6 +941,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
edit.setText(getHighlightQueryResult(item, mUserQuery));
return view;
}
<<<<<<<< HEAD:src/main/java/net/micode/notes/ui/NoteEditActivity.java
/**
* @method onTextChange
* @description
@ -918,6 +950,8 @@ public class NoteEditActivity extends Activity implements OnClickListener,
* @param index
* @param hasText
*/
========
>>>>>>>> b654a61 (code):src/Notes/app/src/main/java/net/micode/notes/ui/NoteEditActivity.java
public void onTextChange(int index, boolean hasText) {
if (index >= mEditTextList.getChildCount()) {
Log.e(TAG, "Wrong index, should not happen");
@ -929,6 +963,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
mEditTextList.getChildAt(index).findViewById(R.id.cb_edit_item).setVisibility(View.GONE);
}
}
<<<<<<<< HEAD:src/main/java/net/micode/notes/ui/NoteEditActivity.java
/**
* @method onCheckListModeChanged
* @description
@ -937,6 +972,9 @@ public class NoteEditActivity extends Activity implements OnClickListener,
* @param oldMode
* @param newMode
*/
========
>>>>>>>> b654a61 (code):src/Notes/app/src/main/java/net/micode/notes/ui/NoteEditActivity.java
public void onCheckListModeChanged(int oldMode, int newMode) {
if (newMode == TextNote.MODE_CHECK_LIST) {
switchToListMode(mNoteEditor.getText().toString());
@ -950,6 +988,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
mNoteEditor.setVisibility(View.VISIBLE);
}
}
<<<<<<<< HEAD:src/main/java/net/micode/notes/ui/NoteEditActivity.java
/**
* @method getWorkingText
* @description
@ -957,6 +996,8 @@ public class NoteEditActivity extends Activity implements OnClickListener,
* @author: YangYizhe
* @return
*/
========
>>>>>>>> b654a61 (code):src/Notes/app/src/main/java/net/micode/notes/ui/NoteEditActivity.java
private boolean getWorkingText() {
boolean hasChecked = false;//初始化check标记
if (mWorkingNote.getCheckListMode() == TextNote.MODE_CHECK_LIST) {
@ -996,6 +1037,11 @@ public class NoteEditActivity extends Activity implements OnClickListener,
* 便,退
* @date: 12/21/2023 8:14 AM
* @author: YangYizhe
<<<<<<<< HEAD:src/main/java/net/micode/notes/ui/NoteEditActivity.java
========
* @param
* @return
>>>>>>>> b654a61 (code):src/Notes/app/src/main/java/net/micode/notes/ui/NoteEditActivity.java
*/
private boolean saveNote() {
getWorkingText();
@ -1020,6 +1066,11 @@ public class NoteEditActivity extends Activity implements OnClickListener,
* send to home
* @date: 12/21/2023 8:15 AM
* @author: YangYizhe
<<<<<<<< HEAD:src/main/java/net/micode/notes/ui/NoteEditActivity.java
========
* @param
* @return
>>>>>>>> b654a61 (code):src/Notes/app/src/main/java/net/micode/notes/ui/NoteEditActivity.java
*/
private void sendToDesktop() {
/**
@ -1055,6 +1106,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
showToast(R.string.error_note_empty_for_send_to_desktop);
}
}
<<<<<<<< HEAD:src/main/java/net/micode/notes/ui/NoteEditActivity.java
/**
* @method makeShortcutIconTitle
* @description
@ -1063,6 +1115,8 @@ public class NoteEditActivity extends Activity implements OnClickListener,
* @param content
* @return
*/
========
>>>>>>>> b654a61 (code):src/Notes/app/src/main/java/net/micode/notes/ui/NoteEditActivity.java
private String makeShortcutIconTitle(String content) {
content = content.replace(TAG_CHECKED, "");
content = content.replace(TAG_UNCHECKED, "");

@ -46,12 +46,28 @@ import java.util.Map;
* @Version: 1.0
*/
public class NoteEditText extends EditText {
<<<<<<<< HEAD:src/main/java/net/micode/notes/ui/NoteEditText.java
private static final String TAG = "NoteEditText";
private int mIndex;
private int mSelectionStartBeforeDelete;
private static final String SCHEME_TEL = "tel:" ;
private static final String SCHEME_HTTP = "http:" ;
private static final String SCHEME_EMAIL = "mailto:" ;
========
//常量标识
private static final String TAG = "NoteEditText";
//声明整型变量,文本索引
private int mIndex;
//声明整型变量
private int mSelectionStartBeforeDelete;
//声明字符串常量,标志电话、网址、邮件
private static final String SCHEME_TEL = "tel:" ;
private static final String SCHEME_HTTP = "http:" ;
private static final String SCHEME_EMAIL = "mailto:" ;
//设置映射,将文本内容(电话、网址、邮件)做链接处理
>>>>>>>> b654a61 (code):src/Notes/app/src/main/java/net/micode/notes/ui/NoteEditText.java
private static final Map<String, Integer> sSchemaActionResMap = new HashMap<String, Integer>();
static {
sSchemaActionResMap.put(SCHEME_TEL, R.string.note_link_tel);
@ -96,9 +112,13 @@ public class NoteEditText extends EditText {
mIndex = 0;
}
<<<<<<<< HEAD:src/main/java/net/micode/notes/ui/NoteEditText.java
/**
*
*/
========
//设置索引号
>>>>>>>> b654a61 (code):src/Notes/app/src/main/java/net/micode/notes/ui/NoteEditText.java
public void setIndex(int index) {
mIndex = index;
}
@ -124,6 +144,17 @@ public class NoteEditText extends EditText {
// TODO Auto-generated constructor stub
}
<<<<<<<< HEAD:src/main/java/net/micode/notes/ui/NoteEditText.java
========
/**
* @method onTouchEvent
* @description
* @date: 12/21/2023 12:41 AM
* @author: YangYizhe
* @param
* @return
*/
>>>>>>>> b654a61 (code):src/Notes/app/src/main/java/net/micode/notes/ui/NoteEditText.java
@Override
/**
* @method onTouchEvent
@ -235,6 +266,17 @@ public class NoteEditText extends EditText {
super.onFocusChanged(focused, direction, previouslyFocusedRect);
}
<<<<<<<< HEAD:src/main/java/net/micode/notes/ui/NoteEditText.java
========
/**
* @method onCreateContextMenu
* @description
* @date: 12/21/2023 12:39 AM
* @author: YangYizhe
* @param
* @return
*/
>>>>>>>> b654a61 (code):src/Notes/app/src/main/java/net/micode/notes/ui/NoteEditText.java
@Override
/**
* @method onCreateContextMenu

Loading…
Cancel
Save