Questions tagged [custom-arrayadapter]
69 questions
1
vote
1 answer
Android ArrayAdapter getItem() incompatible types?
I'm' having a hard time trying to make my ArrayAdapter work - been using custom ArrayAdapter before with no problems, but this time I'm not sure what's going on.
I'm tryin to create ListView using adapter that will be showing two strings (mName,…

Matt
- 665
- 6
- 16
1
vote
1 answer
Filter data by input in custom ArrayAdapter displays empty items
I implemented EditText widget to filter items in ListFragment using custom ArrayAdapter.
It works fine but the filtered list contains EMPTY items as well as filtered items.
I found that i should clear the adapter before to repopulate it,…

NoWar
- 36,338
- 80
- 323
- 498
0
votes
0 answers
Android AutoCompleteTextView It's not displaying the provided list correctly
I'm building a chat app where users can mention each other by typing the '@' symbol followed by a username. I'm using an AutoCompleteTextView to show a list of suggested usernames as the user types. I'm populating the adapter for the…

David Feldman
- 7
- 4
0
votes
0 answers
How to set Background color to alternate rows in a ListView?
I'm trying to set a Background color for alternate items in my ListView. I'm doing the following in my Custom ArrayAdapter class:
override fun getView(position: Int, convertView: View?, parent: ViewGroup): View {
val currentExpense:Expense? =…

Amey079
- 131
- 7
0
votes
0 answers
How to manipulate bottons of a listView
I have implemented a customAdapter and a listView, and everything works correctly, the problem now is that not as well as finding the id of each element created, I have to use methods in another activity, but when I try to say recover the id rightly…

Daniele Annese
- 1
- 1
0
votes
0 answers
Search bar editview not working when using with custom array adapter
So i tried implementing a search bar to my app for my listview and it does work but it only takes the first result in a array. I am using a custom array adapter and I am going crazy trying to figure this out.
This is where the listview is called and…

Shazali
- 1
- 1
0
votes
1 answer
AutoComplete does not return desired string
I am new in Kotlin programming. In my android app, I have an array adapter of "addressInfo" objects - objects with data about a place.
class addressInfo
(
var displayName : String,
var latitude : String,
var longitude : String,
var osmType :…

prosyanoy
- 43
- 4
0
votes
0 answers
onItemClickListener is not working on a listView with coustom ArrayAdapter Class
NumbersActivity.java
import androidx.appcompat.app.AppCompatActivity;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import…

ARSALAN AHMAD 74
- 3
- 3
0
votes
0 answers
Android Java) TextView is null in custom ArrayAdapter while Button is not null
I have a problem which I cannot understand how to solve.
I have a movie_item.xml which contains a textView and button as component.
my custom ArrayAdapter gets ArrayLists which contain 10 items inside, which means my ArrayAdapter should draw the…

game lover
- 114
- 2
- 7
0
votes
1 answer
Unresolved reference: list_item, Kotlin, android-studio. Unable to access the layout file
image of the file
listItemView = inflater.inflate(R.layout.list_item, parent,false)
I am unable to access the layout file from the inflate method
class AdapterEarthquake(var cntx: Context,var earthquake:…

Ravi Chauhan
- 1
- 1
0
votes
1 answer
java.lang.NullPointerException: null cannot be cast to non-null type java.util.ArrayList
I have an Error in my array adapter filter section. Everything works fine when I try to enter value in autocomplete textview app crash and show me following error.
java.lang.NullPointerException: null cannot be cast to non-null type…

R Suman Radhakrishnan
- 83
- 2
- 12
0
votes
0 answers
Calling string array in custom arraylist
Here i am trying to create a custom arraylist, and custom adapter, to show 3 textview, with 3 seperate string array, according to layout that i make.
However, im having a hard time in putting the string array to the specified setter. i am still new…

Mr Learning
- 73
- 1
- 9
0
votes
1 answer
ListView only shows the first item from the arraylist
Previously I had crash issues due to the wrong reference to the resource files. Fixed that issue and updated this thread with the logical error that I am getting.
I am new to android and currently learning custom classes and adapter. While working I…

Kiran Shrestha
- 3
- 3
0
votes
2 answers
How to create custom arrayAdapter without context attribute
For a school project, I made a custom arrayadapter with a context, resources and items attribute. Today I received feedback from my teacher and he wants me to find a solution where I don't have a Context attribute because he doesnt like that I…

EwoutxD
- 53
- 2
0
votes
1 answer
show different list items on different catagories activities
Now i want to list items in different categories ex: one of them hospitals and the one item must contain the name, the address and the phone number, I created this if statement in the adapter if the index of has one text invisible others but it…

Hassan Amer
- 5
- 5