Questions tagged as 'adapter'

1
answer

Android adapter to reorder by distance

I'm trying to reorder my list of items by distance (using getListView from Android, not a custom one) and I'm having problems. I'm getting the spherical distance in meters (double type) using Maps Utils inside the adapter (SomeAdapter). dou...
asked by 05.10.2017 / 19:51
1
answer

What method of the Adapter determines the number of elements that a listView will have?

Well, the question is very clear, I need to know which method of the adapter is what determines how many elements a listview will have. When I speak of adapter, I mean baseadapter, to this: @Override public int getCount() { return null...
asked by 11.07.2018 / 13:12
1
answer

Can you place two different Layouts in the same RecyclerView? [closed]

To give the example of a chat. The messages are placed in a RecyclerView, and each element of the RecyclerView is a Layout that is composed of a cardView where the name, time and message goes. Now, a user is going to choose an option where th...
asked by 13.09.2018 / 16:57
1
answer

Adapter Problem

I have a problem in my RecyclerView.Adapter . My mistake is as follows    java.lang.NullPointerException on: Attempt to invoke virtual method 'java.lang.String com.example.piipe.bienestapp.Modelos.usuario.getNombre ()' on a null obje...
asked by 08.05.2018 / 01:25
1
answer

Does anyone know why one of the two adapters works but the other does not?

I have 2 classes called MyAdapterBig / MyAdapterSmall, they represent two frigates. The issue is that one of them the small is perfectly, when I give the delete button delete, but the other Adapter, does not enter the for ... then ... I'm going...
asked by 07.04.2018 / 00:30
1
answer

Display a DialogFragment from an Adapter RecyclerView

I have a problem trying to show a Dialogfragment from an Adapter. Normally I have done this by calling parent.Context of inflater , as follows: public class MiAdapter extends RecyclerView.Adapter<MiAdapter.adapterHolder>{...
asked by 07.04.2018 / 01:45
1
answer

Spinner with an initial text

Cordial greeting, by means of a query to a page: http://localhost/baradm/ubica.php?id=002 I get the answer .json: [{"DESCRP":"MESA 01"},{"DESCRP":"CUARTO 01"},{"DESCRP":"CUARTO 02"}] This I have uploaded to a Spinner: And I wi...
asked by 17.03.2017 / 10:35
2
answers

Pass variable to class cursorAdapter from activity

I have data loaded into a listview with custom cursorAdapter, my question is how can I pass a variable to the adapter cursor from the activity where I call the cursor, I do not know if they understand me. Try to pass it through the constructo...
asked by 17.05.2017 / 00:10
0
answers

Filter in adapter

How can I do it? What I want is for me to show only the items that within the holder.textEstado.text = filtro.estadoPartido contain the string "Pending" and this is what I do: import android.annotation.SuppressLint import android.content.Con...
asked by 23.12.2018 / 10:19
0
answers

type parameter t has incompatible upper bounds view and gridview

I'm having a strange problem, in my class: import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import java.util.ArrayList; public class GridView extends AppCompatActivity { private GridView gridView; private Gr...
asked by 18.11.2018 / 22:06