sencha-touch

scroller.scrollTo in Sencha Touch don't work if not launched manually just before

我是研究僧i 提交于 2019-12-06 10:54:55
问题 I encounter a problem when i want to use the scrollTo function of the scroller component. When i execute this command (by a button located on an another panel) : myPanel.scroller.scrollTo({x: 0, y: 200}, true); My panel is scrolling only if just before , i have scroll it manually by touching the screen. It's like i have lost focus on the scroller. Someone have an idea of where is the problem ? Thank you. 回答1: That's because the scoller doesn't know the boundaries of its wrapped widget.

Get values from localStorage to use in Sencha Touch AJAX Proxy

自闭症网瘾萝莉.ら 提交于 2019-12-06 10:51:04
问题 In my Sencha Touch application I store some values in localStorage and they get stored just fine. Later I need to use those values for a request to a store and I need to pass those values as request headers. The code looks like the following: Ext.define('AppName.store.storeName', { extend: 'Ext.data.Store', requires: [ 'AppName.model.modelName' ], config: { model: 'AppName.model.modelName', storeId: 'storeName', proxy: { type: 'ajax', url: 'http://dynamic', headers: { auth_token: localStorage

Horizontal scrolling list

左心房为你撑大大i 提交于 2019-12-06 10:36:52
I would like to have images displayed in a horizontal list. This is what I've done so far : var list = Ext.create('Ext.List',{ store: store, itemTpl: new Ext.XTemplate('<img src="{icon}" />'), inline:true, scrollable: { direction: 'horizontal', directionLock: true } }); My store has 5 items, but the list only display two (because the screen is not large enough to display more than two images). I tried to solve this problem by setting the width of my list to 1000px like so : style:'width: 1000px', All the items are now shown, but now, the problem is the list is not scrollable anymore. I can't

Sencha Touch/HTML5 Swipe event/effect from left to right

戏子无情 提交于 2019-12-06 09:39:03
问题 I try to do a swipe event/effect from left to right in Sencha Touch or HTML5. So if the HTML page runs on iOS then it should start an animation if the user touche ans moves/swipe with the finger from the left to the right on the screen. Any ideas how this can be done 'easily'? 回答1: If I understood you correctly, you want to switch content if the user swipes the screen to either left/right. I believe the easiest approach is to use a Carousel. Please have a look at the Sencha Touch Kitchen Sink

Unable to access global variable entire one controller in sencha

让人想犯罪 __ 提交于 2019-12-06 09:14:52
I have been trying to access global value inside one controller, but could not access it. i have been following this How to define global variable in sencha but could not set and access global values. in Controller config: { successMessage:100, control: { 'submitnewword': { activate: 'onActivate', itemtap: 'onItemTap', ConfirmTestCommand:'Confirm' }, ....... }, onSearchKeyUp: function(searchField) { success: function (response) { this.setSuccessMessage(1); } else { this.setSuccessMessage(0); } } and access it Confirm: function () { console.log("Confirm----- Caling on Controller"); var testing

Sencha Touch - scroll to last tab on TabBar

怎甘沉沦 提交于 2019-12-06 06:44:03
问题 There is a view with many tabs in my App. I'd like to set focus on the last one. I can set active tab this.setActiveItem(10) , but I'm not able to scroll (programmatically) tabbar to the last item. Content of the 10th tab is shown but 10th item on tabbar is hidden, so user could be confused. Thanks a lot in advance. 回答1: A really good question and many people may find this useful. So first, instance of tabBar is needed so we can get activeTab of tabPanel . Then we can easily get the offset of

Adding video using Sencha

£可爱£侵袭症+ 提交于 2019-12-06 06:38:11
问题 I want to add a youtube video in my site using Sencha. I use the following code: var pnl = new Ext.Panel({ layout: { type: 'vbox', pack: 'center' }, items: [{ xtype:'video', url: "space.mp4", loop: true, width: 500, height: 400, poster: 'Screenshot.png' }], fullscreen: true }) Here I replace the space.mp4 with a youtube url but it doesn't work. If I write html:'you tube link' , it works on the browser on my system, but not on iPhone. How can I make this work? 回答1: One workaround is to embed

Xtemplate if conditions in sencha touch

ぃ、小莉子 提交于 2019-12-06 05:09:42
问题 I have the following Xtemplate code: ('Ext.XTemplate', '<div class="moreArrow"></div>', '<div class="img"><img src="http://localhost/WL2/assets/rest/{image}"/></div>', '<div class="meta">', '<h3>{merchName}</h3>', '<div class="actions">', '<button class="seen{[values.seen ? " selected" : ""]}">{action}</button>', '{% if (values.seen) { %}', '<button class="thumb up{[values.like ? " selected" : ""]}"><b></b></button>', '<button class="thumb down{[values.dislike ? "selected" : ""]}"><b></b> <

iPhone: Phonegap: Audio Playing in Background

耗尽温柔 提交于 2019-12-06 05:03:17
问题 I'm using this Code to stream an MP3 audio file in background mode in Phonegap. But the Problem is: With this Code there is no way to get the current position and all the other phonegap functions with this Code. I tried the native quicktime/childbrowser method to play the file. This works great and shows timeline etc. BUT there is no way to hide the quicktime player and browse in the app and there is also no way to save the position and set the position in the audio files. Any Ideas to solve

Textfield does not focus in UI WebView in iOS7

让人想犯罪 __ 提交于 2019-12-06 04:55:47
问题 The textfield does not focus if it is located in the bottom half of the screen but it works if it is in the top half. I find this problem in iOS7 in the simulator as well as the device in an installed app. Iam using sencha touch & phonegap but I dont think they are the reason for the problem since even a simple textfield positioned below half the height of the screen fails. When I tap on the textfield the OS should push the textfield a little above before the keyboard gets shown. But this