Noob having issues with onTouchEvent - Android Software Development

I'm trying to implement pinch-zoom in an app I'm making and am having issues with the onTouch event. It appears that the pointer up & down actions do not fire immediately, like you won't get a pointer up or down until an action move occurs. So what happens if both fingers hit the screen nearly simultaneously is that the 2nd finger (should be pointer(1)) gets a move action before pointer down is called, making the code think it's a DRAG not a pinch zoom. Anyone else seen this? Anyway around it? Thanks.
*Edit*
I just tried out the dotty app and noticed the same behavior on it. Could it be my phone (EVO w/ custom ROM) or is this just an android issue? I'm really having issues keeping my pinch zoom & drag from acting sporadically because of this.

Related

Adobe Reader doesn't stop scrolling

I've just noticed something very strange when viewing PDF documents using Touch HD's built-in Adobe Reader LE 2.5: When zoomed into a document and scrolling horizontally by dragging with the stylus, the scrolling just doesn't stop and continues until the view hits the edge of the document! Is anybody else experiencing this?
Here's what I'm seeing in more detail: I zoom into a document (any document, textual or map-based) far enough that the document more than fills the available viewing area both vertically and horizontally. Then I tap and drag the document horizontally. At this point, after stopping dragging and until I lift the tip of the stylus, the document stops scrolling. But, as soon as I lift the tip of the stylus, the document restarts scrolling in the direction I just dragged it and just doesn't stop until it reaches the edge of the document in the scrolling direction. Trying to "catch" the document with the stylus during the scrolling in order to stop it is of no use.
I think I've also noticed that the first couple of attempts at scrolling immediately after opening a new document works fine. The problem sometimes only shows up in subsequent attempts.
This doesn't happen at all when scrolling vertically by dragging. It happens any time the dragging is "mostly" horizontal, but never when I drag "mostly" vertically.
Scrolling around using the scroll bars (by tapping the scroll bar or arrows, or dragging the scroll bar) works just fine.
Could one of you try this out and let me know if you're seeing the same thing?
Some more insights:
The size of the document doesn't seem to make any difference. Small documents or large, it happens every time.
I've played around with "non-linear" dragging. If I drag in an "L-shaped" motion, it appears that the problem only applies when the horizontal portion of the "L" is longer than its vertical portion. Dragging in circles and other jumbled motions produces mixed results.
I came across a map with "bookmarks", where a little "tab" appears near the top of the viewing area in Adobe Reader. When I click the tab, the window splits into two panes, with the top pane showing the bookmark list and the bottom showing the document. When in this mode, the problem disappears. Scrolling by dragging in either direction works perfectly. (And a little faster, oddly.) After I close the top pane, the problem returns. This is the main reason why I think this is an Adobe Reader bug, rather than a side effect of some other software or a setting change that I have on my Touch HD.
I used several other Windows Mobile devices before this one, and on all of them, the software I used for PDF documents was "Adobe Reader for Pocket PC 2.0". (This includes even my AT&T Tilt running WM 6.1.) This "Adobe Reader LE 2.5" is new to me. I wonder if there would be any adverse effects if I tried the 2.0 reader on my Touch HD. I'm worried it might clash with the built-in reader in some bad way. In fact, I'm sure the "Pocket PC 2.0" version of the reader doesn't support VGA (and higher) resolution screens. (I used to use a utility called "Real VGA" on my only other VGA PDA on which I used the Adobe Reader for Pocket PC 2.0 earlier, in order to get it to display documents at the right resolution.) Does anyone here have any experience related to this?
The whole issue evokes an attempt at "inertial scrolling" (not sure if that's what it's mostly called), where, if you "flick" the document with the stylus, the scrolling continues for a little while longer in the same direction after it slows down and stops. If that's what Adobe Reader is trying to do, it's certainly a failed attempt, because there's no sign of a slow down, it never stops, and this happens every time I scroll horizontally by dragging; i.e., even when I did nothing like a "flick".
Anybody have any relevant experiences?
No PDF users around??... Could I really be the only one here who views maps using the built-in Adobe Reader LE 2.5?!
Got something similar happening with PIE, not that that helps ya much!
When in desktop view, any drag continues until the screen is tapped again.
Hmmm... I don't use Pocket IE at all, but that's an interesting clue. Thanks.
I've noticed the issue with the scrolling on PDF documents that require a lot of rendering (note that "lots of rendering" reflects complexity of the document, not size).
It seems that the processor is too busy rendering the document to detect when you stopped dragging the screen (but funnily enough, not too busy to detect when you started).
The solution for me was to scroll using the scrolling bars, as opposed to just dragging the entire document. Either that, or scroll veeeryyy slowly .
milan_ns said:
I've noticed the issue with the scrolling on PDF documents that require a lot of rendering (note that "lots of rendering" reflects complexity of the document, not size).
It seems that the processor is too busy rendering the document to detect when you stopped dragging the screen (but funnily enough, not too busy to detect when you started).
The solution for me was to scroll using the scrolling bars, as opposed to just dragging the entire document. Either that, or scroll veeeryyy slowly .
Click to expand...
Click to collapse
Thank you for your feedback.
I had thought of the same thing about "the CPU being too busy to detect the end of dragging" too. To experiment with that, I tried waiting for the rotating "wait cursor" to disappear before lifting the stylus from the screen after a drag. It didn't change anything.
I must also state that I see the issue even with a 190 KB (i.e., small) PDF document with nothing but text in a table in it. I don't even see any delay or a "wait cursor" at any point when I'm interacting with this document. But, when I'm zoomed into it and I drag to scroll, it causes the same "neverending pan" behavior.
The point about the scroll bars is valid. I was just trying to check first whether the experience was common, or if it might be due to something goofy that I might have done myself. I guess it's the former...
If you press on the screen and then swipe your finger while maintaining pressure and then stop at the point you like, wait for a moment and then release your finger, you will have full control over the distance scrolled.
However, if you really want to make PDF reading a positive experience, intall diamond acrobat reader le cab that enables reflow on the documents that are not even tagged. It is available on this forum.
sproxy said:
If you press on the screen and then swipe your finger while maintaining pressure and then stop at the point you like, wait for a moment and then release your finger, you will have full control over the distance scrolled.
Click to expand...
Click to collapse
Nope. Doesn't work for horizontal scrolling. It resumes scrolling in the same direction as soon as I lift my finger and doesn't stop until hits the edge of the document, no matter how long I "wait for a moment".
sproxy said:
However, if you really want to make PDF reading a positive experience, intall diamond acrobat reader le cab that enables reflow on the documents that are not even tagged. It is available on this forum.
Click to expand...
Click to collapse
Not a bad idea. I might give that a try. Thanks.
Staying on topic about PDFs.
Does anyone know how a good software for the HD to read PDFs?
I went through Team Ones to PocketXPDF and they all had problems.
Team Ones was the best but it didn't seem to display the whole PDF at all, cutting parts at the end and it was heaps slow.
The Adobe one is just shocking.
Want one that wraps the text to fit the screen no matter what zoom, the Team One did this very well.
Do we have any solution for this? Reader 2.5 LE, with reflow mode enabled (needs a change in the registry) is just PERFECT to read eBooks, except for the horizontal scrolling issue. Because of that, I'm reading books in vertical mode.
does any body know how to disable the touchFlow for the reflow in the adobe reader 2.5?
True. It seems Reader 2.5 LE with reflow hack appears to be the best among all. But reflow can be very bad for certain documents..
What I think would be a perfect companion for Reader 2.5 LE would be a scroll hack app..
What the app should do?
1. User inputs the % he/she zoomed the given page for comfortable viewing.
2. Support tapping the 6 spots on screen see attach.(when the reader is running).
3.Scroll accurately the document into one of the 6 positions.
One input may be sufficient for a multipage documents with same lay out.
May be some more flaws in my idea... but seems possible --- anyone??
Too bad that I don't know prog for PPC.
Any way don't fire this newbie
montag09 said:
Do we have any solution for this? Reader 2.5 LE, with reflow mode enabled (needs a change in the registry) is just PERFECT to read eBooks, except for the horizontal scrolling issue. Because of that, I'm reading books in vertical mode.
Click to expand...
Click to collapse

HD2 rotation options and keyboard anomalies

i've searched for ways to open up other rotation angles as well as autorotation for any and all apps under the sun. most people suggest bsbtweaks and it really does do the job, but only rotates to the allowed 270degrees angle (thats -90degrees). effectively, it just adds the window class to the list of window classes that the built in HTC g-sensor mechanism will give respect to.
so i looked some more and found "changescreen" to fit the bill. after setting up exceptions, it works quite well to allow all other applications (except for the exceptions which include sense) to rotate to 90degrees, 180degrees (this looks way cool some times!), and the usual 270degrees.
HOWEVER, the point of this new thread is to discuss something that seems to be quite an attractive option if it can be made to work 100%. i've noticed that the onscreen landscape keyboard is MUCH more usable in the 90degrees rotation. this is because those damned cursor keys take up 0.5 inch of space that is balanced out by the hardware keys on the other side, thus placing the rest of the keyboard SQUARELY in the middle of your thumbs! contrast this with the experience on the default 270degrees rotation where the cursor keys and hardware keys end up on the same side, forcing the user to stretch out the right hand thumb to reach the middle of the keyboard.
the amazing thing is that keyboard really works 99% properly in the 90degrees orientation. the 1% catch? the little preview squares that appear while tapping a key seem to be using a buggy rotation matrix when the screen is in this angle! effectively, this makes the preview squares upside down and on the wrong side of the center line of the keyboard!
so for me, TWO things would make life much sweeter on the HD2:
1. keyboard preview squares should appear right side up and on the correct area near the tapped key in 90degree rotation.
2. i would also like to DISABLE the 270degree rotation altogether and force the HTC g-sensor mechanism to think that the 90degree rotation is DEFAULT. i know i can achieve this partially using "changescreen" but sense will still rotate ONLY in the 270degree direction in the album and music tab. with this tweak, one can rely on the built in mechanism and also be able to enjoy the keyboard in the more comfortable 90degree rotation.
any 1337 h4x0r222 with some 1337 suggestions/tweaks?
some updates...
first, there is another anomaly i didn't notice before pertaining to the thumb friendly scroller that pops up when touching a scroll bar. this popup scroller is also being drawn upside down and on the wrong side of the screen in 90degree rotation.
other updates include:
1. tried toggling HKLM\System\GDI\Rotation\LandscapeMode from 0 to 4, followed by soft reset, no joy!
2. tried toggling HKLM\System\GDI\Rotation\LandscapeFixed from 1 to 0, followed by soft reset...the right handed and left handed options in Screen under Settings->System become available but the g-sensor autorotate doesn't seem to respect the choice set here, so no joy!

Need some help figuring out if my trackball is working right...

This is an replacement phone. Everything is perfect on it and it works great but I'm not sure if my trackball is working like my old phone. Please let me know if your trackball has the same sort of response or if there's something up with it... pretty sure it is but I really don't want to repair this phone if its not necessary.
1. It works great in most areas on the home screen no problem.. but that seems to be expected cause its really not requiring much precision.
2. Mostly on selecting text (in the browser because I can't find another app that lets me have a select text cursor) I notice that:
-It jumps around a lot when going in any direction other than horizontal or vertical when holding the phone in portrait view and landscape. Diagonal is always imprecise and jumpy.
-I normally have to sort of flick the track ball quickly.. IE move my thumb over it quickly.. to get the cursor to move.
-While it can also move it slightly slower it's not as good and I can't have my finger resting on the trackball (where its depressed a tiny bit but not enough to click it) and then move my finger around. It doesn't do anything (or much of anything).
If I do any of these moves outside of "select text" it seems to work just fine but the precision on the movement I can't tell because I can't see exactly where things are going.
I think I got lost in the froyo FRF83 thread madness when I posted. Anyone willing to try and help out? This just a terribly implemented trackball text selection? If it is I figured it would've been fixed by now.. update-1, froyo 50 and froyo 83 all have the same results in terms of behavior with text selection.

Gallery root scrolling

So,
I Have been wondering this for a while and correct me if I'm wrong (did a search) and this problem wasn't on the forum yet.
When using the gallery app, the scrolling in the root of it (choosing a folder) is Really inconvenient.. When I have my finger on the screen everything seems to fine but when I release it or do a short flick with my finger (short=short trust me) it looks like it sets itself to what it looks like a predefined position. I.e. The page doesn't stop scrolling where my finger released the screen, it very quickly pops to another position.
Anyone else having this weird scrolling behaviour? Only in gallery application!
Regards
coebergh said:
So,
I Have been wondering this for a while and correct me if I'm wrong (did a search) and this problem wasn't on the forum yet.
When using the gallery app, the scrolling in the root of it (choosing a folder) is Really inconvenient.. When I have my finger on the screen everything seems to fine but when I release it or do a short flick with my finger (short=short trust me) it looks like it sets itself to what it looks like a predefined position. I.e. The page doesn't stop scrolling where my finger released the screen, it very quickly pops to another position.
Anyone else having this weird scrolling behaviour? Only in gallery application!
Regards
Click to expand...
Click to collapse
Yes i've seen it too. Quite annoying. Especially in portrait mode it seems to pan across a few more columns than is visible in the previous screen causing me to miss a few columns while scrolling!

Air Gesture

So I've been searching and searching and have not found anything in this regard. I'd like to be able to use my S5 in a way similar to the movie Minority Report with advanced hand motion gestures. I know I can use Air Gestures in Gallery and such, but what about general usage such as the app drawer scrolling, or system page scrolling? Is there a way to use a combination of the front facing camera and the proximity sensor to use hand gestures such as snapping your fingers to select an item, or pulling your hand away from the device to zoom in on a picture? I know it might be a considerable drain, but I am thinking of usage in a vehicle, such as car mode. Anyone ever heard of something like this? I've played with Tasker but couldn't do anything even remotely close to what I am attempting to set up.

Categories

Resources