PDA

View Full Version : Ext.view.View right to left pagination or card layout?



ostghost
3 Mar 2012, 11:52 AM
Hi,

need to create some widgets with pagination functionality. Top, bottom toolbars. Something like Google.com image search (http://2.bp.blogspot.com/_ZaGO7GjCqAI/S9i448pYcrI/AAAAAAAASss/OwocHfJUCZk/s640/google-mobile-image-search.jpg) result shown on mobile phones (http://www.youtube.com/watch?feature=player_detailpage&v=RyImd0y7ovE#t=28s).

Paging will be handled by dots. Like on e.g. Android, iOS. One dot or square per page. Donīt ask me why. Itīs designer decision :-)

Swiping is not required right now but maybe in the future as some user will try desktop application on tablet such request could appear.

How to achieve this? Iīm not asking for solution just point me what to extend, how to start in ExtJS 4 and do it right way.

Ext.Component with Ext.view.View? How to solve smooth paging resp. transition from right to left and vice versa?
Or card layout with separate dataviews? How to connect them to single store?

Basic widget could be easily extendable as there could be different content. Rows with texts and buttons, set of images etc. So different tpl for content is must.

E.g.:

Ext.define('MyApp.custom.widget.MyNews', {
extend: 'MyApp.custom.widget.Widget',

If itīs not possible in reasonable way I could paginate up & down instead of right & left. If so question is still same components to use and extend to do it rigorously.

Best Regards

32360

mitchellsimoens
4 Mar 2012, 7:26 AM
First, are you wanting to use Ext JS on mobile device? If so then you should use Sencha Touch instead.

ostghost
4 Mar 2012, 11:43 AM
Nope. Desktop is main platform.

In fact http://docs.sencha.com/ext-js/4-0/#!/example/form/custom-form.html is good example what I want to achieve. Iīll customize it to my needs, extend paging to show "dots" instead paging buttons etc.

And if there will be some time will try to animate new page transition.

Desktop is main target but sometimes comes handy to be able do some gestures on tablets. I found some topics here where others are asking about Sencha Touch 1 and Ext JS 3 or 4 combination. Maybe with Sencha Touch 2 as it has more in common with Ext JS 4 situation will be better.

I was looking for gesture to swipe over content to load next page.

mitchellsimoens
5 Mar 2012, 5:44 AM
The main issue you will have is scrolling though