Questions tagged [custom-adapter]

A custom-adapter is an interface which provides the ability to define non-standard iterators for specific data representations.

A custom-adapter is often used to integrate custom data structures with a view in an MVC framework.

References

990 questions
1
vote
2 answers

ListView CustomAdapter not showing first position results

I'm new to Android Studio and coding in general and I am trying to display a custom ListView with an image of a colour and the name of the colour. I have used a custom Adapter to inflate the view with two arrays containing the drawable image colours…
adjawsdaw
  • 11
  • 4
1
vote
0 answers

java.lang.ClassCastException: java.lang.Object[] cannot be cast to java.lang.String[]

I am trying to create a Custom Adapter drawing data from RealmObject(): The RealmObject() returns a string containing title and description delimited by comma, which will be split in the Custom Adapter. Apparently RealmResults.toArray() is of type…
1
vote
1 answer

list view show all items minus the last

After making all of this I made all necessary changes to the class to show all items but now show all items -1 this is a custom adapter to a list view, the problem is what show all items -1 instead all itemps, after adding 1 show all items, adding…
Pol Linger
  • 13
  • 4
1
vote
0 answers

ckeditor5 custom upload adapter

When I try to select an image from the tool 'Insert image' the value of the loader is undefined and the image don't upload. I've reading the documentation buy I can't find why my images don't move to my local folder 'uploads'. Here is the code,…
1
vote
1 answer

Get UI Element ID In a Fragment From Custom adapter

I'm developing an android app and I have a fragment that contains TextView & ListView in it. The list view has custom list items that contains two buttons. I want to make 'onClickListener' for one of those two buttons in my custom adapter class to…
1
vote
0 answers

clear + addAll vs re-initialise list RecyclerViewAdapter android

What's the different between 1 and 2: 1. public void updatePostList(ArrayList updatedPosts) { this.postList.clear(); this.postList.addAll(updatedPosts); notifyDataSetChanged(); } 2. public void updatePostList(ArrayList
Rohan Taneja
  • 9,687
  • 3
  • 36
  • 48
1
vote
1 answer

when i using Picasso in customadapter for listview image, when scroll down and back previous place listview, my image mix other position items

When using the Picasso library for download image and printing in imageview in listview, I used BaseAdapter for listview image. When I scroll down and back previous place listview, my image mix other position items listview my adapter code : public…
Mersad Nilchy
  • 611
  • 6
  • 18
1
vote
1 answer

App get crashed when trying to display Data through listview

I'm trying to get data using retrofit2 and display those data using a list passing through as a parameter of Custom adapter. When I store data in a List in onResponse() method, in onResponse() method list have some value. But in oncreate() method…
Al Amin
  • 13
  • 2
1
vote
2 answers

Send data from a CustomAdapter to a SubFragment with onClickListView

EDITED: PROBLEM: Im trying to show the details of an artist from my list to a fragment but i have an CustomAdapter im using so i dont know how to achieve this when my apps logic is like this: ListViewAdapter.java --> MainFragment.java -->…
Delice
  • 743
  • 9
  • 20
1
vote
2 answers

Select2 doesn't work change value from jQuery (dataAdapter)

I have a huge json data source (over 50,000 + lines) loaded in memory from a static file. Note: It's not important why I have it in a static file. I use select2 (v 4.0.5) that initializes as: function initSelect2(selectName, dataSelect) { var…
Puty
  • 100
  • 1
  • 13
1
vote
2 answers

I have a 3 column Listview with data from SQLite DB and a seachview window. i created a custom data. The search is not properly executed

I have created a MultiColumn ListView with a SearchView above it. It pulls data from an SQLite database and displays in the list view. I have created a custom ArrayAdapter and the java class. However, the output from my SearchView on my 3 column…
1
vote
0 answers

Android Filtered list item not removing after click

I have a custom adapter extends Base adapter and implements Filterable. When i write something to searchview filter is working well. Before filtering when i click the list item of listview, it is removed successfully. But after filtering when i…
1
vote
1 answer

How to make one radiobutton as selected in Custom Spinner

I am stuck in a situation where I am using a custom spinner , in which I want a radio button and a text. In this I want just a single radio button should be selected, but when moving on other radio button, last radio button remain selected. Here is…
Tapesh Gupta
  • 363
  • 7
  • 21
1
vote
2 answers

Not an enclosing class error

I'm trying to set the adapter but its giving me the error not an enclosing class in my onCreateView method on below line. CustomAdapter adapter = new CustomAdapter(SecondYearFragment.this, sub); Here is my…
rahul2234
  • 21
  • 3
1
vote
0 answers

I am Using ListView with Spinner, Whenever I scroll the values are all deleted(Selected Values in Spinner)

Whenever I add a value to my spinner in List View, Its value is deleted while Scrolling.I have used ViewHolder also.But It shows NullPointerException while using ViewHolder. So help me by seeing the code Below. Logcat **FATAL EXCEPTION:…