sencha-touch-2

Sencha Touch - Google Map and centering a Marker

青春壹個敷衍的年華 提交于 2019-12-07 18:02:02
问题 Is it just me or does the google maps api seem to be on the quirky side? Trying to simply show a marker for some coordinates, and then center the screen on the marker. In my controller fired from a view: onGoogleMapRender: function (googleMap) { var long = record.get("Longitude"); var lat = record.get("Latitude"); var pos = new google.maps.LatLng(lat, long); var marker = new google.maps.Marker({ position: pos }); marker.setMap(googleMap); googleMap.setCenter(marker.getPosition()); googleMap

How to create APK file of Sencha Touch Application?

余生颓废 提交于 2019-12-07 17:42:16
问题 I create Sencha Touch Application i wont create APK file of that Application i download sencha sdk tools and configure now what step need to follow to create APK file using sencha-sdk tool pl help me to create APK file using sencha-sdk tool 回答1: You can use Phonegap and eclipse to create native apk for andriod http://wiki.phonegap.com/w/page/30862722/phonegap-android-eclipse-quickstart 回答2: You can also create the apk without sencha sdk tools as follows Follow the steps 1.- Sign up in https:/

how to call a function on a controller when Tapping on TabPanel? Sencha Touch 2

谁说我不能喝 提交于 2019-12-07 15:38:10
问题 I have a controller and a TabPanel in Sencha Touch 2, I want to call a function when an element is tapped on the TabPanel: TabPanel.js Ext.define('app.view.principalTabPanel', { extend: 'Ext.tab.Panel', alias: 'widget.ptabpanel', config: { ui: 'light', items: [ { xtype: 'container', itemId: 'idContnr', title: 'tap Me!', iconCls: 'bookmarks' } ], tabBar: { docked: 'bottom', ui: 'light' } } }); controller.js Ext.define('app.controller.mainController', { extend: 'Ext.app.Controller', config: {

How save image to phone memory say SD card or local hard drive when a image tap event is fired?

北城余情 提交于 2019-12-07 10:20:22
问题 I have an image which I am displaying with the help of image view using Sencha Architect 2. I am able to get a tap event on the image. But I don't know how to save the image to phone when the image is tapped. I did a Google search for this but could not find the proper documentation or example. Can anyone help me please. Here is the code I am trying tap: function(img, e, options) { var overlay = Ext.Viewport.add({ xtype: 'panel', modal : true, hideOnMaskTap : true, hidden : true, width : 100,

Nested JSON from 3 one-to-many Tables

半城伤御伤魂 提交于 2019-12-07 08:21:49
问题 I'm building a Sencha-Touch 2 app and I have some trouble with the recuperation of my data from server side (mysql DB). Here's my data model : Table1 : ID:int description:varchar(100) Table2 : ID:int description:varchar(100) table1_ID:int Table3 : ID:int name:varchar(100) info:varchar(100) table2_ID:int Table1 is join to Table2 with a one-to-many relationship and same between Table2 and Table3. What I want from server is a nested JSON who looks like this : [ Table1_object1_ID: 'id' : { Table1

Sencha Touch list not displaying (again!)

淺唱寂寞╮ 提交于 2019-12-07 06:54:51
问题 My Sencha Touch list isn't displaying. All I did was change the root container to a navigation view so other views can be pushed onto it, but then the navigation doesn't like having 'fit' as the root. So I moved that into another container with type 'fit'. However, now the list doesn't display?! See below: Ext.define('MyApp.view.inbox.MyInbox', { extend: 'Ext.navigation.View', alias: 'widget.myinboxview', requires: [ 'Ext.navigation.View' ], config: { title: 'My Inbox', xtype: 'card', items:

Why is there no sync callback in Sencha Touch?

久未见 提交于 2019-12-07 04:06:52
问题 I'd like to be able to show a message to the user once a store sync has successful completion. However, there doesn't seem to be any way of using a callback or calling this synchronously. I'm a little surprised this isn't provided out of the box as it must be a common problem. Is there any work-around for this? 回答1: It took us ages to find a proper solution to this. Finally we added listener to the store's write event what seems to be working properly. As it is needed frequently it has been

Sencha Touch 2: Insert into TreeStore/NestedList

谁都会走 提交于 2019-12-07 03:04:07
问题 I'm using a NestedList with a underlying TreeStore. Now I want to add items to the NestedList as leafs. How can I do this? Currently my code (Controller, onAddButtonTapped) looks like this: var store = Ext.getStore('menuStore'); var customerAreaNode = store.getRoot().getChildAt(1); customerAreaNode.appendChild({name: "text", leaf:true}); customerAreaNode.expand(); store.sync(); This code results in two new empty listentries on leaf level (behind the correct node) and one new listentry on node

Disable store load mask in Sencha 2

可紊 提交于 2019-12-07 02:56:36
问题 The Sencha store is automatically adding a ajax loader mask when populating the store, but I want to hide it since I have made a more generic mask which is shown every time the app does a ajax request. How can I hide the store load mask? Tried to look in the documentation, but didnt find any appropriate field/method there: See attachement: 回答1: The property exists: loadingText, which you have set to null. { xtype: 'list', store: 'Store', loadingText: null, // for ST 2.3.0 set it to false ....

How can I create a resizeable text area in Sencha Touch?

回眸只為那壹抹淺笑 提交于 2019-12-07 00:24:31
I have an application in Sencha Touch where I have a textareafield. In Chrome, this is resizeable, but not when using an iPhone (I haven't tried on an Android device). I need to have a text input area where people can enter text anything from one or two words long to many sentences. So I need this to either automatically resize ; have some way of manually resizing it; or some way of scrolling within it. So far I have been unable to do any of these with Sencha Touch. I would really appreciate it if someone can point me towards a workable solution. It doesn't need to be any specific component in