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

Android Wear Geofencing Sample App
How to fix scale of image
Installing wear only apk without ADB or Android studio or eclipse
Android Admob banner on all preferencescreens
Errors in Reverting to Previous version at PlayStore
Android's intent-filter matches files regardless of their extension
android programmatically Turning on and off GPS in android 4.0 and up
Activity hangs on TextView.setText()
Activity not appearing on Chooser dialog when using Implicit Intent
Error with Android Gradle plugin 0.13 and android-apt 1.3
Stream media to Airplay (AppleTv) from Cordova Android App
How to bind a LinearLayout in Simple Cursor Adapter
Instead of values-sw320dp-hdpi takes values-sw320dp-xhdpi
Check for update from apk (btn in the apk or other way)
Service callback for continuous updates
Most efficient way to crop center of gradient

Categories

HOME
url-redirection
string
ng-idle
nvd3.js
css3
mjml
depth
pyqt
graphics
pdfbox
carousel
telegram-bot
crystal-reports-2013
banner
frontend
mel
heap
appcelerator-studio
startup
mxgraph
jsonpath
smartclient
mapstruct
sse
oledb
visual-glitch
squashfs
backpack-for-laravel
short-url
xunit
froala
google-cloud-print
datastax-enterprise-graph
corenlp-server
mockjax
fstream
xajax
hivemq
connection-pool
ods
loading
ogc
linqpad
vaadin-charts
opencmis
textsum
convex-optimization
trojan
page-replacement
cmp
vcloud-director-rest-api
visual-studio-2008-sp1
node-request
latin
vorpal.js
kango-framework
gcloud-ruby
html-to-pdf
state-restoration
linklabel
themoviedb-api
oracle-spatial
poppler
coda
iced-coffeescript
dnssec
entity-framework-4.3
jquery-forms-plugin
dot.js
execve
sonarqube-5.0
cbind
create.js
kissfft
xml-dsig
alternate
bin
beaker-testing
booksleeve
entitydatasource
multiplatform
interprocess
httpcookie

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