Skip to content

Commit 4dcafbb

Browse files
committed
Improve scroll
1 parent 5cdee66 commit 4dcafbb

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

libeditor/src/main/java/com/jecelyin/editor/v2/editor/EditorDelegate.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
import com.duy.ide.editor.core.widget.BaseEditorView;
4949
import com.duy.ide.editor.editor.R;
5050
import com.duy.ide.editor.model.EditorIndex;
51-
import com.duy.ide.editor.view.EditorView;
5251
import com.duy.ide.editor.view.IEditAreaView;
5352
import com.duy.ide.file.SaveListener;
5453
import com.jecelyin.common.utils.DLog;
@@ -149,9 +148,9 @@ public IEditAreaView getEditText() {
149148
return mEditText;
150149
}
151150

152-
public void setEditorView(EditorView editorView) {
151+
public void setEditorView(IEditAreaView editorView) {
153152
mContext = editorView.getContext();
154-
mEditText = editorView.getEditText();
153+
mEditText = editorView;
155154
mOrientation = mContext.getResources().getConfiguration().orientation;
156155

157156
TypedArray a = mContext.obtainStyledAttributes(new int[]{R.attr.findResultsKeyword});

libeditor/src/main/java/com/jecelyin/editor/v2/editor/EditorFragment.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
import com.duy.ide.editor.editor.R;
2929
import com.duy.ide.editor.pager.EditorPageDescriptor;
30-
import com.duy.ide.editor.view.EditorView;
30+
import com.duy.ide.editor.view.IEditAreaView;
3131
import com.jecelyin.editor.v2.Preferences;
3232

3333
import java.io.File;
@@ -70,8 +70,8 @@ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup c
7070
File file = (File) arguments.getSerializable(KEY_FILE);
7171
mEditorDelegate = new EditorDelegate(file, offset, encoding);
7272
}
73-
EditorView view = (EditorView) inflater.inflate(R.layout.fragment_editor, container, false);
74-
mEditorDelegate.setEditorView(view);
73+
View view = inflater.inflate(R.layout.fragment_editor, container, false);
74+
mEditorDelegate.setEditorView((IEditAreaView) view.findViewById(R.id.edit_text));
7575
return view;
7676
}
7777

0 commit comments

Comments
 (0)