titanium

Titanium: navigation from one screen to other

帅比萌擦擦* 提交于 2019-12-03 22:58:20
On the click of my button, I want to navigate to another screen. How would I achieve this in Titanium? var TrialButton = Titanium.UI.createButton({ color:'black', backgroundColor:'#FFFFFF', title:'Trial Mode', top:55, width:300, height:50, borderRadius:5, font:{fontSize:18, fontFamily :'Helvetica', fontWeight:'bold'} }); TrialButton.addEventListener('click', function() { var newWindow = Titanium.UI.createWindow({ background : "#fff", title : "Trial Demo", url:"nextScreen.js" }); newWindow.open(); }); TrialButton.addEventListener('click', function() { var newWindow = Ti.UI.createWindow({

java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity. titanium

对着背影说爱祢 提交于 2019-12-03 21:14:00
问题 I'm creating a custom theme for my Titanium application using this theme generator. But when I run my application it's crashing and my log says that I need appCompact even if I set the theme for sdk > sdk 11. And my targeting Android version is API 19 and min SDK version is API14, so I wonder why I need appCompact . This is what my log says: [ERROR] : TiApplication: (main) [512,512] Sending event: exception on thread: main msg:java.lang.RuntimeException: Unable to start activity ComponentInfo

How do you create a raised tab bar item, like the one found in Instagram, with Titanium?

好久不见. 提交于 2019-12-03 20:23:46
I am trying to create a menu like the one on Instragram, with the central item using a special design, but the Titanium Documentation does not provide information about this kind of feature There's an example with an already answered question in here: How do you create a raised tab bar item, like is found in Instagram? but I need it working on titanium, any clues? I believe Instagram is written in Objective-C. Creating a custom tab bar as they have made involves subclassing the native tab bar, but you don't have the ability to do that with just JS and Titanium. Here's a tutorial for faking a

what are the best Practices for developing applications using Titanium Framework targeting iPhone & Android?

99封情书 提交于 2019-12-03 20:06:59
I am planning to develop an application using Titanium Framework for iPhone and Android. Can someone list the best practices, do's and don'ts for the development using your experience with the framework? this is more of a tip then anything but so far my favorite function has been the tt.os in tweetanium that handles passing of vars of functions to the correct platform. and an example of how they use it First of all, there's the Appcelerator guide on Titanium's best practices: https://wiki.appcelerator.org/display/guides/Mobile+Best+Practices A working link to the Tweetanium repo is here: https

The Titanium Command Line (CLI) project

大憨熊 提交于 2019-12-03 19:58:06
Installation [sudo] npm install -g titanium Bleeding Edge You can download the latest and greatest unstable Titanium CLI code by running the following: [sudo] npm install -g git://github.com/appcelerator/titanium.git Obtaining a Titanium SDK You will need to download a Titanium SDK 3.0 or newer: # stable release (recommended) titanium sdk install --default There are times when the latest stable release has an issue or lacks a feature in which case you may want to try an unstable Titanium SDK build. These builds are not recommended for production use, but should work for development. # unstable

How to Call a WebService in titanium using javascript

给你一囗甜甜゛ 提交于 2019-12-03 16:41:16
I am new to titanium and and want to call a web service from my titanium app. The webService returns the json response. As I am aware of calling the webService using XMLRPC but very confused regarding json. Until now, I know that we have to create the HTTPClient . var request = Titanium.Network.createHTTPClient(); request.open("POST", "http://test.com/services/json"); request.onload = function() { var content = JSON.parse(this.responseText);//in the content i have the response data }; request.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); //did not understand this line

How can i add jquery to Appcelerator Titanium Mobile Work?

帅比萌擦擦* 提交于 2019-12-03 15:04:25
问题 Is it possible to integrate the jquery in to Titanium Appcelerator and will it work properly? Else we can't integrate the jquery in titanium appcelerator? any one help me? 回答1: What exactly are you trying to do? I'm not sure that it work well without the DOM 回答2: you can use basically any JS library you want in a WebView. Outside of a WebView, you can use basically any JS library that does not require the DOM (like json2.js, etc.) (from here) 回答3: Check out the following forum. YOu can use

Titanium Alloy ListView Nested Model Array of Tags

我怕爱的太早我们不能终老 提交于 2019-12-03 09:11:01
I am using Titanium Alloy version 3.2. I have a collection of posts in a listview. My data looks like this: [ { username: 'dude', imageUrl: 'url', tags: ['tag1','tag2','tag3'] }, { username: 'wheres', imageUrl: 'url', tags: ['tag1'] }, { username: 'my', imageUrl: 'url', tags: ['tag1','tag2','tag3','tag4'] }, { username: 'car', imageUrl: 'url', tags: ['tag1','tag2'] } ] And here is the xml. This works only for username and image. I can't figure out how to add the tags to each post. <ListView id="streamListview"> <Templates> <ItemTemplate name="template" id="template"> <View class="item

Memory Leak in Titanium tabbed iPhone application

匿名 (未验证) 提交于 2019-12-03 09:02:45
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: this has been giving me a headache for a couple weeks now -- hope somebody can help. I'm building an app for iOs 5.0, using the 2.1.4 SDK in Titanium mobile. My app pulls data from a database, and displays it in a scrollableview using labels and a table. I've noticed that it crashes after a while, and according to instruments, the views within the scrollableView, along with the labels and tableviews, are never released from memory. I use a lot of commonJS, and my code looks someting like this (stripped down): The ApplicationWindow module,

How to upload images from iPhone app developed using Titanium

99封情书 提交于 2019-12-03 08:51:34
I finally landed up in developing an iPhone app using Titanium Mobile. Now the problem I face is, Im able to run the app, and the app also sends the image to the server. But Im not able to see the file that got uploaded to the server. I have pasted the iPhone app's code to send image to the server and also, the PHP file that would receive the file from the app. var win = Titanium.UI.currentWindow; var ind=Titanium.UI.createProgressBar({ width:200, height:50, min:0, max:1, value:0, style:Titanium.UI.iPhone.ProgressBarStyle.PLAIN, top:10, message:'Uploading Image', font:{fontSize:12, fontWeight: