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
1 answer

Android: Dynamically show all checkboxes in adapter onLongClick

I was learning custom adapter concepts recently. Problem is during onlongClick in a row, I want to show checkboxes checked in the longclicked row, which is in android:visibility="gone" initially. And also to show checkboxes in other rows which are…
Sriram
  • 11
  • 3
1
vote
1 answer

Android - Load string array values to custom list view adapter

I have created a custom list view adapter and items for the list view is stored at String.xml. When I run the app I only shows a blank activity. Please help me to fix this issue. This is my custom adapter java class. public class UserAdapter…
codehesh
  • 875
  • 10
  • 29
1
vote
3 answers

Trouble using variables from my custom adapter

I am using a list view and creating a custom adapter. I am trying to like a post every time the button is clicked. The button being declared is connected with each item in the list view. There are three problems that I am encountering: 1) When I…
cdub
  • 25
  • 1
  • 11
1
vote
1 answer

Roboletric - test onClick into custom adapter element

I'm using Roboletric and I would like to test the onClick into the "viewHolder.cardView" element. This is my custom adapter (that has two elements). I already build my list and adapter, but how I can test the onClick event with…
rafaelasguerra
  • 2,685
  • 5
  • 24
  • 56
1
vote
0 answers

Android - ListView too long loading

I've got a problem with too long loading of my activity using ListView with CustomAdapter. I really don't know what exactly could solve this problem. Thank you. Here is my CustomAdapter code: package com.example.simon.gamesshop; /** *…
Simon Štefunko
  • 33
  • 1
  • 10
1
vote
0 answers

in android array list is not getting validated

sbtbtn.setOnClickListener(new View.OnClickListener() //try to do validate this array list which coming from CustomAdpater if this Array list is empty then code will return and show the Toast but it showing any Toast Data Inserted …
Rahul
  • 32
  • 6
1
vote
1 answer

Update Images in Gridview via custom adapter

I am able to show images (set by default) in the gridview properly using a custom adapter. However when I try to change the string[] in ForecastFragment (snippets below), the updateList function is not getting called. I would like the all the views…
Siddharth Sharma
  • 182
  • 1
  • 1
  • 10
1
vote
2 answers

ListView not updating after Search using SearchView in android

I am trying to develop an app which will have a SearchView.I have successfully implemented the logic for filtering the results and updating in ListView.But When i am cancelling or closing the search ,the data on the ListView is not reverted back to…
Rushi Ayyappa
  • 2,708
  • 2
  • 16
  • 32
1
vote
3 answers

Duplicate listview data

I am generating a listview using a button , and it is working fine if there is a timegap in generating the listview, but if i am repeatedly pressing the button to generate listview it would generate with duplicate data. How could i avoid this ? I…
nazmul
  • 367
  • 2
  • 14
1
vote
2 answers

Unable to change textview value from customAdapter using button once set before,why?

I have set the value of a textView from an ArrayList like this mealCounterTV = (TextView) view.findViewById(R.id.counterTV); mealCounterTV.setText(quantityList.get(position)); There is a button ,by clicking which i am trying to…
nazmul
  • 367
  • 2
  • 14
1
vote
2 answers

How to show alert confirmation dialog from listview button in android

I am trying to show the confirmation dialog after clicking on the button in listview. I have setOnClickListener in my CustomAdapter in getView method. but on click listener I am getting following error: 02-25 21:36:32.065 20631-20631/com.themsg.chat…
1
vote
1 answer

Android Custom ArrayAdapter with custom Object

Context : I Have a model Book that contains 1 ArrayList of type Flight, the flight model contains an array of legs. Question: I need to show all legs in one listView, but i need it separated by flight, each flight should have a header with the…
Klinkert0728
  • 326
  • 1
  • 4
  • 14
1
vote
1 answer

Android - ExpandableListView with Custom ExpandableListAdapter with Delete Button inside Child Rows

I have try an ExpandableListView with custom Adapter, with an Add Button in every group row that can add a child row below it with only one click on the Add Button. in every child row, there are two plain text input with a delete button for deleting…
1
vote
1 answer

Android - Custom adapter with imageview and textview not displaying listview

I am working on a college project to build an android based mobile learning app. I'm using Parse for backend services. There is a class, namely 'Course' which contains name of the courses to be offered along with an icon for each course. I have…
1
vote
1 answer

How to update view from an onClickListener inside getView of a CustomAdapter in Android

What do I want to achieve? In the below SS, when user touches 'vote' button, these vertical progress bars (custom) will be set according to the voting percentages retrieved from server for that particular row. What is the obstacle? I have…
user5812699