android


View.OnTouchListener and screen rotation coordination


I am writing an Activity that implements View.OnTouchListener. I noticed that if I press my finger to the screen, change the screen orientation (which triggers Activity destruction and recreation) while keeping my finger down, and then lift my finger, the OnTouchListener.onTouch doesn't get called. It seems like it should, since lifting my finger is a MotionEvent.ACTION_UP. Am I misunderstanding the library/using it wrong, or is this a bug in the framework?
Before the rotation starts, your onTouch listener should receive a MotionEvent.ACTION_CANCEL completing the event stream. You don't receive an additional MotionEvent.ACTION_UP because no new event stream has been started.

Related Links

ImageView bitmap is stretched after activity transition
Paste text on Android using ADB?
Map multiple columns to one column for custom search suggestions
Checking HTTPURLConnection response without closing
Play music to caller with mute my mic on Android
Does the Back Button fail to call stop()?
Imageview wrap at bottom and right position in android
How can i parse a Json Api response array of following format?
sign Android Studio project apk as system app to use permission INJECT_EVENTS
Changing visibility with LinearLayout and weight
Applying a Style by code to a button
Android studio 1 button 2 event
Android Grdiview not displaying correctly
My bitmap turns black with canvas.drawColor(Color.TRANSPARENT, PorterDuff.Mode.MULTIPLY) Android
Compiling Cocos2d-x project on both Linux and OSX
How to track down file not found errors when debugging Android apps built with Cordova

Categories

HOME
ggplot2
pagination
google-spreadsheet
shiro
replace
switch-statement
cakephp-3.4
pearson-correlation
android-json
banner
pkcs#11
project
distribution
favicon
atlassian
powershell-v5.0
mvc-mini-profiler
aws-sdk
microsoft-ocr
r-mice
php-mysqlidb
easeljs
pchart
game-theory
maze
mat
outliers
angular-translate
left-join
database-comparison
testbed
jmockit
angularjs-material
recurrent-neural-network
skylink
signal-strength
flask-restful
mschart
payara-micro
scalding
stdmap
headless
css-transforms
universal-analytics
baidu
shinobi
ampps
juice-ui
vcloud-director-rest-api
gets
centrifuge
iotivity
jquery-jscrollpane
qbxml
file-move
intel-c++
finalbuilder
atoi
mraid
android-broadcast
execve
android-cookiemanager
sonarqube-5.0
appserver
paw
gii
cuba
mintty
parallel-testing
reflector
amslidemenu
rfc5322
gd-graph
inputmismatchexception
hidapi
beaker-testing
ui-select2
superscrollorama
dopostback
android-loadermanager
role
instantiationexception
non-clustered-index
dot-emacs
scrollbars
build-environment
google-wave
linfu-dynamicproxy
int64
ifilter
pbcopy

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App