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
5
votes
1 answer

AdapterView.OnItemClickListener with more ListView

I have 2 ListView on a single fragment and I wonder if I can set for both same class that implements AdapterView.OnItemClickListener. I mean, Android Documentation says: public abstract void onItemClick (AdapterView parent, View view, int…
5
votes
2 answers

Dynamically update view types of ListView

I've created a custom adapter implementation. I also have a few different view types in this adapter. I need to replace some views of my adapter at runtime. Romain Guy says that "...changing the view type count dynamically which is a big mistake"…
Richard
  • 14,427
  • 9
  • 57
  • 85
4
votes
1 answer

Unable to draw child views in view group when using adapterview

I'm trying to get an adapterview to draw its child views properly, but am having trouble getting the child views of the views returned by the adapter to draw. Specifically, my adapter should be spitting out simple views like this:
Faisal
  • 297
  • 2
  • 16
4
votes
0 answers

Customize android spinner to have dropdown icon + full width dropdown

Variations of this questions are already available, but I didn't found exact duplicate. So here is my question. I want to have full width dropdown + dropdown icon in the android spinner. I've tried with wrapping it in relative layout, then since…
4
votes
3 answers

How to update recyclerview when an activity is deleted which is open from recyclerview adapter

I am using Recyclerview adapter to populate Recyclerview. After populating Recyclerview from SQLite, If user want to open an recyclerview item need to click on that item and adapter open the related activity. Here is an image which can help you…
4
votes
1 answer

GridView with filter menu button in Android

I have some troubles: I've got a simple GridView, in which I have two categories of items. I wanted to add three Menu Buttons to have a Filter for this GridView and show/hide the items with the category selected. For the example, with the…
4
votes
1 answer

How to extend AdapterView to behave like LinearLayout filled dynamically by an adapter

My problem is that I have a view that has to be scrollable, but I also need a dynamically filled list in that view. I don't want to use a ListView for that list because it is too expensive for my purpose and behaves very bad when it is in…
3
votes
2 answers

RecyclerView Multiple View Type

I've a list of following model: name categoryName Now, I've to build a recyclerview that groups all the entities with the same categoryName: categoryName1 name1 name2 name3 categoryName2 name4 categoryName3 name5 name6 So I…
Jumpa
  • 4,319
  • 11
  • 52
  • 100
3
votes
2 answers

How can I open the file in arrayadapter list after clicking?

I'm listing PDF files in folder. But I want them to be named as filename, instead of sdcard/mypath/files Also, I want to open them whenever I click them via PDF viewer. My code: public class activity1 extends ListActivity { private List
3
votes
2 answers

The type new AdapterView.OnItemClickListener(){} must implement the inherited abstract method AdapterView.OnItemClickListener)

The type new AdapterView.OnItemClickListener(){} must implement the inherited abstract method AdapterView.OnItemClickListener.onItemClick(AdapterView, View, int, long) Why i get this message when i tried to build the tutorial package…
Fedail Matesian
  • 31
  • 1
  • 1
  • 2
3
votes
1 answer

How can I recycle views using ViewPager?

I have an activity that shows a calendar of a month, and allows users to swipe left and right to previous/next month. I want to use ViewPager for the smooth scrolling effect, but it should allow users to scroll left/right infinitely, so there is no…
NeoWang
  • 17,361
  • 24
  • 78
  • 126
3
votes
0 answers

Setting ListView row as sticky without using headers

I have a list where I want to mark the checked/selected row as being sticky to prevent the selected item from scrolling out of the view. I have tried implementing https://github.com/emilsjolander/StickyListHeaders, but since it is not possible to…
thilemann
  • 397
  • 4
  • 16
3
votes
5 answers

Reset background color in Android ListView

In my QuestionsActivity, I am showing a question and bunch of answers. The question is displayed on TextView and answers are displayed on ListView that is composed of TextViews. There is an ActionButton named "Check Answer" and when it is clicked,…
Tarik
  • 79,711
  • 83
  • 236
  • 349
3
votes
1 answer

custom listview error: java.lang.unsupportedoperationexception: addview

I'm really new to android and I know you shouldnt paste whole codes but I honestly have no idea where the problem is. Im trying to create a somewhat custom list view, with a text and an image, but keep geting this exception and have no idea how to…
3
votes
3 answers

Android: reusable adapter and different onclicklistener

I want to know if is it a good way to use the same adapter for more than one listview. in my code i have many listviews and each one contains the same UL components like imageview and textview, so is it good to use `MyAdapter extends BaseAdapter`…
William Kinaan
  • 28,059
  • 20
  • 85
  • 118
1 2
3
18 19