To handle an individual key press, implement onKeyDown()
or onKeyUp()
as appropriate. Usually, you should use onKeyUp()
if you want to be sure that you receive only one event. If the user presses and holds the button, then onKeyDown()
is called multiple times.
That’s from http://developer.android.com/training/keyboard-input/commands.html and I just wouldn’t have thought of that…
I’m trying to figure out a way to address that common misconception that “two negatives make a positive,” including having my app notice, when user is first presented w/ neg plus neg, if the first key struck is not hte negative key. I don’t want to wait ’til they hit “enter.” I want it to just stop them in their tracks and ask “are you thinking two negatives “make” a positive”? Maybe have an animated “two negatives make a positive” getting STOMPED by “BUT TWO WRONGS DON’T MAKE A RIGHT!!!”
Or something gentler 😉 … but if that misconception is in their solid, it’s going to take explosions to unearth it. Maybe “You are smarter than your misconceptions”?
Time for a little ride. Just like last Saturday… it’s going to get worse for riding tomorrow.(snow).. and this time, downright nasty (below zero) Monday.
… how to have the cognitive resonance win???
howardat58
January 16, 2016
re the onkeydown stuff, I spent ages trying to tame the repetitive nature of this and of onmousedown, and also of onmousemove. It’s all so damn logical !!!
re the two negs make a pos, unfortunately hey do sometimes: -(-2)=+2, so 3-(-2)=5
but of course -3-2=-5. We should not be surprised that some simple rules, successfully injected, should appear to have universal applicability.
So few people really ‘get’ negative numbers.
If I sent it already, apologies, but A N Whitehead, in his “Introduction to Mathematics” (1911) has a way of seeing negative numbers which makes 100 times more sense than most treatments. Here it is:
https://howardat58.wordpress.com/2015/12/12/a-n-whitehead-on-negative-numbers-1911/
xiousgeonz
January 17, 2016
That makes me think of the “human number line” such as here http://teachinginroom6.blogspot.com/2012/03/making-some-sense-of-posneg-numbers.html …
howardat58
January 17, 2016
Yes! That is exactly what Whitehead is saying. The really important thing to me is that the signed numbers (pos and neg) exist for a different purpose, namely positioning, as in temperature, voltage, height above sea level, force, velocity, and not for measuring amounts of, as in length, weight, mass, speed … This is almost entirely overlooked by the books, the videos, the teachers …
So roll on the number line in both directions, and some animated stick people!