Win a copy of Serverless Applications with Node.js this week in the NodeJS forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Ron McLeod
  • Tim Moores
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Vijitha Kumara

Getting char on the fly  RSS feed

 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am making my first android app, a children's game where there is a rain of chars on the screen and the child must click in a correct one to answer a given question.I did a matrix effect following this tutorial:
http://www.devexchanges.info/2016/11/androip-tip-create-digital-rain-effect.html and works fine
My question: How is the better way to get the character?
 
Saloon Keeper
Posts: 5344
143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If it works fine, in which way would a "better way" improve on it?
 
Paul Hayabusa
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim,
the rain of characters works fine, I don't know the better/correct way to get them when the user click on the screen to answer the question!
Never worked with that before, sorry. Just need an orientation. Should I use onTouchEvent to get that char?I appreciate any snippet o code.
 
Tim Moores
Saloon Keeper
Posts: 5344
143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Capturing touch events would be a good start. Taking a brief look at the code, it doesn't seem that it stores which character is at which screen position at a given time. That would need to be added if you want to determine which character was clicked on.
 
Paul Hayabusa
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim,
I should have been much more specific:
I don't know how to capture the char in the screen.
I do more or less:


best wishes
 
Beware the other head of science - it bites! Nibble on this message:
global solutions you can do in your home or backyard
https://coderanch.com/t/708587/global-solutions-home-backyard
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!