I have some working knowledge of Android but I'm new to Fragments, Injection, Binding, ButterKnife .etc. I have gone through some videos and tutorials but can't catch where the problem is.
What I want to do:
There is this activity and Code (MeshInteractionActivity.java) which I've got from a GitHub repository. I want to make another activity which is MainActivity.java and connect to this Mesh Activity on button press. I thought it would be just straightforward to do an Intent from MainActivity to MeshInteractionActivity. But it didn't work. I felt maybe it needs a fragment on MainActivity which Intents to 2nd Activity and so I created MainFragment.java. I get the 2 buttons on my MainFragment but when I press Mesh button i.e. mesh()
method in MainFragment I get an app crash.
I tried learning ButterKnife and seeing some videos but they were too basic and I didn't understand how they will fit into my use case. Since my code has a section like this:
Things which I've still not got the meaning of.
The error I get:
My source Activity is MainActivity.java:
My source fragment which is inflated by MainActivity is MainFragment.java:
My destination Activity to which an Intent in my fragment of MainActivity jumps to is MeshInteractionActivity:
This activity too, has its own fragments but I guess the problem is where the Intent from 1st Activity fragment jumps to 2nd Activity.
Thanks in advance.