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

How to pass generic ArrayList in simple ArrayAdapter

I am creating a simple Adapter without any customization. i just want the items displayed in the spinner is from the gettersetter class. i override a getview method of adapter but it gave me addresses of pointers instead of items. Here is my code…
-1
votes
4 answers

Handling click event on items inside listview item

I have a custom list view in which each item has two buttons(ADD & SUB) and a textView which maintains a count. Initially the count is zero, when I click ADD button it adds 1 and subtracts 1 when I click on SUB button. Since for each row the count…
som
  • 126
  • 4
  • 11
-1
votes
3 answers

TextView repeating on scrolling in List

Actually I've been trying to display a user name on Text View when user clicks on the Image View. User name is showing when click on image view but when I scroll down that same name is appearing on different position in List. For example: when i…
Mustafa Adil
  • 85
  • 1
  • 10
-1
votes
5 answers

unpredictable behahviour of list view item's checkbox click

In a list view I am using checkboxes to select list list item, when checkbox is check then the background of the listview item should changed, but when I click checkbox of first item it's background changes but when I scrolls down list item 3's…
-1
votes
2 answers

How to programatically add items to ListView from an ArrayAdapter?

I have tried everything but I don't get it to work! I have an object, mObject, which itself contains an arrayList of objects which I want to display with a TextView below mObject.getName(). How do I accomplish this, the problem is that the sub…
Clint Eastwood
  • 165
  • 3
  • 10
-1
votes
1 answer

Using AsyncTask to load image files from internal storage

I am attempting to load picture files in the form of thumbnails from my internal storage to a list view. Currently, I am using a ViewHolder, but the loading is still choppy when scrolling so I am going to try to use an AsyncTask. However I can't…
Joe C
  • 184
  • 1
  • 15
-1
votes
1 answer

Stop Android's adapter.notifyDataSetChanged() from running in parallel with the function that contains the notifyDataSetChanged() code

I have the following singleton running for my Android application public class ListsApplication extends Application { public DbxDatastoreManager datastoreManager; public HashMap itemsSync; public Typeface Font; public…
-1
votes
3 answers

Item in getView() method returns always the last one

I created a json parse with a simple adapter to shows the result. Everything works fine but i need to retrieve an url to convert in bitmap. It's a listview, so the url isn't one but could be one,two,three or more. For each url i need create a bitmap…
Atlas91
  • 5,754
  • 17
  • 69
  • 141
-1
votes
1 answer

NullPointerException when trying to setText

The textView shoud be instanced, I don't know why it says NullPointerException at textView.setText("test"); public View getView(int position, View convertView, ViewGroup parent) { LayoutInflater inflater = (LayoutInflater)…
-1
votes
1 answer

Can't wirte getView in my SimpleAdapter in Fragment

I have a fragment with a AsyncTask in which I do a parsing Json. To put every element in a list I use a SimpleAdapter. In my item list I have a button. Of course, if I want click on the button I need to create a getView. Well not works. This is the…
Atlas91
  • 5,754
  • 17
  • 69
  • 141
-1
votes
1 answer

How to use custom font using CustomAdapter

I am using simple ListAdapter. I want to use custom font in it. I was suggested to use getView() but as a beginner i am unaware of using custom adapter. Can someone help it.
user45678
  • 1,504
  • 6
  • 29
  • 58
-1
votes
1 answer

android: error in getView

i have one error in my ThAdapter class. I want to show images in imageView and name of images in textView but it shows error.I know that error is in getView(), but i don;t know how to change it. Can somebody help me?? public class Th extends…
Paltroth
  • 89
  • 1
  • 2
  • 9
-2
votes
1 answer

ListView to RecyclerView conversion, problem in converting get View method

I want to convert Listview to RecyclerView in my app, I tried to convert code but stucked at getView method, can any one explain how to use this getView code in Recylcer view. Adapter for ListView CardAdapter.java public class CardAdapter extends…
-2
votes
1 answer

How to go in getView of BaseAdapter to refresh list item? NotifyDataSetChanged not working

When i call notifyDataSetChanged() compiler goes into getCount() but not into getView method. I am not adding the new list item, i have just changed some boolean in my existing list item object which i want to use into the if statement in getView…
Marko Katic
  • 63
  • 1
  • 9
-2
votes
1 answer

Android getting value empty from custom list view Edittext

Am getting value here for Checkbox, and textview properly. But, I could not get the EditText Values. am getting empty only. my sample code: View view = null ; for(int i = 0; i < list.getCount(); i++ ) { view = list.getAdapter().getView(i, null,…
harikrishnan
  • 1,985
  • 4
  • 32
  • 63
1 2 3
16
17