I'm creating a Flash Air application for desktop. The goal is to create an app that opens up a webpage, shows virtual keyboard and duplicates the behaviour of scrolling like in iOS browser : you scroll with your finger - not with the scrollbar.
As I'm creating it on desktop, I need to scroll it with the mouse.The application is nearly complete. I'm connecting webpage with Air application using StageWebViewBridge. Now I need to create touch screen effect for scroll.
To do that - I need JavaScript. Can anyoone suggest something ?
Here's the reference : http://dev.sencha.com/deploy/touch/examples/production/kitchensink/#demo/list
PS : This is Sencha framework - suited for mobile devices. I need that kind of dragging scroll on my desctop device!
If you're looking for the same kind of scrolling like in iOS you should search for momentum scrolling. You'll find, for example, those JavaScript libraries "iScroll" and "Scrollability". Take a look, how they manage the scrolling.
Also interesting is this article on how scrolling on iOS works:
http://ariya.ofilabs.com/2011/10/flick-list-with-its-momentum-scrolling-and-deceleration.html
Hope this helps, and happy refactoring. ;)
Related
I've implemented jScrollPane and I'm having an issue on touch devices.
The example I'm using is http://jscrollpane.kelvinluck.com/drag_size.html where I have a vertical scroll using a circular button image for the scroll on the track. The class that's added to this is jspDrag.
On desktop, when you click and scroll the vertical button, it drags down and the content scrolls up, which is natural in my eyes.
The issue I'm facing is on touch devices (check the example URL above in Chrome using iPhone/iPad emulation in dev. tools) where you can't actually drag the button down - you actually have to scroll it up for the content to scroll?!
Users are definitely not going to know this as it's a button rather than a content block that you're using as a control.
I'd like to be able to touch and drag the button down on touch devices, rather than up, to make the content scroll.
Has any one come across this issue and managed to solve it? I've searched SO and Google Groups with no luck.
Thanks.
Unfortunately jScrollPane seems to just work like this, with an annoying caveat, which is unfortunate - I really liked the plugin.
I came across http://manos.malihu.gr/jquery-custom-content-scroller/ which functions the way it should and runs super smooth on touch devices.
I've tried a few libraries and Jquery plugins for sliding "pages" through the viewport using touch gestures, but none of them have "physics" similar to the iOS homescreen.
My goal is to assign a three-finger gesture that works on both touchscreens and touchpads that will simply move through a set of "pages" horizontally in realtime, and when the touch is released, "snap" to the currently most-visible page in the viewport. Just like the iOS homescreen.
SwipeView will give you that. It's an infinite scroller that only loads three pages at a time. It's very quick (the company I work for uses it for one of their products.)
You'll need to customise it to work on three fingers rather than just one. If you need any help using it, I'll be glad to help =)
I'm building a very basic webapp that displays ferry schedules.
I'm using phonegap to port it to a "native" app on Android and I'm have a bit of trouble with the scrolling.
It works perfectly in Chrome on the device, as well as on the android browser. I've tested on several devices and they all work great in browser. As soon as I put the project into Phonegap however the scroll becomes very "choppy" and skips and sticks. I've added a video link to show you the behaviour:
http://youtu.be/D18s9kgnD7g
I'll give you a brief explanation of how it works:
We're using translate3d CSS methods for transitions when we switch content in view so that we avoid using page transitions. Because of this we're not scrolling the actual page we're scrolling individual content divs so that we avoid weird scrolling bugs when switching between content views. Basically we have three "content views" on one page that switch out when we want to switch views.
Here's a link to the app:
http://ferriesapp.ca/app/
Things I've tried
We're using "overscroll: scroll;" one these content divs, which I know had some incompatibilty with Android pre 2.3 but should be good now.
We've tried a few big libraries, like iScroll and Scrollable, and things like that to no avail.
I've tried preventing default actions for touchmove.
We've coded correct touch events using Zepto's touch module.
I've tested on devices from the Nexus one (4.0.4) to the Nexus 7 (4.3) and it's the same story on all those devices.
Any help would be STRONGLY appreciated
I've been struggling with this for a while now and I can't seem to find anything on the internet that hits on this "choppy" scrolling bug.
EDIT: Here's a logcat from installation to when the scrolling bug happens:
http://pastebin.com/Aa7mDeAX
You got a pretty nasty style sheet there. First, you do not want any box shaddow because mobile does not like that. Then, since you have a lot of blank spaces, you want to help touch to work better with those blanks with user-select: html.
* {
margin: 0;
padding: 0;
-webkit-user-select:html;
-khtml-user-select:html;
-moz-user-select:html;
-ms-user-select:html;
user-select:html;
}
That should help with your scrolling, but you still have tons of thing to clean up with that CSS. Another issue is that you don't even have cordova loaded correctly, but that probably doesn't really matter for scrolling.
Actually, what is zepto_002.js? That seem to be the one that is causing the main scrolling issue.
As a fellow google play developer, having "three "content views" on one page that switch out when we want to switch views" is not a good idea. my only input though if you want to go this path would be to check this out http://pocketnow.com/2012/05/25/what-is-force-gpu-rendering-in-ice-cream-sandwich
I'm developing a mobile site. I want to incorporate a touch scroll area of the page with fixed header and footer areas.
I tried iScroll 4, but it gave problems when using early versions of Android.
The following solution works very well with iOS:
http://neave.github.com/touch-scroll/footer.html
Would you be able to suggest a solution that will deliver this functionality for Android phones?
From JQuery Mobile's doc site:
Scroll events
scrollstart
Triggers when a scroll begins. Note that iOS devices freeze DOM
manipulation during scroll, queuing
them to apply when the scroll
finishes. We're currently
investigating ways to allow DOM
manipulations to apply before a scroll
starts.
scrollstop
Triggers when a scroll finishes.
Look here for more information
I haven't been able to find a good example. You can look at $.mobile.silentScroll or $.mobile.slider here
I am playing around with Sencha Touch, especially with examples like http://dev.sencha.com/deploy/touch/examples/
However I am faced with a problem, when using the component the scale is set on the iPhone and the user cannot scroll the page or zoom in or out.
How may I disable these settings as I would like to have the carousel on a page which can be scrolled, and zoomed in/out.
Thanks.
[Sencha person] You can't zoom in or out of a Sencha component. Having fixed UI Chrome is one of the reasons to even use a UI framework (otherwise you'd might use a simple mobile-optimized web page).
You can have a scrollable area within a carousel, but you might want to consider whether that's really the best UX, since the carousel is already a scroller (it just scrolls in fixed increments) Take a look at touchstyle.mobi/app for an example of a data-store backed carousel.
I could be wrong, but it seems to me that the goal of sencha is to make full screen apps, so it seems logical that you cannot zoom/scroll the page ?
There are methods and plugins for zooming if you want.
Carousel ImageViewer (plugin) - Zoom feature
Pinch-to-zoom in panels
Pinch emulator (plugin)