Sench Touch 2 - How to develop dynamic carousel in sencha touch 2? I want to show each element from the store as a separate card in the carousel.
Rdougan offered this as an answer. Looks good to me.
http://web.archive.org/web/20121109164506/http://edspencer.net/2012/02/building-a-data-driven-image-carousel-with-sencha-touch-2.html
Update:
There's a good answer now to My question quoting some Ed Spencer code. Also I notice that the new release candidate touchstyle example uses an infinite Carousel which is loaded from a Store.
Previously on this channel:
I asked this question yesterday at Loading a Carousel from a Store in Sencha Touch 2?. No answers yet, but I notice that the new release candidate offers horizontal scrolling of lists. So I'm hopeful this might give an equivalent to the Carousel which can be loaded from a Store.
Related
I recently retrofitted bootstrap 3 carousels to my site and added swipe gesture support using jquery mobile swiperight and swipeleft. Like this:
How to make Bootstrap carousel slider use mobile left/right swipe
This works fine, however, the functionality isn't quite what I needed.
Previously I was using swipe.js which provided more of a drag and swipe mechanic. If you place your finger on the image in the carousel and then drag it left or right the image follows the movement instantly. This feels more natural and responsive than the jquery mobile swipe implementation.
I like using bootstrap carousel and swipe.js seems to be more than just a gesture library, it really provides some carousel functionality, so combining the two doesn't seem like an easy fit.
Is anyone aware of a plugin or an appropriate that brings swipe.js like functionality to bootstrap carousel?
I was looking for a solution to this problem recently and settled on this plugin: http://ixisio.github.io/bootstrap-touch-carousel/
It's relatively light weight and is written specifically for bootstrap. The only downside is that it requires hammer.js which adds some extra weight, but this isn't a big deal.
I'm building an App for Android, iOS and Blackberry with Sencha Touch 2.0.1.
I have a Form-Panel with about 10 selectfields and some sextfields. If i ran the app on Android 2.3 or higher, the selectfields are shown as pickers. So far so good.
When the user starts filling out the form starting with textfields, he can go through the form using the next-button on the virtual keyboard. The problem is, that the selectfields are ignored by the next-button. The user has to tap on the selectfields.
I can't figure out how to get prev- and next-Buttons for the picker-elements. So that I can go through the form only with the next-Button instead of pressing "done" and tapping on the next Selectfield. It would be far more comfortable for the user.
So support of the sencha-forum isn't really helpful, see below:
http://www.sencha.com/forum/showthread.php?219636-Native-select-field-for-Android
http://www.sencha.com/forum/showthread.php?205581-Can-I-use-iOS-native-picker-instead-of-ST2-picker
According to this, there are prev- and next buttons available for a picker:
http://www.sencha.com/forum/showthread.php?205159-Ext.picker.Date-with-no-prev-and-next-buttons&p=803794
But I can't find them:-(
I think, there are two solutions to the problem:
Accessing the native Picker as proposed in the first link above. The question is how?
Implementing an own Picker-Element with an Prev- and Next-Button. This seems to be a huge efford for such a basic task.
I can't really believe, that this is such a big deal in a big framework like Sencha Touch.
Anyone facing the same problem and has a working solution?
My only idea for you would to put your picker on the page as normal, then add two buttons on the page - a Prev and Next buttons using Sencha. Then add onTop handlers for those buttons, that use the picker's .setActiveItem() method to set the picker to the next or previous item. Hopefully that will get you on your way.
http://docs.sencha.com/touch/2-0/#!/api/Ext.picker.Picker-method-setActiveItem
I'm building a mobile version of a website, using Sencha Touch 2.0, I'm basing the mobile site on the sample app provided in the Sencha Touch Documentation ( http://docs.sencha.com/touch/2-0/#!/guide/first_app ).
I'm testing the app on http://iphone4simulator.com/ just to see what it will look like, but for some reason its not centered, its thinks the screen width is 360px instead of 320px.
I'm not sure how to correct this, has anyone experienced a similar problem ?
Regards
Actually looking closer at it, I think the problem is http://iphone4simulator.com/ and not sencha touch.
I have done a lot of research on this topic but I can't seem to find any "deal breaking" problems with both of these frameworks.
Disadvantages of DHMTLX Touch:
Not as popular in the market as Sencha
Not as many controls as Sencha (but still offers the needed controls)
Not as configurable as Sencha (I can live with the config options not supplied)
Disadvantages of Sencha Touch 2:
Awful documentation (but that because version is just out).
You get lost in many possibilities and combinations.
It is a hard framework to master
Can you help me add some disadvantages to this list?
I cannot judge on Sencha Touch 2, but I have used Sencha touch before. I am also developing apps using DHTMLX Touch.
I would not look at the disadvantages to agree on which framework I would use.
Personally, I leaned toward DHTMLX Touch because it felt more easier to master for me.
My suggestion is you try both frameworks to develop a simple app, and find which one you think you can code faster and debug your code easier.
If you are looking at developing an enterprise app, you may want to consider taking a look at the support packages, support and its pricing are important once you start hitting limitations or bugs you cannot get over.
One thing I found in particular with Sencha Touch 2 was that some controls seem of low quality. Take for example the iOS style "back" button that goes in the top nav bar.
Another matter which drove me crazy was that by default it forces you to use custom controls, for example, for the combobox and input types date, time, month, etc. In our case, we want to use the native controls.
On the other hand, the MVC framework behind Sencha Touch 2 is a solid proven one with lots of documentation online (either for Sencha or for ExtJS).
One thing I found a little disturbing about DHTMLX Touch was the crappy theme editor (Skin Builder) compared with jQuery's theme roller and also, some controls need some tweaking (for example the number selector) to make them look good.
Finally, we also found that from the many "Touch Frameworks" Sencha Touch 2 was one of the slowest and DHTMLX one of the fastest.
I am trying to design a feature in my application for the iPhone that simulates the Springboard feature (Main menu of the iPhone that allows you to view more apps), or the way Weather application works that allows you to flip between views.
Does anyone have any samples of this how I would go about doing this. It's seems very trivial but I am wondering if I am missing something that is already available either as an Apple example or someone who did a tutorial on this.
The image below show how the user would use it.
alt text http://www.agilitesoftware.com/SpringboardExample.png
As they slide their finger to the right (or left) the other image would begin to show up. And it would animate smoothly. The faster you swiped your finger the faster it would move to the next view.
Update: The other feature is that it should mimic the same feel when you slide your hand across the display that is snaps to the current view into place. It should not keep sliding across if there is more than 1 view to the direction you swiping your finger.
I've seen other applications use this so that is why I am asking.
This is accomplished using the UIScrollView with the pagingEnabled property set to true. Just add each of your views, adjust the contentSize, and it will automatically "page" to the width of the screen across the content.
There is a sample app (with code) with exactly this functionality on the iPhone developer site on Apple.com (I believe it's called "PageControl".) - I'd suggest checking it out.
d.
I'm writing an app that uses a similar UI. As NilObject recommended, we're using a UIScrollView with pagingEnabled=YES.
You may also be interested in this example code involving just two child views. I'm trying it out now; it's an interesting technique but I've had to write some additional special-casing code for some odd situations that resulted.
There's also another question on this site that asks about creating a grid of icons like the home screen.
I would check out Joe Hewitt's code from the Three20 project for this. It provides a nice interface and further refinement of the UIScrollView implemented as TTScrollView and TTScrollViewDelegate, TTScrollViewDataSource.