Questions tagged as 'android-adapter'

2
answers

How to avoid an IllegalStateException: The content of the adapter has changed but ListView did not receive a notification?

I have Activity that displays a ListView , which is associated with Adapter "backed by" ArrayList global. If I add an element to this ArrayList , ideally I do it on the main thread and immediately call Adapter...
asked by 14.01.2014 / 12:39
2
answers

What is the right approach to get the click / position in RecyclerView?

What is the right approach to get the click on RecyclerView? 1 - Within the onBindViewHolder use the position, even within the setOnClickListener methods, which turns the variable position into FINAL; 2 - Within the onBindViewHolder use the h...
asked by 19.10.2016 / 15:22
1
answer

How do I assign an Activity to open when I click on the ActionBar Tab?

Context I have an application that contains a Activity called MapActivity (of which is a Map type activity that inherits from GoogleMaps api), and another Activity common that will serve as a search with filters to refine...
asked by 20.07.2015 / 16:16
1
answer

What is ViewHolder Pattern?

I am implementing a RecyclerView on Android and I noticed that it is necessary to create a class called ViewHolder . This class seems to be a design pattern called ViewHolder Pattern, and my doubts arise exactly at this point....
asked by 17.09.2017 / 17:40
2
answers

How do I delete a specific item from a ListView?

I would like to ask a question: I have a ListView , where your adapter is clarified in the same activity and the contents of adapter (the strings ) are in another class, in another package. How do I delete a specific item from Li...
asked by 21.05.2014 / 17:17
1
answer

Can I create an ExpandableListView with the swipe effect?

I have a ListView that is composed of 3 ListView's chained. The first is a Year Release list, which has a list of genres that in turn stores a list of movies. I wanted to have the option to expand and collapse the lists by the year...
asked by 10.10.2016 / 17:48
2
answers

What is the purpose of the RecyclerView.Adapter class when using RecyclerView?

To use RecylerView from Android we need to create a CustomAdapter class that extends from abstract class RecyclerView.Adapter , then implement three methods that are: onCreateViewHolder onBindViewHolder ge...
asked by 18.09.2017 / 00:00
1
answer

How to use a custom Adapter in the android ListFragment

Hello everyone, I'm having trouble using a custom Adapter and displaying this Adapter in a ListFragment . My Custom Adapter public class UsuariosAdapter extends BaseAdapter { Context ctx; List < Usuario > usuarios; p...
asked by 29.07.2015 / 16:40
1
answer

Problems with EditText in a listview

I'm trying to get my listview to hold the values placed in EditText , but every time I scroll I lose the data or it multiplies to other fields. Can anyone help? Below is my adapter : public class WorkoutAdapter extends Arra...
asked by 08.07.2015 / 02:06
1
answer

First element in listView does not appear

I have a listView that lists through an adapter. The list is updated after a search in SQLite. The problem is that it only appears from the second element of my table .... could anyone help me? Adapter: public class ItemListHistoryAdapter e...
asked by 02.07.2015 / 15:01