markdown-notepad | Online markdown editor.The BEST or NOTHING | Editor library
kandi X-RAY | markdown-notepad Summary
kandi X-RAY | markdown-notepad Summary
This is an awesome tool on the web for markdown text editing.Awesome features buit-in: multi-tabs,autosaving,inserting local image without upload,paste the screen capture and so on. Getting Started.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of markdown-notepad
markdown-notepad Key Features
markdown-notepad Examples and Code Snippets
Community Discussions
Trending Discussions on markdown-notepad
QUESTION
I'm trying to convert Activity
to Fragment
and I'm sruggling to understand how to do it properly with this one.
Basically, I'm trying to adapt this MainActivity so as it fits a bottom navigation bar and besides getting lost in contexts, I'm dealing with this specific issue:
E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.com, PID: 5213 java.lang.ClassCastException: com.example.com.MainActivity cannot be cast to com.example.com.adapter.NotesAdapter$OnNoteItemClick at com.example.com.adapter.NotesAdapter.(NotesAdapter.java:27) at com.example.com.RoomMarkdownActivity.onCreateView(RoomMarkdownActivity.java:54) at android.support.v4.app.Fragment.performCreateView(Fragment.java:2439) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1460) at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1784) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1852) at android.support.v4.app.BackStackRecord.executeOps(BackStackRecord.java:802) at android.support.v4.app.FragmentManagerImpl.executeOps(FragmentManager.java:2625) at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2411) at android.support.v4.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2366) at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2273) at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:733) at android.os.Handler.handleCallback(Handler.java:873) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6669) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
I/Process: Sending signal. PID: 5213 SIG: 9 Application terminated.
Here is a copy of the piece of code I'm working on:
...ANSWER
Answered 2018-Nov-23 at 21:11You cannot cast Activity to OnNoteItemClick because you implement it in your fragment, you can assign a OnNoteItemClick to your adapter so you can change your code to : adapter:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install markdown-notepad
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page