Questions tagged [custom-arrayadapter]
69 questions
3
votes
1 answer
Kotlin AutoCompleteTextView Adapter Item Selected Giving Different Value
So I am working with Kotlin on this project, I mainly use Java so I'm trying to find equivalents in Kotlin to achieve the same functionality.
I am getting a JSONArray from my Database and storing it in a Serializable data class called Congregation…

Mwikala Kangwa
- 430
- 7
- 24
3
votes
3 answers
Unresolved Reference getResources() Kotlin
So I am trying to access the getResources() in my code, but for some reason it keeps getting an unresolved reference. I am doing this in another class for my array adapter. Is it because I don't have a main method or is it because of other reasons?…

Zubair Amjad
- 621
- 1
- 10
- 29
2
votes
3 answers
Android working with custom array adapter
I am working on a custom array adapter. I have an expandable list view to which I am adding the list. I also have a search view in which users should be able to search any item. Below is my code for my custom adapter and my fragment
public class…

Moeez
- 494
- 9
- 55
- 147
2
votes
0 answers
Custom ArrayAdapter does not update when it is filtered
I have a SearchView in a custom toolbar that should filter the adapter, but the adapter does not update after I call notifyDataSetChanged()
My Adapter class (the relevant bits):
public class RaffleAdapter extends ArrayAdapter implements…

John
- 59
- 1
- 6
2
votes
1 answer
How to check checkbox in an custom array adapter from code?
I am using a custom adapter for a listview in the android studio. There are a checkbox and a text view in every row. I can get checked items from this custom array adapter but I can't change the state of checkbox from code. I need to uncheck the…

Marie Mirzazade
- 69
- 1
- 8
1
vote
1 answer
How can I change single ImageView background after clicking on it in ListView via ArrayAdapter in Android?
I have a ListView in my Fragment activity that gets the name of files stored in internal storage. The ListView also has an ImageView which when clicked, sets an alarm for showing notification. I want the particular ImageView's background to be…

Chandresh Parmar
- 176
- 1
- 10
1
vote
1 answer
ImageView setOnClickListener on a null object reference in custom adapter
I took this adapter from the internet and I got a problem:
Fatal Exception: java.lang.NullPointerException
Attempt to invoke virtual method 'void android.widget.ImageView.setOnClickListener(android.view.View$OnClickListener)' on a null object…

BazarOFF Elnur
- 17
- 6
1
vote
1 answer
How to make changes in a custom listview programmatically that should immediately reflect?
I am trying to put a button in a custom listview that should reset all the values of the widgets in that row (eg: unchecking all the radiobuttons). I have used something like this inside getView()
btn.setOnClickListener(new View.OnClickListener() {
…
user14115178
1
vote
1 answer
Handle button event of ListView of Fragment class?
I have used two Fragment in my code. I have to display a custom ListView in each fragment. But I would like to handle Button's onClickListener event which is in this ListView.
I can't find online how to use these Button (ImageButton, actually)…

cparu
- 57
- 5
1
vote
2 answers
The content of the adapter has changed but ListView did not receive a notification. android problem
my problem when data come to ArrayAdapter the listview not Update to the last data I have to go to another page and go back to update the listview
the problem listview not updated automatic
my action in this code is when data updated on firebase i…

mr.dro
- 11
- 1
- 2
1
vote
0 answers
Use Hashmap for ListView Android
I have some problem with my code, I want to display the results from con.execute into the ListView
How to use this Hashmap for Listview?
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle…

Yoga Hilmi Tasanah
- 21
- 3
1
vote
0 answers
Unable to use Animator from different Class on Custom AdapterView
Please help on this issue.
I have a custom Class CardList
public class CardList extends AdapterView
There is a Player class which uses this custom view.
CardList have Touch,Drag event listener. TouchListner determines the View Click…

i_quit
- 11
- 1
1
vote
1 answer
Checking which ArrayAdapter Spinner currently uses
I have four ArrayAdapters that uses 4 different arrays
adapter1 = new ArrayAdapter<>(getApplicationContext(), android.R.layout.simple_spinner_item,getResources().getStringArray( R.array.array1) );
adapter2 = new…

AShX
- 358
- 3
- 14
1
vote
0 answers
App crashes due NullPointerException in a custom ArrayAdapter class
I'm attending the free Udacity course about multi-screen apps. I've learned how to use a custom ArrayList to show a personalised "set" of View in a ListView. I'm practicing and I can't find what is my mistake.
The project is composed by:
The set of…

Francesco
- 17
- 6
1
vote
2 answers
Show loader on Spinner (Dropdown) when it is fetching data from web service
In the image above, I have shown that when the user touches the drop-down spinner it will call the web api for getting data for the spinner. Then, that moment, I want to show the loader only on the spinner view on the left or right somewhere on the…

Aditya Rohilla
- 389
- 3
- 10