master
eazzy 11 months ago
parent 798416e7c4
commit 6b0b1950aa

@ -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 "

@ -67,6 +67,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;
@ -288,6 +294,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
*/
showAlertHeader();
}
<<<<<<<< HEAD:src/main/java/net/micode/notes/ui/NoteEditActivity.java
/**
* @method showAlertHeader
* @description
@ -299,6 +306,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();
@ -410,12 +420,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) {
@ -664,6 +677,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
*/
@ -678,6 +692,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) {
@ -703,6 +722,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
@ -711,6 +731,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
@ -729,6 +751,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
.setIndex(i);
}
}
<<<<<<<< HEAD:src/main/java/net/micode/notes/ui/NoteEditActivity.java
/**
* @method switchToListMode
* @description
@ -736,6 +759,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");
@ -752,6 +777,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
@ -761,6 +787,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)) {
@ -777,6 +805,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
}
return spannable;
}
<<<<<<<< HEAD:src/main/java/net/micode/notes/ui/NoteEditActivity.java
/**
* @method getListItem
* @description
@ -786,6 +815,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);
@ -816,6 +847,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
@ -824,6 +856,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");
@ -835,6 +869,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
@ -843,6 +878,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());
@ -856,6 +894,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
@ -863,6 +902,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) {
@ -902,6 +943,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();
@ -926,6 +972,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() {
/**
@ -961,6 +1012,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
@ -969,6 +1021,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