Top "Adapter" questions

Use this tag for questions relating to the Adapter design pattern, one of the Gang of Four's structural design patterns.

Is it possible to get reference to ListView from Adapter in Android?

Is it possible to get reference to ListView from Adapter in Android without passing it as an argument to constructor?

android listview adapter
Android: Viewpager and FragmentStatePageAdapter

I'm designing an app that allows users to flip between multiple pages in a ViewPager. I've been struggling trying to …

android caching adapter pager fragment
What is the exact difference between Adapter and Proxy patterns?

As I understood both Adapter and Proxy patterns make two distinct/different classes/objects compatible with each for communication. And …

oop design-patterns adapter object-oriented-analysis proxy-pattern
Trouble with AdapterView and addView

I want the class below to display some textviews/buttons/spinners, and also a ListView containing parsed data. However the …

android parsing listview adapter android-adapterview
How to know which view inside a specific ListView item that was clicked

I'm having a ListView with my own custom adapter derived from a BaseAdapter. Each item in the ListView has sub …

android listview adapter
Android : Implementation of two way Endless Viewpager

What I want: I have been trying to implement two directional Endless viewpager in Android, Left to Right & Right …

android android-viewpager adapter infinite-loop two-way
Some confusion on the method instantiateItem(ViewGroup container, int position) of PagerAdapter

public Object instantiateItem(ViewGroup container, int position) { ImageView view = new ImageView(); container.addView(view); return view; } I read some example …

android adapter android-pageradapter
What's Adapter.getItem() for?

I am writing a custom adapter for use with a ListView. The Adapter interface includes a getItem() method which returns, …

android adapter
Recyclerview - smoothScrollToPosition to Top of list and then animate the addition of item

I'm trying to create a Recyclerview that will scroll to the top first and then animate the addition of an …

android adapter android-recyclerview smooth-scrolling
How to create onclick event in adapter using interface android?

How can I create on click event using interface? In my application I've created view click interface to detect clicking …

android kotlin adapter baseadapter