Linked Questions
35 questions linked to/from How to use ArrayAdapter<myClass>
-4 votes
2 answers
386 views
How can I write ArrayList Adapter? [duplicate]
I want to fields of arrayList to listView but how can I write adapter I dont know. Please help me!!! I need a my adapter class . I have to see on listView tutar:1.34 kalem="xx" Class: public class ...
78 votes
10 answers
174k views
Clear listview content?
I have a little problem with ListView. How do I clear a ListView content, knowing that it has a custom adapter? edit - the custom adapter class extends BaseAdapter, it looks like this: import ...
9 votes
4 answers
15k views
How to get id of selected item in autocompletetextview in android?
I am retrieving values from server for autocompletetextview, I am getting the list of user names along with their user ids, now what I want is when i select any username from list I want to get user ...
0 votes
1 answer
9k views
getting data using volley from JSON to listview with custom arrayadapter
this is my code and it's working good. i want to get multiple values (including image address) from my JSON data and show them in each row of my listview but i couldn't do that i just could get one ...
0 votes
3 answers
2k views
Android - OnClick handler for dynamic ListView data?
I have a ListView that is filled with a dynamic set of data each time the Activity is created. For simplicity's sake, lets say each ListView item is a employee's name. Under the hood, each employee ...
1 vote
2 answers
2k views
how to initialize my BaseAdapter
Here is my constructor for my custom BaseAdapter public MyAdapterAds(Activity activity, BaseAdapter delegate) { this.activity = activity; this.delegate = delegate; } I have an arraylist of ...
-1 votes
1 answer
2k views
How to create a custom ListView inside a Fragment?
I have a ListView which is working just fine inside my Fragment. public class MyFragment extends Fragment { String[] itemname ={ "item 1", "item 2", "item 3"}; ListView my_list; @...
1 vote
2 answers
962 views
ArrayAdapter<MyClass> attaching to a View
Good Morning, I seem to be missing one piece of information (still learning on my first Android app) connecting an ArrayAdapter to a view. I create a Class we'll call MyInfoClass which is just some ...
0 votes
3 answers
1k views
getView() method is not called in custom adapter with gridview
When I debug the code, it is calling constructors in InviteListAdapter but it is not calling getView() method. I have tried multiple solutions available on stackoverflow but none of them works. Hope ...
0 votes
2 answers
2k views
constructor of class ArrayAdapter
i have this into fragment in onCreateView(): ListView listView = (ListView) rootView.findViewById(R.id.listview); ListAdapter listAdapter = new MyListAdapter(); listView.setAdapter(...
0 votes
2 answers
834 views
ClassCastException : LinearLayout in android
I'm programming my first android application, and I ran into a problem: The app shuts down after I try to open a new Activity. Here's the activity code: package com.WNF; import android.os.Bundle; ...
0 votes
2 answers
1k views
How to set Multiple texts to listView item - Android
I have an asynctask the places data into an a listView. It only places the last input into the listView. I am not sure what I am suppose to do to place the 3 strings into the listView item. I know I ...
0 votes
1 answer
1k views
How to create a custom ViewHolder to spinner like in a RecyclerView?
I want to create the following-like layout spinner - what I currently have - my code - private MiniProductModel selectedProduct; private Map<String, List<String>> ...
2 votes
2 answers
747 views
Create "Sub-Views" in Android (Newbie-Question)
sorry for the poor choice of words, I dont know exactly how the Android terminology is, therefore google wasn't much help either. What I need to do seems simple: I have a table as part of my "main ...
1 vote
3 answers
650 views
Android ListView adapter "filled" callback
I populate a ListView with a SimpleAdapter. Immediately after doing so, I have a function that tries to loop over the child views to set their background color programmatically. The problem is that ...