🔥Great video but I use a Fragment instead of Activity and when i pass the parameter "recyclerView Interface" as "this" show as error What do you think? or what is the alternative of this in Fragment Situation
I like your video. They are very good and easy to understand. Please can you do a video on a PDF app. That an app that has PDF and when you click on it you can see the contain of the pdf
Actually, I'm not using an API. I got the descriptions from the internet and the names/abbreviations from my biochem book. The vector images of the molecules were made in Adobe Illustrator. I'm gonna be using them in an app I'm working on so probably won't be releasing them😬 Thought it would be cool to use them rather than the default vectors that come with Android Studio. Little different than what everyone else is doing on RU-vid and it's more of a real-world example I think.
I am so confused on the very last part where you're putting all the different pages' info on one activity... any way you could go more in depth with me? Struggling for school :(
I getting error in main acitivity adapter where tour error is gone by writing this my is not going and it is sating to create recyclerview interface then making it null
@@Sydewinder890 it also worked on me, but can't quite follow how to put an extra description, i had my data stored in the string. did u add the additional textview in the adapter? kinda confusing
I'm not sure where I saw this on the Android Developers page but from what I understand, you're supposed to handle what happens in the onClickListener from your activity and use a callback implementation using an interface. So in the video, we passed the interface to our adaptor and from the adaptor, we were able to call the callback function when an item was clicked because we set an onClickListener to each of our itemViews. Did that answer your question? I'm not entirely sure what you mean by "itemCallback". Maybe we're talking about the same thing?
You showed all the steps but didn't clarify the last ones. If you don't want others to be able to use what you teach, just don't post videos for views. And what is up with you showing such a zoomed-in portion of your code? It's very difficult to follow.
Can someone help me i do everything as in video but i still get this error "error: not an enclosing class: RecyclerViewInterface myAdapter = new MyAdapter(ItemView.this, userArrayList, RecyclerViewInterface.this);" I am not sure why i get this error, also my program has little bit more code for some other things and i dont know if something in there can cause this problem.
At 5:53, you added this, but not working for me My code:- ElementsRecyclerAdapter elementsRecyclerAdapter = new ElementsRecyclerAdapter(elementsList, ElementsRecyclerActivity.this, this); Error:- 'ElementsRecyclerAdapter(java.util.ArrayList, android.content.Context, com.pbgamesandapps.pbchemx.ElementsRecyclerInterface)' in 'com.pbgamesandapps.pbchemx.ElementsRecyclerAdapter' cannot be applied to '(java.util.ArrayList, com.pbgamesandapps.pbchemx.ElementsRecyclerActivity, anonymous com.android.volley.Response.Listener)' My constructor for recycler view adapter :- public ElementsRecyclerAdapter(ArrayList elementsList, Context context, ElementsRecyclerInterface elementsRecyclerInterface) { this.elementsModels = elementsList; this.context = context; this.elementsRecyclerInterface = elementsRecyclerInterface; } Interface:- package com.pbgamesandapps.pbchemx; public interface ElementsRecyclerInterface { void onClick(int position); }
What if I'm fill the array by MVVM way ? I have tried your way, but the value always returns null in the next activity. I have fill the results array by call observe mntRequestViewModel.getMntAllReqMutableLiveData().observe(getViewLifecycleOwner(), new Observer() { @Override public void onChanged(List mntRequests) { if (mntRequests == null) { Toast.makeText(getActivity(), "failed to get all requests", Toast.LENGTH_LONG).show(); } else { //mntRequests is the array that I should use to get position in onItemClick ... allReqResultsAdapter.setResults(mntRequests); } } });