功能:撤回undo,重做redo

加粗B,斜体I,下划线,划线,下标112,上标123
多重标题H1~H6
bullet
列表
代办
段落左右移动
左对齐,居中,右对齐
yangyizhe_branch
eazzy 10 months ago
parent 73953b77e9
commit bf78bf8ca5

1
.gitignore vendored

@ -2,3 +2,4 @@
/src/.idea/ /src/.idea/
/src/Notes-master1/ /src/Notes-master1/
/.idea/ /.idea/
/MiNotes.iml/

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<module version="4"> <module version="4">
<component name="SonarLintModuleSettings"> <component name="SonarLintModuleSettings">
<option name="uniqueId" value="18300d37-5ebe-4daf-adcc-83be2c208e6a" /> <option name="uniqueId" value="499b6a1f-5e4f-45a0-a056-ac9b183cc908" />
</component> </component>
</module> </module>

@ -4,6 +4,9 @@
android:versionCode="1" android:versionCode="1"
android:versionName="0.1"> <!-- - 指定应用程序需要支持的最低的 Android SDK 版本 --> android:versionName="0.1"> <!-- - 指定应用程序需要支持的最低的 Android SDK 版本 -->
<uses-sdk android:minSdkVersion="14" /> <uses-sdk android:minSdkVersion="14" />
<uses-feature
android:name="android.hardware.camera"
android:required="false" />
<!-- - 权限声明 --> <!-- - 权限声明 -->
<!-- - 写入 SD 卡的权限 --> <!-- - 写入 SD 卡的权限 -->
@ -16,6 +19,10 @@
<uses-permission android:name="android.permission.GET_ACCOUNTS" /> <uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" /> <!--- 开机自动运行权限 --> <uses-permission android:name="android.permission.USE_CREDENTIALS" /> <!--- 开机自动运行权限 -->
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.INTERNET" /> <!-- 网络权限 -->
<uses-permission android:name="android.permission.CAMERA" /> <!-- 相机权限 -->
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <!-- 读取SD卡权限 -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <!-- 写SD卡权限 -->
<application <application
android:icon="@drawable/icon_app_1" android:icon="@drawable/icon_app_1"

