sencha-touch

Animating dimensions in Sencha Touch 2

假装没事ソ 提交于 2019-12-09 13:25:20
问题 I'm trying to animate the height of a dataview, but it's currently just sliding the panel around the viewport instead of keeping it in place and changing it's height. The code is as follows: Ext.Anim.run(el, 'slide', { from: { height: height }, to: { height: newHeight }, out: false, direction: 'up', easing: 'ease-out', duration: 1000 }); For instance, height=200, newHeight=100 will result in the dataview dropping immediately so that it's top is at 200px below the viewport, and then animating

sencha touch i18n basics

我的未来我决定 提交于 2019-12-09 11:10:50
问题 How is i18n handled within Sencha touch? (I am talking of localization support for strings, but also of localized components) A more specific question: I have a form that contains a date picker, how do I make sure that the date will be displayed and picked in european format when I access the application using a french android phone? Cheers 回答1: There isn't an official API for i18n in SenchaTouch, yet. Although in Ext 4 there are localization files for all components in the /locale folder.

Accessing nested objects in JSON feed - Sencha Touch

ぐ巨炮叔叔 提交于 2019-12-09 00:17:42
问题 I'll begin with the usual disclaimer: new to Sencha Touch/working with JSON, floundering in the dark. Any help or prodding in the right direction is appreciated more than you know! I'm trying to get my app to fetch data from a public Google Spreadsheet JSON feed. From what I've managed to figure out, my current model is based on JSON arrays, NOT nested objects. How do I access and return a nested object? Ext.regModel('Count', { fields: [{name:'$t'}] }); this.list = new Ext.List({ itemTpl: new

Accessing native API/system from Sencha Touch

故事扮演 提交于 2019-12-08 23:14:30
Sencha Touch is quite perfect for my project. But in order to call a driver for an hardware barcode scanner on iOS and Android, it would be necessary to have access to the underlying system. Is that somehow possible with Sencha Touch itself when "transforming" it into a native app (the Sencha SDK allows this)? I know that it is possible with PhoneGap. But I'm afraid using all these technologies together (PhoneGap + Sencha touch) could make the UI less responsive, but that is a decisive factor in this project. Edit: in this thread, a user says the following: "you cannot access the native iOS

pass data from controller to existing view in sencha tocuh

三世轮回 提交于 2019-12-08 14:23:25
i am trying to pass a data from controller to existing view , i have tried following but non of them are working , i want to pass a data so that i can show it over an existing panel. from controller 1. Ext.Viewport.setActiveItem('profileinfo'); Ext.Viewport.setData(record.data); 2. Ext.Viewport.setActiveItem('profileinfo').setData(record.data); 3. Ext.Viewport.setActiveItem('profileinfo', {data:record.data}); 4. Ext.Viewport.setActiveItem({ xtype:'profileinfo', data:record.data}); where profileinfo is the panel where there is a titlebar and i am displaying title as {member_data} which is part

How to access native iOS file system using Sencha touch 2 alone

▼魔方 西西 提交于 2019-12-08 13:35:14
问题 I am working on an Sencha Touch application. There is a use case in this application where I need to modify text file and save it again on iOS device. As I've deal with almost 300-400 MB of data, so I can't use local storage here(Please correct me if I am wrong). Here, I don't want to use Phonegap or any other framework to access native file system. Could you please tell me, how I can access native filesystem using Sencha touch alone. 回答1: Since Sencha is a platform for building HTML5 apps

How to add images for different screen resolutions in sencha touch?

青春壹個敷衍的年華 提交于 2019-12-08 12:41:00
问题 How can we add images i.e. in android such as small, medium, large and xlarge images in sencha touch as well as for IOS devices for normal display and Retina display? Is there any built in feature or helper function in sencha touch framework? 回答1: You can go with Implementation of Media Queries to do so. Check out below reference links. Media Queries to handle all device’s screens HTML5 Media Queries EDIT : If you need to target the Retina display separately, you can use this condition in

SASS/compass path in config.rb causing problem on compile

有些话、适合烂在心里 提交于 2019-12-08 12:39:34
问题 When I compile my SCSS, I'm getting a "file not found" error that leads me to believe there is something wrong with my config.rb. The error from the command line includes part of the path twice as well as the ".." relative directory: File not found or cannot be read: C:/REALLY_LONG_PATH/C:/REALLY_LONG_PATH/../img/avatar.jpg The config.rb reads as follows: # Delineate the directory for our SASS/SCSS files (this directory) sass_path = File.dirname(__FILE__) # Delineate the CSS directory (under

PrePopulate SQLite DB in Sencha Touch + Cordova project

折月煮酒 提交于 2019-12-08 11:58:21
问题 I'm working on a Sencha Touch project and I'm in need to pack the app with a prepopulated DB. I'm using Cordova-SQLitePlugin (https://github.com/brodysoft/Cordova-SQLitePlugin) as a cordova plugin to use SQLite as a local DB and I've been looking around for ways of achieving my goal of prepopulating the DB but with no success. What I've found are blogs suggesting to copy the DB in a cordova folder and it's supposed to magically work but I haven't had any luck and I'm guessing it has something

sencha-touch using ActionSheet

拥有回忆 提交于 2019-12-08 10:49:02
问题 I am trying to use an ActionSheet to present the user several options to continue. I want to add a simple text box in the middle of the screen to describe the problem to the user. Is there a simple/standard way to put such a prompt in Sencha-Touch? 回答1: You'll need to do something like this on your overlay ... if (!this.popup) { this.popup = new Ext.Panel({ hideOnMaskTap: false, floating: true, modal: true, centered: true, hideOnMaskTap: false, width: 300, height: 200, styleHtmlContent: true,