• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Programmatic 'Touch' vs Physical Touch

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have tried quite a few suggestions and am still coming up short.

I have a Listview with 100+ Items.
When I select a single Item I want the Background Color to change so as to visually indicate Selection.
I have set up the Item Selector for the items to show State-specific Colors
These settings are

When I do a physical Touch - things work as intended.
When I do a programmatic 'Touch' - the Listview scrolls to the intended item (as intended), but the Background Color does not change

When the programmatic 'Touch' is done (via Voice Recognition) the following is currently being done:
1. The ListView data source is searched for a matching item and if found, the ListView's Item ID is determined.
2. With a matchingLotID the following commands are executed:

3. Now that launches the associated setOnItemClickListener() method which in turn launches the setOnItemClick() method
4. That again issues the setSelected() setPressed() commands.

When in development Debug more I can watch the setOnItemClick() method execute for a physical Touch - again = everything works fine. The Background Color changes as intended
Then when I watch the same code executed for the programmatic 'Touch' the Background Colors does NOT change.

I am baffled (mostly because I am an Android 'greenhorn')
What am I missing?

Thanks
DhugalMac





 
Frank Tee
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oops - Typo Alert !!!

Where I show ListView.. (two periods)
It is really ListView. (single period)

Thanks
 
reply
    Bookmark Topic Watch Topic
  • New Topic