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
2
votes
2 answers

Update ViewHolder values of custom Adapter for Recyclerview

I have a RecyclerView with a custom Adapter to display rectangular elements (about 15, the number can change if the user adds/removes items) in a grid (using Gridlayout Manager). These elements consist of an ImageView and a TextView. I want to…
Eve
  • 1,153
  • 1
  • 15
  • 34
2
votes
1 answer

android notifydatasetchange() not working

I have an error on notifydatasetchanged(). Can anyone give me a proper solution? I have tried all possible cases but I am not finding a solution. I have attached notifydatasetchanged() as adapter.notifydatasetchanged() and but it's not working at…
2
votes
1 answer

Adding countdown timer in listview restarts in each new row

I am getting data from server in XML format and passing it in a Listview. In each row added there are to parameters from the xml which i want to pass in the CountDownTimer so each row has its unique counterdown timer. When i pass the first row the…
2
votes
1 answer

Android: Is there a way to add an object to a spinner and display only a property of it?

I have an array called spinnerItems populated by objects of the type DateSpinnerItem. I am passing it to an adapter to be used by a Spinner. My DataSpinnerItem objects have three properties: Label, Date1 and Date2. My question is, is there a way for…
Yurigm
  • 53
  • 8
2
votes
1 answer

SearchView does not perform its function, how to filter this custom adapter?

I have created a custom adapter that extends ArrayAdapter containing Listview with two TextView in a single row. I have SearchView on the ActionBar.In onQueryTextChange(String s) i have tried some methods which i have found, works but result is not…
2
votes
1 answer

The checkbox and textview with custom spinner in Android

I am having the 7 items in the spinner box. I have created the spinner box with textview and checkbox. I want to do the following logic. Can you please give me any suggestion to do: private static final String[] select_qualification = { …
2
votes
3 answers

How to deselect selected List View items?

In my application there is an option to select different items from a list view . selected items will stored into an array also a background will set to selected items in listview. which works fine.the problem is i want to deselect the items if i…
Noufal M
  • 163
  • 1
  • 4
  • 12
2
votes
4 answers

How to dynamically add listener to button on customAdapter in android

I want to increment/decrement the count and update it to the database when click on button. the problem is button is on adapter, how should i apply an listener to individual button and update the count for particular user on UI as well as in…
Soham s More
  • 95
  • 12
2
votes
1 answer

Inflating a FrameLayout inside a ViewHolder item during onCreateViewHolder

I am trying to create a custom adapter with a dynamic view according to the data retrieved. Everything is set up, I can differentiate the data coming and even implemented getItemViewType and my own getItem to set the type accordingly. What I…
user1974981
2
votes
2 answers

Using Custom Adapter with CursorLoader

I'm trying to use CursorLoader to fetch data from my ContentProvider off the UI thread. I then use it to populate my list view. I was using SimpleCursorAdapter before and it works all fine. But now I want to have different views for the list view…
2
votes
4 answers

Custom ListView doesn't show anything

I'm trying to populate a ListView with Strings (food item names) on the left side, and item count numbers on the right. I've made a CustomAdapter class (see below) which extends BaseAdapter after following some tutorials, where I could see (via…
MikeM
  • 342
  • 2
  • 10
2
votes
1 answer

Get parent layout from custom Adapter

Could anybody explain me, how to realize? I have an activity with listview and footer with some elements(textview). Listview built with custom adapter. Each listview item has few elements. And my question: how can i change textview in footer, from…
kbu
  • 389
  • 2
  • 4
  • 19
2
votes
3 answers

How to set List view Using Custom adapter?How custom adapter works in the code given below?

I tried various method.I am using a text view and a button in each row in list.When i run the code i am getting null pointerexception.Is it necessary to use view holder in this example?I also added view in one example and tried but bad luck.Check…
zyonneo
  • 1,319
  • 5
  • 25
  • 63
2
votes
4 answers

getView of custom adapter returns wrong Position

I have written a custom adapter for a gridview. Each item in grid view has other childs views. One of them is a textView, which has implemented a click listener. When the user clicks on the TextView, I show a Toast which shows the position of the…
user2498079
  • 2,872
  • 8
  • 32
  • 60
2
votes
2 answers

button click inside listview item mixing up action on items

I have a listview with a button.When I click on the button I want the whole item to be set an alpha value and make the text of the button change. The base functionality (the item being set an alpha value and button text change) works but multiple…