How can I use the pagination library in the ArrayAdapter
(I dont want to use ListView
or RecyclerView
)?
categories
is a list of string to be shown. I have a huge list of categories. I want it to be paginated. How to achieve this?
List<String> categories = getSomeCategories();
ArrayAdapter<String> adapter = new ArrayAdapter<String>(context, android.R.layout.select_dialog_item, categories);
autoCompleteTextView.setAdapter(adapter);
I have a method which returns the LiveData<PagedList<String> categories
. I'm using the LivePagedListBuilder
to build it. I want my adapter to observe on this.