I have researched this question and I can't find it anywhere. Does anyone know if you can add the ability to swipe on a smartphone with a Progressive Web App?
Yes. Look up Scroll Snap to see how to get your swipe stop points at the right place.
Look up Flexbox display as well.
Related
Is there anything that I can use to mimic the UIPageControl in Android Phonegap? I've tried to research it but can't find any clue.
As far as I know in HTNL and Jquery i dont think you have any control to do such. You will have to implement it on your own. You will have to take an image tag in HTML with two buttons / handle the swipe event in jquery Mobile (http://jquerymobile.com/test/docs/api/events.html) and then upload a new image and call redraw on the page.
A lot of apps that I have (such as gmail) has a feature where you can swipe left and right to go from one record to another. In gmail, this navigation takes you from one email to the next (or previous, depending on which way you swipe). When you reach the end, you get this blue halo effect, and the swiping in that direction doesn't work. My question is, what is this navigation called? Is it something in the sdk, or is it written by the developer for each app? Can I use it in my app where I have data stored in the sqlite database that I would like to show one record at a time this way? Is it available in all sdk versions?
I would search for it, but I don't know what it's called so I can't really think of any good search terms here. If someone just points me in the right direction, I can read the documentation and figure it out.
The component you are looking for calls ViewPager. You'll find in under the compatibility pack jar.
android viewPager implementation
http://android-developers.blogspot.co.il/2011/08/horizontal-view-swiping-with-viewpager.html
You can use something called a viewFlipper if you want to use animations.
There's a nice tutorial here: http://www.warriorpoint.com/blog/2009/05/26/android-switching-screens-in-an-activity-with-animations-using-viewflipper/
Good luck :)
Some of the users of my website are telling me they find it annoying when they try to touch certain links and instead of activating the link it zooms into the link and associated metadata (which is made up of a few links).
So how many css pixels of separation are needed between the link and the associated data to stop this behaviour?
I also would like to know that, and eventually a js/css trick to disable it on demand.
You can also have a look at this question :
How to prevent google chrome android browser to display the magnifier when users click a button?
I am planning to implement Honeycomb tablet application based on WebView (so, basically it'll be a HTML5 web based application made only for tablet).
I am looking to implement horizontal and vertical scrolling by swiping finger. For better understanding I created sample outline.
This image shows something similar to Honeycomb's native setting activity with left and right page vertically scrollable
Any kind of guides or resources are welcome. Thanks
Take a look at iScroll:
iScroll 4 is a complete rewrite of the original iScroll code. The script development began because mobile webkit (on iPhone, iPad, Android) does not provide a native way to scroll content inside a fixed width/height element. This unfortunate situation prevents any web-app to have a position:absolute header and/or footer and a scrolling central area for contents.
While latest Android revisions are supporting this functionality (although support is not optimal), Apple seems reluctant to add one finger scrolling to divs...
Here is what I have found so far:
It depends on how you want to implement scrolling. If you want to attached swiping event, thats the easiest way to implement using well known libraries:
jqTouch - It has swipe left and right event which can be hooked to scroll left or right (it seems all the webkit based animations work only on iOS devices). Please note that project is still in beta and not highly active. EDIT: this is also part of Sencha Labs - who actively maintains Sencha Touch.
Sencha Touch - They have better support for almost everything in mobile and tablet. (Note: It's free for opensource apps but not for commercial apps - EDIT: they actually have commercial license. see their site for more info on licensing)
jQueryMobile - They are very stable (in RC1 as of now), and has swipe left and right event, but I could not find swipe up or down. If you just need swipe left right, tap, tap hold, then go with jQM. They have the best community support.
RAW JS - Finally, if you want something raw javascript, visit HTML5Rocks article to have better in-depth idea about how touch event works.
I hope it helps. I'm still struggling to implement scroll up down, since I don't want to wait for swipe to end, instead I am trying to implement instant scroll feedback, getting very close using RAW JS coordinates, but not satisfactory.
Hammer JS has been useful for me:
http://eightmedia.github.io/hammer.js/
From the creators of iScroll, SwipeView seems a nice dedicated alternative. Have a look at demo 1 and demo 2.
I have not tested yet, but I will surely. Since demos behave well on my iPad.
You might find this library quite useful: https://github.com/cubiq/2-way-iScroll
It handles the case of vertical scroll and horizontal swipe.
I am writing my first Android app.
The app is displays bus stop information i want to have a panel for each stop that the user can scroll sideways through, like a weather app with a panel for each city.
Looking at the Dev Guide I don't see how to do this.
What Layout Object/ViewGroup should I be using? or should i looking somewhere else?
Sounds like you want a HorizontalScrollView. There's an example of its usage here.