• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

setChoiceMode in GridView with custom ArrayAdapter does not work

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I recently want to have my custom ArrayAdapter.
I googled and find some samples, and i did my ArrayAdapter like this.



OK.
(Car is a class with some fields)

And i made a custom layout for this Adapter with two TextView.
Here is the XML Layout for this.




OK. I want to display Above Layout as a row to a GridView.
So i made my Main Layout as below :



I make a simple GridView.

In my MainActivity and onCreate method :




OK, it display my new Car properly in GridView.
But when i do setChoiceMode in my GridView, it does not act.
Previously i setChoiceMode in simple GridView and it effected.
What should i do?
when i select, it effect, and i cant return the value of selected item in GridView.
But in view setChoiceMode does not work.
 
Without subsidies, chem-ag food costs four times more than organic. Or this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic