Questions tagged as 'android-adapter'

1
answer

Doubt about the operation of BaseAdapter and ListView

My code is as follows: In the getView method of my BaseAdapter , I add all views created to a list (I need this to do a certain thing). In that same BaseAdapter, I have a getQuantViews method that returns how many views h...
asked by 16.09.2015 / 14:42
1
answer

java.lang.IndexOutOfBoundsException: Invalid index 4, size is 4

I'm not sure what's happening, when I give a long click on an item in the list, sometimes it works normally (opens a screen that shows the user the information registered, allowing it to change it), sometimes the app to and close and sometimes t...
asked by 03.10.2017 / 16:17
1
answer

Update data in ListView with ArrayAdapter

I have a ListView that will be populated with some different data, which may or may not be called (concurrently or not). Example: The user can add and remove ingredients from a product. However, it can only remove or only add. If it does b...
asked by 05.03.2017 / 15:38
1
answer

How to call an Interstitial by clicking on an item in the list that goes through an Adapter?

I need to call an Interstitial in this Activity by clicking on an item in the list that comes from my Adapter : public class ListOfTemplates extends AppCompatActivity { private Template template; private ViewHolder view; priv...
asked by 12.08.2018 / 23:42
1
answer

The search for my DB placed in a listView (Arrayadapter) returns the address of the object and not the content

I made an APP that saves the date and a string of numbers (8 numbers) in the Android database. I created an object (with date and numbers), but when I go to search all objects inside the Database and put a list it returns the addresses saved....
asked by 02.02.2018 / 13:15
1
answer

Edit item within ListView

Hello. I'm working on a code that loads items within ListView through an adapter . Within each item ( item_list.xml ), I inserted two buttons being one to delete the item and another to edit. The method that deletes the item is working...
asked by 13.02.2015 / 14:24
1
answer

GridView - Items repeating at random

I have a grid view problem. This grid contains n products that are displayed on the screen, so the grid of some users have scroll. When there is no scrolling, the products are displayed normally, however when there is a random start. From wha...
asked by 15.09.2017 / 17:56
1
answer

My app that has ListView with ArrayAdapter is closing when creating the list

I want to make a product listing, where each line contains more than one information per line. The problem is that the app throws an exception (I believe) and closes when I click the button that would populate the list. I made a custom Vie...
asked by 07.07.2016 / 05:05
1
answer

Change the Background color of the ListView when the key value is found

In my app I have a ListView that is populated by BaseAdapter . So in BaseAdapter I have an IF statement to change the Background of the list when the value of one variable was equal to the value of another global variable. T...
asked by 19.05.2015 / 01:42
1
answer

Retrieve the amount of children that have a node

How do I retrieve the amount of children I have in a node? I already have the correct path, I just need to know how I can tell the children of this node. private DatabaseReference qtdeFilRef; qtdeFilhosRef.child("primeiroNo").child("seg...
asked by 21.09.2018 / 13:57