mirror of
https://github.com/leanote/leanote-android.git
synced 2025-10-17 16:07:48 +00:00
Merge pull request #6 from xingstarx/feature/new_editor
Fix not show content in EditorFragment
This commit is contained in:
@@ -84,9 +84,9 @@ public class EditorFragment extends Fragment implements Editor.EditorListener {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAttach(Context context) {
|
||||
public void onAttach(Activity context) {
|
||||
super.onAttach(context);
|
||||
if (getActivity() instanceof EditorFragmentListener) {
|
||||
if (context instanceof EditorFragmentListener) {
|
||||
mListener = (EditorFragmentListener) getActivity();
|
||||
} else {
|
||||
throw new IllegalArgumentException("Current activity is not the EditorFragmentListener");
|
||||
@@ -103,8 +103,6 @@ public class EditorFragment extends Fragment implements Editor.EditorListener {
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.fragment_editor, container, false);
|
||||
|
||||
|
||||
Bundle arguments = savedInstanceState == null ? getArguments() : savedInstanceState;
|
||||
mIsEditingEnabled = arguments.getBoolean(ARG_ENABLE_EDIT, false);
|
||||
boolean isMarkdown = arguments.getBoolean(ARG_IS_MARKDOWN, true);
|
||||
@@ -123,6 +121,7 @@ public class EditorFragment extends Fragment implements Editor.EditorListener {
|
||||
ButterKnife.bind(this, view);
|
||||
mToolContainer.setVisibility(mIsEditingEnabled ? View.VISIBLE : View.GONE);
|
||||
mEditor.init(mWebView);
|
||||
mListener.onInitialized();
|
||||
return view;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user