@ -19,8 +19,6 @@ import android.text.SpannableString;
import android.text.TextUtils; import android.text.TextUtils;
import android.text.format.DateUtils; import android.text.format.DateUtils;
import android.text.style.BackgroundColorSpan; import android.text.style.BackgroundColorSpan;
import android.text.Editable;// 引入textwatcher和Editable
import android.text.TextWatcher;
import android.util.Log; import android.util.Log;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.Menu; import android.view.Menu;
@ -32,7 +30,6 @@ import android.view.WindowManager;
import android.widget.CheckBox; import android.widget.CheckBox;
import android.widget.CompoundButton; import android.widget.CompoundButton;
import android.widget.CompoundButton.OnCheckedChangeListener; import android.widget.CompoundButton.OnCheckedChangeListener;
import android.widget.EditText;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import android.widget.TextView; import android.widget.TextView;
@ -57,6 +54,8 @@ import java.util.Map;
import java.util.regex.Matcher; import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import jp.wasabeef.richeditor.RichEditor;
/** /**
* @Package: net.micode.notes.ui * @Package: net.micode.notes.ui
* @ClassName: NoteEditActivity * @ClassName: NoteEditActivity
@ -119,7 +118,12 @@ public class NoteEditActivity extends Activity implements OnClickListener,
private View mHeadViewPanel; private View mHeadViewPanel;
private View mNoteBgColorSelector; private View mNoteBgColorSelector;
private View mFontSizeSelector; private View mFontSizeSelector;
private EditText mNoteEditor; //private EditText mNoteEditor;
private RichEditor mNoteEditor;//富文本编辑器
private TextView mPreview;
private String mText;//mText和mNoteLength是给富文本编辑器的
private int mNoteLength;
private int mFontSize;
private View mNoteEditorPanel; private View mNoteEditorPanel;
public WorkingNote mWorkingNote; public WorkingNote mWorkingNote;
private SharedPreferences mSharedPrefs; private SharedPreferences mSharedPrefs;
@ -137,50 +141,299 @@ public class NoteEditActivity extends Activity implements OnClickListener,
private String mUserQuery; private String mUserQuery;
private Pattern mPattern; private Pattern mPattern;
/**
*
*
*/
public void initRichEditor(){
mNoteEditor.setEditorHeight(200);//设置编辑器界面高度
mNoteEditor.setEditorFontSize(22);//字体大小
mNoteEditor.setEditorFontColor(1);//字体颜色
mNoteEditor.setPadding(0, 0, 0, 0);//内边距
mNoteEditor.setPlaceholder("点击输入内容");//设置默认显示语句
mNoteEditor.setInputEnabled(true);//设置编辑器是否可用
mNoteEditor.setBackgroundResource(R.drawable.edit_yellow);//编辑背景
mNoteEditor.setOnTextChangeListener(new RichEditor.OnTextChangeListener() {
@Override
public void onTextChange(String text) {
mText = text;
mNoteLength = textChange(mText).length();
mNoteHeaderHolder.tvModified.setText(DateUtils.formatDateTime(NoteEditActivity.this,
mWorkingNote.getModifiedDate(), DateUtils.FORMAT_SHOW_DATE
| DateUtils.FORMAT_NUMERIC_DATE | DateUtils.FORMAT_SHOW_TIME
| DateUtils.FORMAT_SHOW_YEAR)+"\n字符数"+mNoteLength);
}
});
findViewById(R.id.action_undo).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mNoteEditor.undo();
}
});
findViewById(R.id.action_redo).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mNoteEditor.redo();
}
});
findViewById(R.id.action_bold).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mNoteEditor.setBold();
}
});
findViewById(R.id.action_italic).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mNoteEditor.setItalic();
}
});
findViewById(R.id.action_subscript).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mNoteEditor.setSubscript();
}
});
findViewById(R.id.action_superscript).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mNoteEditor.setSuperscript();
}
});
findViewById(R.id.action_strikethrough).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mNoteEditor.setStrikeThrough();
}
});
findViewById(R.id.action_underline).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mNoteEditor.setUnderline();
}
});
findViewById(R.id.action_heading1).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mNoteEditor.setHeading(1);
}
});
findViewById(R.id.action_heading2).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mNoteEditor.setHeading(2);
}
});
findViewById(R.id.action_heading3).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mNoteEditor.setHeading(3);
}
});
findViewById(R.id.action_heading4).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mNoteEditor.setHeading(4);
}
});
findViewById(R.id.action_heading5).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mNoteEditor.setHeading(5);
}
});
findViewById(R.id.action_heading6).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mNoteEditor.setHeading(6);
}
});
/**findViewById(R.id.action_txt_color).setOnClickListener(new View.OnClickListener() {
private boolean isChanged;
@Override
public void onClick(View v) {
mNoteEditor.setTextColor(isChanged ? Color.BLACK : Color.RED);
isChanged = !isChanged;
}
});*/
/**findViewById(R.id.action_bg_color).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {//设置点击响应方法
mNoteEditor.focusEditor();
new AlertDialog.Builder(NoteEditActivity.this).setTitle("选择字体背景颜色")//设置一个AlertDialog供用户选择具体的颜色
.setSingleChoiceItems(R.array.text_bg_color, 0,
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
switch (which) {
//红
case 0:
mNoteEditor.setTextBackgroundColor(Color.RED);
break;
//黄
case 1:
mNoteEditor.setTextBackgroundColor(Color.YELLOW);
break;
//蓝
case 2:
mNoteEditor.setTextBackgroundColor(Color.BLUE);
break;
//绿
case 3:
mNoteEditor.setTextBackgroundColor(Color.GREEN);
break;
//黑
case 4:
mNoteEditor.setTextBackgroundColor(Color.BLACK);
break;
case 5:
mNoteEditor.setTextBackgroundColor(Color.WHITE);
break;
}
}
}).show();
}
});*/
findViewById(R.id.action_indent).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mNoteEditor.setIndent();
}
});
findViewById(R.id.action_outdent).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mNoteEditor.setOutdent();
}
});
findViewById(R.id.action_align_left).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mNoteEditor.setAlignLeft();
}
});
findViewById(R.id.action_align_center).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mNoteEditor.setAlignCenter();
}
});
findViewById(R.id.action_align_right).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mNoteEditor.setAlignRight();
}
});
findViewById(R.id.action_blockquote).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mNoteEditor.setBlockquote();
}
});
findViewById(R.id.action_insert_bullets).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mNoteEditor.setBullets();
}
});
findViewById(R.id.action_insert_numbers).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mNoteEditor.setNumbers();
}
});
/**findViewById(R.id.action_insert_link).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mNoteEditor.insertLink("https://github.com/wasabeef", "wasabeef");
}
});*/
findViewById(R.id.action_insert_checkbox).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mNoteEditor.insertTodo();
}
});
}
/** /**
* @method Textchange * @method textChange
* @description * @description
* @date: 1/3/2024 8:48 AM * @date: 1/3/2024 8:48 AM
* @author: YangYizhe * @author: YangYizhe
* @param oriText * @param oriText
* @return * @return
*/ */
private String Textchange(String oriText){ private String textChange(String oriText) {
StringBuffer stringBuffer = new StringBuffer(oriText); StringBuilder stringBuilder = new StringBuilder(oriText);
int Flag1 = -1;
int Flag2 = -1;
do {//不计入表示图片的字符
Flag1 = stringBuffer.indexOf("<img");
Flag2 = stringBuffer.indexOf(">");
if (Flag1 != -1 && Flag2 != -1) {
stringBuffer = stringBuffer.replace(Flag1, Flag2+1, "");
}
} while (Flag1 != -1 && Flag2 != -1);
do {//不计入换行字符 // 移除所有<>
Flag1 = stringBuffer.indexOf("\n"); removeAngleBrackets(stringBuilder);
if (Flag1 != -1){ // 移除换行符和空格
stringBuffer = stringBuffer.replace(Flag1, Flag1+1, ""); for (int i = 0; i < stringBuilder.length(); i++) {
char c = stringBuilder.charAt(i);
if (c == '\n' || c == ' ') {
stringBuilder.deleteCharAt(i);
i--;
}
} }
} while (Flag1 != -1);
do {//不计入空格字符
Flag1 = stringBuffer.indexOf(" ");
if (Flag1 != -1) { return stringBuilder.toString();
stringBuffer = stringBuffer.replace(Flag1, Flag1+1, ""); }
/**
* @method removeAngleBrackets
* @description <></>
* @date: 1/18/2024 7:22 PM
* @author: YangYizhe
* @param
* @return
*/
private void removeAngleBrackets(StringBuilder stringBuilder) {
int startIndex = stringBuilder.indexOf("<");
int endIndex = stringBuilder.indexOf(">");
if (startIndex != -1 && endIndex != -1 && startIndex < endIndex) {
stringBuilder.delete(startIndex, endIndex + 1);
removeAngleBrackets(stringBuilder);
} }
} while (Flag1 != -1);
return stringBuffer.toString();
} }
/** /**
* @method count * @method count
* @description * @description
* @date: 1/3/2024 9:09 AM * @date: 1/3/2024 9:09 AM
* @author: YangYizhe * @author: YangYizhe
*/ */
private void count() { /**private void count() {
mNoteEditor.addTextChangedListener(new TextWatcher() { mNoteEditor.addTextChangedListener(new TextWatcher() {
int currentLength = 0; int currentLength = 0;
@Override @Override
@ -190,7 +443,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
@Override @Override
public void onTextChanged(CharSequence s, int start, int before, int count) { public void onTextChanged(CharSequence s, int start, int before, int count) {
currentLength = Textchange(mNoteEditor.getText().toString()).length(); currentLength = textChange(mNoteEditor.getText().toString()).length();
} }
@Override @Override
@ -198,7 +451,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
mNoteHeaderHolder.textNum.setText("字数:" + currentLength); mNoteHeaderHolder.textNum.setText("字数:" + currentLength);
} }
}); });
} }*/
/** /**
* Activity * Activity
@ -212,7 +465,8 @@ public class NoteEditActivity extends Activity implements OnClickListener,
return; return;
} }
initResources(); initResources();
count(); initRichEditor();
//count();
} }
/** /**
@ -332,13 +586,12 @@ public class NoteEditActivity extends Activity implements OnClickListener,
* @author: YangYizhe * @author: YangYizhe
*/ */
private void initNoteScreen() { private void initNoteScreen() {
mNoteEditor.setTextAppearance(this, TextAppearanceResources mNoteEditor.setEditorFontSize(30);
.getTexAppearanceResource(mFontSizeId));
if (mWorkingNote.getCheckListMode() == TextNote.MODE_CHECK_LIST) { if (mWorkingNote.getCheckListMode() == TextNote.MODE_CHECK_LIST) {
switchToListMode(mWorkingNote.getContent()); switchToListMode(mWorkingNote.getContent());
} else { } else {
mNoteEditor.setText(getHighlightQueryResult(mWorkingNote.getContent(), mUserQuery)); mNoteEditor.setHtml(String.valueOf(getHighlightQueryResult(mWorkingNote.getContent(), mUserQuery)));
mNoteEditor.setSelection(mNoteEditor.getText().length()); //mNoteEditor.setSelection(mText.length());
} }
for (Integer id : sBgSelectorSelectionMap.keySet()) { for (Integer id : sBgSelectorSelectionMap.keySet()) {
findViewById(sBgSelectorSelectionMap.get(id)).setVisibility(View.GONE); findViewById(sBgSelectorSelectionMap.get(id)).setVisibility(View.GONE);
@ -446,7 +699,18 @@ public class NoteEditActivity extends Activity implements OnClickListener,
mNoteHeaderHolder.ibSetBgColor = (ImageView) findViewById(R.id.btn_set_bg_color); mNoteHeaderHolder.ibSetBgColor = (ImageView) findViewById(R.id.btn_set_bg_color);
mNoteHeaderHolder.textNum = (TextView) findViewById(R.id.text_num); mNoteHeaderHolder.textNum = (TextView) findViewById(R.id.text_num);
mNoteHeaderHolder.ibSetBgColor.setOnClickListener(this); mNoteHeaderHolder.ibSetBgColor.setOnClickListener(this);
mNoteEditor = (EditText) findViewById(R.id.note_edit_view); mNoteEditor = findViewById(R.id.note_edit_view);
mNoteEditor.setOnTextChangeListener(new RichEditor.OnTextChangeListener() {
@Override
public void onTextChange(String text) {
mText = text;
mNoteLength = textChange(mText).length();
mNoteHeaderHolder.tvModified.setText(DateUtils.formatDateTime(NoteEditActivity.this,
mWorkingNote.getModifiedDate(), DateUtils.FORMAT_SHOW_DATE
| DateUtils.FORMAT_NUMERIC_DATE | DateUtils.FORMAT_SHOW_TIME
| DateUtils.FORMAT_SHOW_YEAR)+"\n字符数"+mNoteLength);
}
});
mNoteEditorPanel = findViewById(R.id.sv_note_edit); mNoteEditorPanel = findViewById(R.id.sv_note_edit);
mNoteBgColorSelector = findViewById(R.id.note_bg_color_selector); mNoteBgColorSelector = findViewById(R.id.note_bg_color_selector);
for (int id : sBgSelectorBtnsMap.keySet()) { for (int id : sBgSelectorBtnsMap.keySet()) {
@ -526,8 +790,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
getWorkingText(); getWorkingText();
switchToListMode(mWorkingNote.getContent()); switchToListMode(mWorkingNote.getContent());
} else { } else {
mNoteEditor.setTextAppearance(this, mNoteEditor.setEditorFontSize(mFontSizeId);
TextAppearanceResources.getTexAppearanceResource(mFontSizeId));
} }
mFontSizeSelector.setVisibility(View.GONE); mFontSizeSelector.setVisibility(View.GONE);
} }
@ -822,15 +1085,15 @@ public class NoteEditActivity extends Activity implements OnClickListener,
mEditTextList.setVisibility(View.VISIBLE); mEditTextList.setVisibility(View.VISIBLE);
} }
/** /**
* @param fullText
* @param userQuery
* @return Spannable
* @method getHighlightQueryResult * @method getHighlightQueryResult
* @description * @description
* @date: 12/24/2023 6:18 PM * @date: 12/24/2023 6:18 PM
* @author: YangYizhe * @author: YangYizhe
* @param fullText
* @param userQuery
* @return Spannable
*/ */
private Spannable getHighlightQueryResult(String fullText, String userQuery) { private SpannableString 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)) {
mPattern = Pattern.compile(userQuery); mPattern = Pattern.compile(userQuery);
@ -914,13 +1177,13 @@ public class NoteEditActivity extends Activity implements OnClickListener,
*/ */
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(mText.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.setHtml(String.valueOf(getHighlightQueryResult(mWorkingNote.getContent(), mUserQuery)));
mEditTextList.setVisibility(View.GONE); mEditTextList.setVisibility(View.GONE);
mNoteEditor.setVisibility(View.VISIBLE); mNoteEditor.setVisibility(View.VISIBLE);
} }
@ -961,7 +1224,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
} }
mWorkingNote.setWorkingText(sb.toString());//利用编辑好的字符串设置运行便签的内容 mWorkingNote.setWorkingText(sb.toString());//利用编辑好的字符串设置运行便签的内容
} else {// 若不是该模式直接用编辑器中的内容设置运行中标签的内容 } else {// 若不是该模式直接用编辑器中的内容设置运行中标签的内容
mWorkingNote.setWorkingText(mNoteEditor.getText().toString()); mWorkingNote.setWorkingText(mText.toString());
} }
return hasChecked; return hasChecked;
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 420 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 486 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 650 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 679 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 498 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 615 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 708 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 825 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 867 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 372 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 342 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 322 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 579 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 840 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

