new editor!! Code mirror editor~
This commit is contained in:
@@ -1,23 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2016 Jecelyin Peng <jecelyin@gmail.com>
|
||||
~
|
||||
~ This file is part of 920 Text Editor.
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
~ you may not use this file except in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License.
|
||||
-->
|
||||
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<size android:height="0.5dp"/>
|
||||
<solid android:color="@color/darkDividerColor"/>
|
||||
</shape>
|
||||
@@ -64,6 +64,25 @@
|
||||
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
|
||||
<include layout="@layout/content_edit"/>
|
||||
|
||||
<com.stardust.scriptdroid.ui.edit.CodeMirrorEditor
|
||||
android:id="@+id/editor"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@null"
|
||||
android:bufferType="spannable"
|
||||
android:cursorVisible="true"
|
||||
android:gravity="top|start"
|
||||
android:text=""
|
||||
android:textCursorDrawable="@null"
|
||||
android:textIsSelectable="true"/>
|
||||
|
||||
<com.stardust.scriptdroid.ui.edit.completion.InputMethodEnhanceBar
|
||||
android:id="@+id/input_method_enhance_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="35dp"
|
||||
android:background="#e7ebec"/>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -7,43 +7,23 @@
|
||||
android:orientation="vertical"
|
||||
tools:showIn="@layout/activity_edit">
|
||||
|
||||
<com.jecelyin.editor.v2.view.EditorView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/editor"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
<com.stardust.scriptdroid.ui.edit.CodeMirrorEditor
|
||||
android:id="@+id/editor"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@null"
|
||||
android:bufferType="spannable"
|
||||
android:cursorVisible="true"
|
||||
android:gravity="top|start"
|
||||
android:text=""
|
||||
android:textCursorDrawable="@null"
|
||||
android:textIsSelectable="true"/>
|
||||
|
||||
|
||||
<com.jecelyin.editor.v2.core.widget.JecEditText
|
||||
android:id="@+id/edit_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#ffffffff"
|
||||
android:enabled="true"
|
||||
android:gravity="start|top"
|
||||
android:inputType="textMultiLine"
|
||||
android:padding="5dp"
|
||||
android:scrollbarThumbVertical="@android:color/transparent"
|
||||
android:scrollbarTrackVertical="@null"
|
||||
android:scrollbars="vertical"/>
|
||||
|
||||
<me.zhanghai.android.materialprogressbar.MaterialProgressBar
|
||||
android:id="@+id/progress_view"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="90dp"
|
||||
android:indeterminate="true"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<com.stardust.scriptdroid.ui.edit.completion.InputMethodEnhanceBar
|
||||
android:id="@+id/input_method_enhance_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="35dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="#e7ebec"/>
|
||||
|
||||
</com.jecelyin.editor.v2.view.EditorView>
|
||||
|
||||
<com.stardust.scriptdroid.ui.edit.completion.InputMethodEnhanceBar
|
||||
android:id="@+id/input_method_enhance_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="35dp"
|
||||
android:background="#e7ebec"/>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -23,12 +23,12 @@
|
||||
android:textColor="#484C4F"
|
||||
android:textSize="16sp"/>
|
||||
|
||||
<!-- android:src="@drawable/ic_arrow_drop_down_black" -->
|
||||
<ImageView
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:src="@drawable/ic_arrow_drop_down_black"
|
||||
android:tint="#484C4F"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item
|
||||
android:icon="@drawable/ic_settings"
|
||||
android:title="@string/text_setting"/>
|
||||
|
||||
<item
|
||||
android:icon="@drawable/ic_debug"
|
||||
android:actionLayout="@layout/about_activity"
|
||||
android:title="@string/debug"/>
|
||||
|
||||
<item
|
||||
android:icon="@drawable/ic_service_green"
|
||||
android:title="@string/text_accessibility_service"/>
|
||||
</menu>
|
||||
@@ -27,9 +27,9 @@
|
||||
app:showAsAction="never"/>
|
||||
|
||||
<item
|
||||
android:id="@+id/action_help"
|
||||
android:id="@+id/action_editor_theme"
|
||||
android:orderInCategory="300"
|
||||
android:title="@string/text_help"
|
||||
android:title="@string/text_editor_theme"
|
||||
app:showAsAction="never"/>
|
||||
|
||||
<item
|
||||
|
||||
@@ -27,90 +27,4 @@
|
||||
<attr name="title"/>
|
||||
</declare-styleable>
|
||||
|
||||
|
||||
<declare-styleable name="MaterialEditText">
|
||||
<attr name="met_baseColor" format="color"/>
|
||||
<attr name="met_primaryColor" format="color"/>
|
||||
<attr name="met_floatingLabel">
|
||||
<enum name="none" value="0"/>
|
||||
<enum name="normal" value="1"/>
|
||||
<enum name="highlight" value="2"/>
|
||||
</attr>
|
||||
<attr name="met_errorColor" format="color"/>
|
||||
<attr name="met_minCharacters" format="integer"/>
|
||||
<attr name="met_maxCharacters" format="integer"/>
|
||||
<attr name="met_singleLineEllipsis" format="boolean"/>
|
||||
<attr name="met_minBottomTextLines" format="integer"/>
|
||||
<attr name="met_helperText" format="string"/>
|
||||
<attr name="met_helperTextColor" format="color"/>
|
||||
<attr name="met_accentTypeface" format="string"/>
|
||||
<attr name="met_typeface" format="string"/>
|
||||
<attr name="met_floatingLabelText" format="string"/>
|
||||
<attr name="met_floatingLabelPadding" format="dimension"/>
|
||||
<attr name="met_hideUnderline" format="boolean"/>
|
||||
<attr name="met_underlineColor" format="color"/>
|
||||
<attr name="met_autoValidate" format="boolean"/>
|
||||
<attr name="met_iconLeft" format="reference"/>
|
||||
<attr name="met_iconRight" format="reference"/>
|
||||
<attr name="met_iconPadding" format="dimension"/>
|
||||
<attr name="met_clearButton" format="boolean"/>
|
||||
<attr name="met_floatingLabelTextSize" format="dimension"/>
|
||||
<attr name="met_floatingLabelTextColor" format="color"/>
|
||||
<attr name="met_bottomTextSize" format="dimension"/>
|
||||
<attr name="met_floatingLabelAlwaysShown" format="boolean"/>
|
||||
<attr name="met_helperTextAlwaysShown" format="boolean"/>
|
||||
<attr name="met_floatingLabelAnimating" format="boolean"/>
|
||||
<attr name="met_textColor" format="color"/>
|
||||
<attr name="met_textColorHint" format="color"/>
|
||||
</declare-styleable>
|
||||
<!-- From: file:/Users/rengwuxian/projects/MaterialEditText/library/src/main/res/values/dimens.xml -->
|
||||
<eat-comment/>
|
||||
<dimen name="bottom_ellipsis_height">4dp</dimen>
|
||||
<dimen name="bottom_text_size">12sp</dimen>
|
||||
<dimen name="default_padding_bottom">8dp</dimen>
|
||||
<dimen name="default_padding_top">8dp</dimen>
|
||||
<dimen name="floating_label_text_size">12sp</dimen>
|
||||
<dimen name="inner_components_spacing">8dp</dimen>
|
||||
<dimen name="inner_padding_left">0dp</dimen>
|
||||
<dimen name="inner_padding_right">0dp</dimen>
|
||||
|
||||
<declare-styleable name="RoundedImageView">
|
||||
<attr name="riv_corner_radius" format="dimension"/>
|
||||
<attr name="riv_corner_radius_top_left" format="dimension"/>
|
||||
<attr name="riv_corner_radius_top_right" format="dimension"/>
|
||||
<attr name="riv_corner_radius_bottom_left" format="dimension"/>
|
||||
<attr name="riv_corner_radius_bottom_right" format="dimension"/>
|
||||
<attr name="riv_border_width" format="dimension"/>
|
||||
<attr name="riv_border_color" format="color"/>
|
||||
<attr name="riv_mutate_background" format="boolean"/>
|
||||
<attr name="riv_oval" format="boolean"/>
|
||||
<attr name="android:scaleType"/>
|
||||
<attr name="riv_tile_mode">
|
||||
<enum name="clamp" value="0"/>
|
||||
<enum name="repeat" value="1"/>
|
||||
<enum name="mirror" value="2"/>
|
||||
</attr>
|
||||
<attr name="riv_tile_mode_x">
|
||||
<enum name="clamp" value="0"/>
|
||||
<enum name="repeat" value="1"/>
|
||||
<enum name="mirror" value="2"/>
|
||||
</attr>
|
||||
<attr name="riv_tile_mode_y">
|
||||
<enum name="clamp" value="0"/>
|
||||
<enum name="repeat" value="1"/>
|
||||
<enum name="mirror" value="2"/>
|
||||
</attr>
|
||||
</declare-styleable>
|
||||
<!-- From: file:/Users/vince/Documents/vinc3m1/RoundedImageView/roundedimageview/src/main/res/values/about_libraries_def.xml -->
|
||||
<eat-comment/>
|
||||
<string name="define_roundedimageview"/>
|
||||
<string name="library_roundedimageview_author">Vince Mi</string>
|
||||
<string name="library_roundedimageview_authorWebsite">https://github.com/vinc3m1</string>
|
||||
<string name="library_roundedimageview_isOpenSource">true</string>
|
||||
<string name="library_roundedimageview_libraryDescription">A fast ImageView (and Drawable) that supports rounded corners (and ovals or circles) based on the original example from Romain Guy.</string>
|
||||
<string name="library_roundedimageview_libraryName">RoundedImageView</string>
|
||||
<string name="library_roundedimageview_libraryVersion">1.3.0</string>
|
||||
<string name="library_roundedimageview_libraryWebsite">https://github.com/vinc3m1/RoundedImageView</string>
|
||||
<string name="library_roundedimageview_licenseId">apache_2_0</string>
|
||||
<string name="library_roundedimageview_repositoryLink">https://github.com/vinc3m1/RoundedImageView.git</string>
|
||||
</resources>
|
||||
@@ -252,6 +252,8 @@
|
||||
<string name="text_time">时间</string>
|
||||
<string name="text_size">大小</string>
|
||||
<string name="text_type">类型</string>
|
||||
<string name="text_donate">捐赠</string>
|
||||
<string name="text_editor_theme">编辑器主题</string>
|
||||
|
||||
|
||||
<string-array name="record_control_keys">
|
||||
|
||||
@@ -1,85 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="defaultColorControlNormal">#009688</color>
|
||||
|
||||
<style name="EditorTheme" parent="Theme.AppCompat.Light.NoActionBar">
|
||||
<!-- 工具栏背景 -->
|
||||
<item name="colorPrimary">@color/colorPrimary</item>
|
||||
<!--状态栏背景-->
|
||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||
<!--按钮类默认颜色-->
|
||||
<item name="colorControlNormal">@color/defaultColorControlNormal</item>
|
||||
|
||||
<!--按钮类选中颜色-->
|
||||
<item name="colorAccent">@color/colorAccent</item>
|
||||
<!--导航栏背景-->
|
||||
<!--<item name="android:navigationBarColor">@color/navigationBarColor</item>-->
|
||||
<!-- 浮在toolbar上面 -->
|
||||
<item name="windowActionModeOverlay">true</item>
|
||||
|
||||
<!--<item name="android:actionBarStyle">@style/Toolbar</item>-->
|
||||
<item name="actionBarStyle">@style/Toolbar</item>
|
||||
<!--使用方式 app:theme="?attr/actionBarTheme"-->
|
||||
<item name="actionBarTheme">@style/ToolbarTheme</item>
|
||||
<item name="actionBarPopupTheme">@style/DefaultToolbarPopupTheme</item>
|
||||
<!--菜单字体颜色-->
|
||||
<item name="actionMenuTextColor">@android:color/white</item>
|
||||
<!--<item name="actionMenuTextAppearance">@style/Toolbar.Item</item>-->
|
||||
|
||||
<item name="actionModeStyle">@style/ActionMode</item>
|
||||
<item name="actionModeFindDrawable">@drawable/find_white</item>
|
||||
<item name="actionModeCloseDrawable">@drawable/back_btn</item>
|
||||
|
||||
<item name="dividerColor">#10000000</item>
|
||||
<item name="android:listDivider">@drawable/divider</item>
|
||||
|
||||
<item name="android:textViewStyle">@style/TextViewStyle</item>
|
||||
<item name="android:editTextStyle">@style/EditTextStyle</item>
|
||||
|
||||
<!--App自定义-->
|
||||
<item name="netLoadingDrawable">@drawable/loading_icon</item>
|
||||
<item name="tabBackground">@drawable/drawer_tab_item_background</item>
|
||||
<item name="listItemBackground">@drawable/white_selectable_item_background</item>
|
||||
<item name="toolbarIconNormalColor">#ffffff</item>
|
||||
<item name="toolbarIconDisabledColor">#50ffffff</item>
|
||||
<item name="menuIconNormalColor">#23c5dd</item>
|
||||
|
||||
<!--编辑器样式-->
|
||||
<item name="textForeground">#000000</item>
|
||||
<item name="textBackground">#FFFFFF</item>
|
||||
<item name="caret">#000000</item>
|
||||
<item name="selection">@color/colorPrimary</item>
|
||||
<item name="invisibles">#dddddd</item>
|
||||
<item name="gutterForeground">#000000</item>
|
||||
<item name="gutterBackground">#dfdfdf</item>
|
||||
<item name="gutterDivider">#000000</item>
|
||||
|
||||
<!--高亮-->
|
||||
<item name="hlComment1">#cc0000</item>
|
||||
<item name="hlComment2">#ff8400</item>
|
||||
<item name="hlComment3">#cc6600</item>
|
||||
<item name="hlComment4">#cc6600</item>
|
||||
<item name="hlDigit">#ff0000</item>
|
||||
<item name="hlFoldLine0">#000000</item>
|
||||
<item name="hlFoldLine1">#000000</item>
|
||||
<item name="hlFoldLine2">#000000</item>
|
||||
<item name="hlFoldLine3">#000000</item>
|
||||
<item name="hlFunction">#9966ff</item>
|
||||
<item name="hlInvalid">#ff0066</item>
|
||||
<item name="hlKeyword1">#006699</item>
|
||||
<item name="hlKeyword2">#009966</item>
|
||||
<item name="hlKeyword3">#0099ff</item>
|
||||
<item name="hlKeyword4">#66ccff</item>
|
||||
<item name="hlLabel">#02b902</item>
|
||||
<item name="hlLiteral1">#ff00cc</item>
|
||||
<item name="hlLiteral2">#cc00cc</item>
|
||||
<item name="hlLiteral3">#9900cc</item>
|
||||
<item name="hlLiteral4">#9900cc</item>
|
||||
<item name="hlMarkup">#0000ff</item>
|
||||
<item name="hlOperator">#000000</item>
|
||||
</style>
|
||||
|
||||
<style name="DefaultToolbarPopupTheme" parent="@style/ThemeOverlay.AppCompat.Light">
|
||||
<item name="colorControlNormal">@color/defaultColorControlNormal</item>
|
||||
</style>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user