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
2 answers

Wrong 'convertView' object while scrolling a list view

My problem is that when I'm scrolling a list view I'm getting wrong convertView, but the position is right. I have 3 items in my Listview, on load 'position' parameter is called with index '0' and convertView is null. When I scroll one by one, to…
EitanG
  • 221
  • 4
  • 19
1
vote
1 answer

How specific a unique color to each row item of listview on android?

I had a listview that fill from content of database, for that I wrote a custom arrayadapter. I need every item in listview have a unique color as ribbon on one side. same as down part of following photo Flat Design but my list have 20 items…
1
vote
0 answers

Android getView lost data when scrolling

I have searched the internet for a few days and still cannot solve my problem I would like to open the photo album and add an overlay with elements an image icon as abutton and a textview so that people press the image then the textview will display…
user1042911
  • 91
  • 2
  • 6
1
vote
1 answer

android: how to get folder's name

i have a class adapter which show me all folders and folder's name by using BUCKET_LIST_NAME. But folders have same name = photo. How to get different names, i mean how to get real name of each folder??? Thanks. public class ThumbnailAdapter…
Paltroth
  • 89
  • 1
  • 2
  • 9
1
vote
0 answers

How to touch image button without getview or findViewById on Robotium?

I'm making auto test script(robotium) for android app (audio player) but have some problems. Touch event(getview, findViewById , clickOnView) don't work only when particular object is avaliable on screen. I don't know what type of object it is...…
1
vote
2 answers

getView method add text below image

I want to add a text below every image, that's my actual code: @Override public View getView(int position, View convertView, ViewGroup parent) { ImageView imageView = new ImageView(mContext); …
Dom9301
  • 41
  • 5
1
vote
0 answers

ListView getView is not call when the user slide the listview to bottom

I am currently work on a horizontal listview(a bookshelf like app), but it does not matter, just use the vertical listview as example. Imagine I have an UI like this: listivew 1 | listview 2| listview 3 on each listview there are 10 images , so the…
user782104
  • 13,233
  • 55
  • 172
  • 312
1
vote
0 answers

Android: Adapter's getView() sometimes isn't called

My app has a gridview filled with pictures (card memory game). After touch the card is flipped and the face picture is shown. But sometimes the face picture does not appear. If I do few more flips with the card, it restores. After click I call 1/2…
Jakub Turcovsky
  • 2,096
  • 4
  • 30
  • 41
1
vote
1 answer

ListView error getting one OnCheckedChange position

I'm trying to create a listview to show users that can be added by pressing a ToggleButton. The problem is that when you press a toggleButton more than one id is returned, and every time I move the scroll more ids are returned .. without pressing…
Jaume Colom Ferrer
  • 334
  • 1
  • 3
  • 13
0
votes
1 answer

Kotlin: Spinner won't show

I'm migrating my app to Kotlin and a spinner which was previously working fine (while in Java) stopped working in Kotlin. This is my CustomShareSpinnerAdapter class: class CustomShareSpinnerAdapter( applicationContext: Context?, private val…
Diego Perez
  • 2,188
  • 2
  • 30
  • 58
0
votes
2 answers

How to access View Lifecycle when extending GetView

When a view is inheriting GetView , it's basically a StatelessWidget with additional variable named "controller" which is our entrypoint to access anything inside the GetXController. The problem is, I do not have any control over the view lifecycle…
0
votes
0 answers

ListView: 1st Item of the listview affects its last item

i have a listview populated by two button and a textview. The problem is that every time I change the value to the last textview of my listview it resets the first, and if I change the first it resets the last. I also tried to use the tags and then…
Aba
  • 3
  • 2
0
votes
2 answers

Is it possible to add a variable in the getview adapter function by overriding it?

How to refer to adapter in the getview (of a listview) with this google syntax : fun getView(position: Int, convertView: View?, parent: ViewGroup): View { return (convertView ?: layoutInflater.inflate(R.layout.my_layout, parent, false)).apply…
jujuf1
  • 175
  • 2
  • 10
0
votes
1 answer

getView() does not work in my Custom List View

My problem is that my listView doesn't show any items. I entered multi columns data to my SQLite database and I want to show it in a custom listview, but my listView doesn't show anything. I think the the problem is in my custom adapter and…
0
votes
0 answers

What exactly is Parent in getView() method

I guess the "parent" here is the actual listView i put in the activity_main layout... public View getView(int position, View convertView, ViewGroup parent) { View heroListItem = converView; if(heroListItem == null) { …