Questions tagged [getview]

To be used with the android tag. Refers to the getview(int position, View convertView, ViewGroup parent) method in the adapter class and other methods related to this. Add any other tags relevant to the question.

To be used with the . Refers to the getview(int position, View convertView, ViewGroup parent) method in the adapter class and other methods related to this. Use any other tags that are relevant to the question.

247 questions
1
vote
1 answer

DialogFragment + listview = getView called too many times

I have a DialogFragment showing a custom layout containing a list view:
Tim Autin
  • 6,043
  • 5
  • 46
  • 76
1
vote
1 answer

ListAdapter Values are not displayed

I need to dispaly my values in list view and i need to perform a click for particular textview alone in the list view I have tried like this ListAdapter adapter = new SimpleAdapter( ViewAppoinmentScreen.this,…
Make it Simple
  • 1,832
  • 5
  • 32
  • 57
1
vote
0 answers

Volley's NetworkImageView getting cleared on ListView scrolling

I am using NetworkImageView provided by Volley for loading images in custom list view. At first launch it works fine, but once i scroll the list view then all the records got the first item image. I have already used View holder tagging stuff.…
1
vote
4 answers

How to Configure Listview with more than 16 Items in GetView with holder

I have a problem with getView with adding items in ListView with BaseAdapter. When I store "0 to 15 items " like this " if(position == 0 ) to if(position == 15) " it displays all the ListView items in sequence. When I try adding one more (16th) item…
hardwork
  • 781
  • 7
  • 14
1
vote
2 answers

Show Image in listview, if file specific file is downloaded internal storage

I am working on a project. In my project when user clicks on a list item, it downloads a file from some source and saves it into internal storage. I want to show an image in list items of listview if file is already download. The code below is…
1
vote
3 answers

Problems with scrambled data while scrolling my listview. Maybe you can see my problems in my adapter

I have made a custom adapter based on the Baseadapter and a problem arises when I scroll the data in the list. The data gets all scrambled up. My guess is that my adapter keeps creating views but, I need one you of experts to take a look at my…
1
vote
1 answer

how to check the lastIndexposition in view

Hi in the below code how to find the last position of the friends[position].userName and then how to compare it and based on the position how to set the text for holder.text1. For example friends[position] it reaches the last positions means then…
tagore
  • 13
  • 6
1
vote
1 answer

how to saveInstanceState of a view defined in getView() method

I have MainActivity with a ViewPager that hosts three tabs and their respective classes extend Fragment. One of the tabs has a layout with a ListView, the layout of the each item in the listView is as follows TextView, checkBox and…
rmaik
  • 1,076
  • 3
  • 15
  • 48
1
vote
1 answer

Get ImageView width in getView

I can't get the width of an ImageView in my ListAdapter's getView method... In my…
wmcnally
  • 147
  • 2
  • 14
1
vote
1 answer

fragment - getView() method return NULL

I don't know why in my fragment when i call getView it return NULL. I Know that i can call getView just after the execution of the onCreateView method I debugged my app: and i checked that first is called the onCreateView method. So i don't know…
Giovanni Far
  • 1,623
  • 6
  • 23
  • 37
1
vote
2 answers

Custom spinner is not invoke custom listview?

I have a custom listview and spinner.First of all i am filling the listview and then i am clicking dropdown spinner.I am choosing a item(city).I want to update listview with new result.But whatever i can custom adapter getview is not call. So…
DuyguK
  • 4,250
  • 9
  • 33
  • 46
1
vote
3 answers

Position of items in listview is changing when I scroll the listview

My application has an listview and listview's rows consist of imageView and Textview. The application downloads images from web to set imageview in the row layout. I had a problem about image redownloading when I scoll up and down the listview. For…
Cem
  • 361
  • 6
  • 17
1
vote
3 answers

Using an async method in a GridView adapter GetView method

I am coding a Xamarin Android application, and I have a question in relation to a GridView adapter. Is it possible to use the async keyword with the GetView method? I have an await function that I wish to use in the GetView method that retrieves…
Simon
  • 7,991
  • 21
  • 83
  • 163
1
vote
3 answers

Null Object Reference on TextView in getView()

Here is my adapter code; keep in mind for the ListView I am returning two types of views. (LogCat under code`) public class ItemAdapter extends ArrayAdapter { private LayoutInflater inflater; public ItemAdapter(Context context,…
TheLettuceMaster
  • 15,594
  • 48
  • 153
  • 259
1
vote
1 answer

Why adapter of ListView not load the items from list at once?

ListView only populate those view that are visible from adapter getView() method. I want to load all items at once. If my listView show 1 item at screen, getview() called only one times even my list contain 8,9,10... etc items public class…
Zohaib Akram
  • 617
  • 1
  • 5
  • 16