Questions tagged [baseadapter]

BaseAdapter is an abstract Android adapter class which is used to implement specialized adapters.

From the documentation of the BaseAdapter class:

Common base class of common implementation for an Adapter that can be used in both ListView (by implementing the specialized ListAdapter interface) and Spinner (by implementing the specialized SpinnerAdapter interface).

Tag Usage:

1659 questions
0
votes
1 answer

Pull to refresh GridView infinite loading/ fails to pull data

I can't seem to figure out what is going wrong with this, the code is pretty clean/ simple, but for some reason when I pull to refresh, it just shows me the loading icon infinity. Not only that, but I don't even receive any errors. The library I…
ChuckKelly
  • 1,742
  • 5
  • 25
  • 54
0
votes
1 answer

How to set the ListView height

I want to know how to set ListView's height through calculating the item view, someone says in this way. ListAdapter listAdapter = listView.getAdapter(); if (listAdapter == null) { return; } int totalHeight = 0; for (int i = 0; i <…
0
votes
0 answers

Android Add alphbetical order to child in EpandableListView

I know how to do an alphabetical order on a ListView in my BaseAdaptor, in the getView methode, i do something like that . How to do the same thing for an expandable list view ? >>>> public View getView(int position, View convertView, ViewGroup…
0
votes
1 answer

Spinner with custom baseadapter

I have a custom component acting as a table (header + body). In my header i am trying to add "filterViews" depending on data types filled in each column of table. So i have a column with boolean types, represented as non clickable checkboxes. I am…
vaske
  • 398
  • 1
  • 3
  • 13
0
votes
0 answers

Android 4.2 - BaseAdapter passing a higher position than getCount

I'm caching the views in an array, and returning them in the getView. I'm also returning the array.length in the getCount. the problem is, only on android 4.2, the adapter is giving me a position higher than my array.length. I did a workaround…
Gugadin
  • 21
  • 2
0
votes
6 answers

Add TextView programatically to Listview custom row

I want to add one TextView programatically to a Linearlayout declared in the XML file that defines a custom row which is applied to all listview rows. In order to do this I have the following code:
0
votes
1 answer

Changing elements at the top of an Adapter without repositioning lower items

I have a custom adapter (extending BaseAdapter). Items can be added to or removed from the top or bottom of the list. Items are of varying height, some much taller than others. The behavior I'm seeing is this: Scroll down to the middle of the…
Stephen Schwink
  • 512
  • 4
  • 7
0
votes
0 answers

Custom adapter getting a NullPointerException with Inflator

I have an adapter that gets a list of items from an API and then puts it in a listview. This is the first time that Im working with adapters and list views and so far Im struggling quite a lot! Why am I getting this error? Is my context wrong or…
Harry
  • 13,091
  • 29
  • 107
  • 167
0
votes
0 answers

GridAdapter shows view0 instead of view4 on screen orientation changed

I have a GridView with a BaseAdapter that shows 6 buttons like this: Portrait: B11 B12 B21 B22 B31 B32 Landscape: B11 B12 B21 B22 B31 B32 Everything works great, until I switch from landscape back to portrait. It then shows: Portrait: B11…
0
votes
1 answer

Issue with Switch on custom BaseAdapter

I have a fragment which holds a list of all profile for my applications. This list uses a custom BaseAdapter. Here is the specs of this adapter: User can enable only one profile at a time. If user tries to disable all profiles then user will be…
Milan
  • 1,845
  • 5
  • 19
  • 33
0
votes
1 answer

How to make gridview inside DetailFragment runs perfectly?

This is Adapter for my GridView inside DetailFragment public class MyAdapter extends BaseAdapter { Context mContext; static final String TAG_SUCCESS = "success"; static final String TAG_MENU = "menu"; static final String TAG_MID =…
0
votes
1 answer

How to bind String[] values in listview using hashmap in android?

Hi I am trying to get values using hashmap<> using .net web services in android. I have custemized adapter, I am trying to do this. SoapObject folderResponse = (SoapObject)envelope.getResponse(); Log.i("AllFolders",…
Shweta
  • 1,145
  • 5
  • 18
  • 35
0
votes
1 answer

What is wrong with LayoutInflator.Inflate method in the following code?

When the statement convertView = mInflater.inflate(R.layout.listitem_course, null); execute in the following overridden method of BaseAdapter the app stops. I dont know why. @Override public View getView(int position, View convertView, ViewGroup…
Shajeel Afzal
  • 5,913
  • 6
  • 43
  • 70
0
votes
1 answer

ListView after filtration should be empty, when I add non-existing string

I have got an Activity with the list and EditText beneath it, Edit Text is for entering a string so that list will consists that string. ListView based on BaseAdapter, contains elements of type F. public class lstAdaptF extends BaseAdapter…
Foenix
  • 991
  • 3
  • 10
  • 23
0
votes
1 answer

Mess in tags within a ListView (Android)

I am trying to implement a fragment which holds a ListView bound to a custom adapter. Basically, one row looks like this: TextViewName ButtonPlus TextViewMarker ButtonMinus ButtonRemove The buttons plus and minus alter the number displayed by…
Jonyjack
  • 35
  • 7