@ -85,17 +85,17 @@
<ScrollView <ScrollView
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="0dip" android:layout_height="0dip"
android:layout_gravity="left|top"
android:layout_weight="1" android:layout_weight="1"
android:scrollbars="none" android:fadingEdgeLength="0dip"
android:overScrollMode="never" android:overScrollMode="never"
android:layout_gravity="left|top" android:scrollbars="none">
android:fadingEdgeLength="0dip">
<LinearLayout <LinearLayout
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="fill_parent"> android:layout_height="fill_parent">
<net.micode.notes.ui.NoteEditText <jp.wasabeef.richeditor.RichEditor
android:id="@+id/note_edit_view" android:id="@+id/note_edit_view"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -111,8 +111,8 @@
android:id="@+id/note_edit_list" android:id="@+id/note_edit_list"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginLeft="-10dip" android:layout_marginLeft="-10dip"
android:orientation="vertical"
android:visibility="gone" /> android:visibility="gone" />
</LinearLayout> </LinearLayout>
</ScrollView> </ScrollView>
@ -395,14 +395,249 @@
<ImageView <ImageView
android:id="@+id/iv_super_select" android:id="@+id/iv_super_select"
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:layout_gravity="bottom|right" android:layout_gravity="bottom|right"
android:focusable="false"
android:visibility="gone"
android:layout_marginRight="6dip" android:layout_marginRight="6dip"
android:layout_marginBottom="-7dip" android:layout_marginBottom="-7dip"
android:src="@drawable/selected" /> android:focusable="false"
android:src="@drawable/selected"
android:visibility="gone" />
</FrameLayout> </FrameLayout>
</LinearLayout> </LinearLayout>
<HorizontalScrollView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageButton
android:id="@+id/action_undo"
android:layout_width="48dp"
android:layout_height="48dp"
android:background="@null"
android:contentDescription="@null"
android:src="@drawable/undo" />
<ImageButton
android:id="@+id/action_redo"
android:layout_width="48dp"
android:layout_height="48dp"
android:background="@null"
android:contentDescription="@null"
android:src="@drawable/redo" />
<ImageButton
android:id="@+id/action_bold"
android:layout_width="48dp"
android:layout_height="48dp"
android:background="@null"
android:contentDescription="@null"
android:src="@drawable/bold" />
<ImageButton
android:id="@+id/action_italic"
android:layout_width="48dp"
android:layout_height="48dp"
android:background="@null"
android:contentDescription="@null"
android:src="@drawable/italic" />
<ImageButton
android:id="@+id/action_subscript"
android:layout_width="48dp"
android:layout_height="48dp"
android:background="@null"
android:contentDescription="@null"
android:src="@drawable/subscript" />
<ImageButton
android:id="@+id/action_superscript"
android:layout_width="48dp"
android:layout_height="48dp"
android:background="@null"
android:contentDescription="@null"
android:src="@drawable/superscript" />
<ImageButton
android:id="@+id/action_strikethrough"
android:layout_width="48dp"
android:layout_height="48dp"
android:background="@null"
android:contentDescription="@null"
android:src="@drawable/strikethrough" />
<ImageButton
android:id="@+id/action_underline"
android:layout_width="48dp"
android:layout_height="48dp"
android:background="@null"
android:contentDescription="@null"
android:src="@drawable/underline" />
<ImageButton
android:id="@+id/action_heading1"
android:layout_width="48dp"
android:layout_height="48dp"
android:background="@null"
android:contentDescription="@null"
android:src="@drawable/h1" />
<ImageButton
android:id="@+id/action_heading2"
android:layout_width="48dp"
android:layout_height="48dp"
android:background="@null"
android:contentDescription="@null"
android:src="@drawable/h2" />
<ImageButton
android:id="@+id/action_heading3"
android:layout_width="48dp"
android:layout_height="48dp"
android:background="@null"
android:contentDescription="@null"
android:src="@drawable/h3" />
<ImageButton
android:id="@+id/action_heading4"
android:layout_width="48dp"
android:layout_height="48dp"
android:background="@null"
android:contentDescription="@null"
android:src="@drawable/h4" />
<ImageButton
android:id="@+id/action_heading5"
android:layout_width="48dp"
android:layout_height="48dp"
android:background="@null"
android:contentDescription="@null"
android:src="@drawable/h5" />
<ImageButton
android:id="@+id/action_heading6"
android:layout_width="48dp"
android:layout_height="48dp"
android:background="@null"
android:contentDescription="@null"
android:src="@drawable/h6" />
<ImageButton
android:id="@+id/action_indent"
android:layout_width="48dp"
android:layout_height="48dp"
android:background="@null"
android:contentDescription="@null"
android:src="@drawable/indent" />
<ImageButton
android:id="@+id/action_outdent"
android:layout_width="48dp"
android:layout_height="48dp"
android:background="@null"
android:contentDescription="@null"
android:src="@drawable/outdent" />
<ImageButton
android:id="@+id/action_align_left"
android:layout_width="48dp"
android:layout_height="48dp"
android:background="@null"
android:contentDescription="@null"
android:src="@drawable/justify_left" />
<ImageButton
android:id="@+id/action_align_center"
android:layout_width="48dp"
android:layout_height="48dp"
android:background="@null"
android:contentDescription="@null"
android:src="@drawable/justify_center" />
<ImageButton
android:id="@+id/action_align_right"
android:layout_width="48dp"
android:layout_height="48dp"
android:background="@null"
android:contentDescription="@null"
android:src="@drawable/justify_right" />
<ImageButton
android:id="@+id/action_insert_bullets"
android:layout_width="48dp"
android:layout_height="48dp"
android:background="@null"
android:contentDescription="@null"
android:src="@drawable/bullets" />
<ImageButton
android:id="@+id/action_insert_numbers"
android:layout_width="48dp"
android:layout_height="48dp"
android:background="@null"
android:contentDescription="@null"
android:src="@drawable/numbers" />
<ImageButton
android:id="@+id/action_blockquote"
android:layout_width="48dp"
android:layout_height="48dp"
android:background="@null"
android:contentDescription="@null"
android:src="@drawable/blockquote" />
<!--ImageButton
android:id="@+id/action_insert_image"
android:layout_width="48dp"
android:layout_height="48dp"
android:background="@null"
android:contentDescription="@null"
android:src="@drawable/insert_image" />
<ImageButton
android:id="@+id/action_insert_audio"
android:layout_width="48dp"
android:layout_height="48dp"
android:background="@null"
android:contentDescription="@null"
android:src="@drawable/music" />
<ImageButton
android:id="@+id/action_insert_video"
android:layout_width="48dp"
android:layout_height="48dp"
android:background="@null"
android:contentDescription="@null"
android:src="@drawable/video" />
<ImageButton
android:id="@+id/action_insert_youtube"
android:layout_width="48dp"
android:layout_height="48dp"
android:background="@null"
android:contentDescription="@null"
android:src="@drawable/youtube" />
<ImageButton
android:id="@+id/action_insert_link"
android:layout_width="48dp"
android:layout_height="48dp"
android:background="@null"
android:contentDescription="@null"
android:src="@drawable/insert_link" /-->
<ImageButton
android:id="@+id/action_insert_checkbox"
android:layout_width="48dp"
android:layout_height="48dp"
android:background="@null"
android:contentDescription="@null"
android:src="@android:drawable/checkbox_on_background" />
</LinearLayout>
</HorizontalScrollView>
</FrameLayout> </FrameLayout>

Loading…
Cancel
Save