Questions tagged [android-adapterview]

An AdapterView in android is a view whose children are determined by an Adapter.

An AdapterView in android is a view whose children are determined by an Adapter. Examples of AdapterView include:

  • ListView
  • GridView
  • Spinner
  • Gallery

Useful links

286 questions
9
votes
2 answers

java.lang.UnsupportedOperationException: addView(View, LayoutParams) is not supported in AdapterView

I am using Expandable ListView example found on net Activity: public class ExpandableListViewActivity extends ExpandableListActivity { /** * strings for group elements */ static final String arrGroupelements[] = { "India",…
Archie.bpgc
  • 23,812
  • 38
  • 150
  • 226
8
votes
1 answer

Correct way to implement onMeasure() and onLayout() in custom AdapterView

I know that I should measure children in onMeasure() and layout them in onLayout(). The question is in what of these methods should I add/recycle views so I could measure all children together with an eye on how they are mutually positioned (i.e.…
8
votes
1 answer

requestLayout() improperly called by android.widget.RelativeLayout android

i have implemented listview customadapter when displaying listview it showing below warring how to reslove it . requestLayout() improperly called by android.widget.RelativeLayout{b42acc20 V.E..... ......ID 0,-52-480,0 #7f0700ec app:id/ptr_id_header}…
venu
  • 2,971
  • 6
  • 40
  • 59
8
votes
1 answer

isItemChecked always returns the opposite of what it is supposed to when inside an onItemClickListener?

I currently have a ListView, which activates a Contextual ActionBar in the ListView's OnItemLongClickListener. I am trying to make it so that items can be selected by clicking on them, but only when the Contextual ActionBar is up. The problem is,…
Nora Powers
  • 1,597
  • 13
  • 31
8
votes
2 answers

android how to call startActivityForResult inside an adapter

I have an adapter class : public class AdapterAllAddress extends BaseExpandableListAdapter { private Context context; public AdapterAllAddress(Context context, ArrayList groups) { // TODO Auto-generated…
8
votes
1 answer

Setting android:windowBackground to @null makes scrolling to smear?

i'm using the sherlock actionbar library in order to support many devices . i have a viewPager which has 3 fragments : one with a listView , each item has a textView and an imageView the second has a gridView , each item has a textView and an…
android developer
  • 114,585
  • 152
  • 739
  • 1,270
7
votes
1 answer

Trouble with AdapterView and addView

I want the class below to display some textviews/buttons/spinners, and also a ListView containing parsed data. However the listview/adapter/addview are causing some trouble. Heres the error I'm getting: java.lang.UnsupportedOperationException:…
mmmbaileys
  • 1,233
  • 4
  • 18
  • 33
7
votes
3 answers

Gallery/AdapterView Child Drawable State

I am using a Gallery view where the view corresponding to each item is non-trivial and consists of text as well as multiple buttons. When I click to drag the gallery view (somewhere not on one of the buttons) the button's drawable state changes to…
ghempton
  • 7,777
  • 7
  • 48
  • 53
6
votes
1 answer

Android 8.1/9.0 removeView(View) is not supported in AdapterView

I'm getting a "removeView(View) is not supported in AdapterView" exception when running my app in Android version 8.1 and 9.0. In previous versions it runs fine. Although the error is consistent it doesn't happen 100% of the time (which makes me…
Vallette
  • 284
  • 2
  • 6
6
votes
3 answers

GridView.setOnItemClickListener is not working

I have been suffering with one problem since 2days.I have a grid view in that i need to display images.When I click on grid item it has to go to next activity.I am able to display images in gridview but the thing is when I click on that item it is…
Chaitu
  • 907
  • 2
  • 13
  • 27
5
votes
1 answer

MultiAutoCompleteTextView not working OnItemSelectedListener

ArrayAdapter adapter1 = new ArrayAdapter(Application.getContext(), R.layout.report_add_list_item, ListUtil.asStringList(ContactServiceUtil.getContacts())); multiAutoCompleteContacts = (MultiAutoCompleteTextView)…
nayden
  • 875
  • 2
  • 7
  • 10
5
votes
4 answers

Custom adapterview setselection implementation in Android

I am modifying an adapter view. How do I implement the setSelection() of an AdapterView? What are the steps one must take when setSelection() method of an adapterview is called? I tried browsing through ListView's source code, but it wasn't of much…
pankajagarwal
  • 13,462
  • 14
  • 54
  • 65
5
votes
5 answers

android:stackFromBottom="true" does not seem to work perfectly (reverse ListView with Adapter)

Ok let me explain what "does not work perfectly" means. I have a listview without the android:stackFromBottom="true" parameter. I also have an ArrayAdapter with the regular getItem(position). I call my webserver, get the data on an asc date…
Diolor
  • 13,181
  • 30
  • 111
  • 179
5
votes
1 answer

Auto-scrolling of AdapterView (Listview, GridView,...)

Background I'm trying to make an AdapterView (listview, gridview,...) to slowly auto scroll . the user can toggle it whenever he wishes, and it doesn't necessary move all the way to the end of the adapterView. again, i DO NOT wish to make the…
1
2
3
18 19