Skip to content
Advertisement

Tag: adapter

how to handle multiple views in RecyclerView adapter

the problem that I implement a ReyclerView with a custom ItemClickListener inside the adapter: and here is the whole code (for Adapter): so the problem that when I have overridden the ItemClickListener inside the activity to control the views inside the list-item( I will attach the code of the activity and the layout below): MainActivity.java list_item.xml the problem when I

Cannot resolve method ‘setText(Model)’

I am trying to make grid view have to texts but I faced this problem no suitable method found for setText(Model)i am tried to make to listView but doesn’t go well so I am asked and this code is best code I reached into it .. till now … why it Cannot resolve method ‘setText(Model)’ ? problem Image This is

How to start Activity in adapter?

I have a ListActivity with my customized adapter and inside each of the view, it may have some buttons, in which I need to implement OnClickListener. I need to implement the OnClickListener in the adapter. However, I don’t know how to call the function like startActivity() or setResult(). Since the adapter doesn’t extend to Activity. So what is the best

Advertisement