titanium-alloy

Failed to package application when Android Manifest Portion is changed to

青春壹個敷衍的年華 提交于 2020-01-07 01:24:12
问题 I started a new test app, and downloaded a Holo Theme (by name JSTheme) from Android-holo-colors.com And replaced the /res folder contents with the res folder in that downloaded zip file. But when I replace the line in tiapp.xml <android xmlns:android="http://schemas.android.com/apk/res/android" /> to this, then the compile is not happening. It shows then: [ERROR] : Failed to package application: [ERROR] Application Installer abnormal process termination. Process exit value was 1 <android

Failed to package application when Android Manifest Portion is changed to

£可爱£侵袭症+ 提交于 2020-01-07 01:24:06
问题 I started a new test app, and downloaded a Holo Theme (by name JSTheme) from Android-holo-colors.com And replaced the /res folder contents with the res folder in that downloaded zip file. But when I replace the line in tiapp.xml <android xmlns:android="http://schemas.android.com/apk/res/android" /> to this, then the compile is not happening. It shows then: [ERROR] : Failed to package application: [ERROR] Application Installer abnormal process termination. Process exit value was 1 <android

Android Multi window support using Titanium/ Appcelerator Alloy

萝らか妹 提交于 2020-01-07 01:22:28
问题 In titanium how do I add multi window support as described here: https://developer.android.com/guide/topics/ui/multi-window.html Going into multi-window mode means the height of the app can change. Therefore I need to react to this, so I can show/hide/modify elements as appropriate. I presume that I need to add an event for when the app is resized, but I cannot seem to find out how to do this. In the docs, I have only found information regarding changing orientation: http://docs.appcelerator

Failed to open remote server file in Titanium

霸气de小男生 提交于 2020-01-06 17:58:25
问题 I want to get remote data from server but this is giving error that connection not execution. And in Console of Chrome browser shows. Failed to load resource: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://127.0.0.1:8020' is therefore not allowed access. XMLHttpRequest cannot load http://domeain.com/json.txt. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://127.0.0.1:8020' is therefore not allowed access

Failed to open remote server file in Titanium

不想你离开。 提交于 2020-01-06 17:58:10
问题 I want to get remote data from server but this is giving error that connection not execution. And in Console of Chrome browser shows. Failed to load resource: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://127.0.0.1:8020' is therefore not allowed access. XMLHttpRequest cannot load http://domeain.com/json.txt. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://127.0.0.1:8020' is therefore not allowed access

How to retrive values from Database in Titanium Alloy?

给你一囗甜甜゛ 提交于 2020-01-03 00:50:08
问题 I'm new to Titanium API. I want to know how to retrieve values from DB and display in UI. I created a model and inserted a row. My code is as below, Model: var moment = require('alloy/moment'); exports.definition = { config : { "columns": { "id":"text", "LanguageName":"text" }, "adapter": { "type": "sql", "collection_name": "UserLanguage" } }, extendModel: function(Model) { _.extend(Model.prototype, { }); return Model; }, extendCollection: function(Collection) { _.extend(Collection.prototype,

How to save or open a pdf file in pdf Viewer from response titanium

ⅰ亾dé卋堺 提交于 2019-12-25 09:43:02
问题 I want to open pdf file on click. I tried below code but it didn't help me. It is giving error could not read file var xhr = Ti.Network.createHTTPClient({ onload : function(e) { var f = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, 'file.pdf'); Ti.API.info('file == ' + f); Ti.API.info('response = ' + this.responseData); Ti.API.info('response = ' + JSON.stringify(this.responseData)); f.write(this.responseData); Ti.API.info('write file == ' + f.write(this.responseData)); Ti.API

How to bind the data in to label in Titanium alloy?

隐身守侯 提交于 2019-12-25 09:28:52
问题 How can I bind data from controller to xml, My code is as follows, View: <Collection src="respondentAge"/> <Label id="question"></Label> Styles ".question":{ font:{ fontSize:18, fontWeight:'normal' }, color:"#000", left:10, height:Ti.UI.SIZE } Controller var agenames = Alloy.Collections.respondentAge; agenames.on("reset", function() { var agenamesLength = agenames.length; var question; for (var i = 0; i < agenamesLength; i++) { question = agenames.at(i).get("quesion"); // I need to bind the

Orientation Portrait and PortraitUpSideDown Only For One Window

偶尔善良 提交于 2019-12-25 08:31:51
问题 I have 10 windows. The initial window is loginWindow i want to set orientation for Portrait and PortraitUpSideDown. For remaining windows will have landscape and portrait orientation. in Tiapp.xml <key>UISupportedInterfaceOrientations~iphone</key> <array> <string>UIInterfaceOrientationPortrait</string> <string>UIInterfaceOrientationPortraitUpsideDown</string> <string>UIInterfaceOrientationLandscapeLeft</string> <string>UIInterfaceOrientationLandscapeRight</string> </array> Which set all

Modifying widgets in an alloy project

随声附和 提交于 2019-12-25 08:14:21
问题 I have a widget which is a photo gallery. It's basic functionality means that it only allows the user to click on a thumbnail and then enlarge/de enlarge upon an onclick event. I need to expand the widget so that there is a button which allows the user to change their profile pictures accordingly (if they select that picture). Here is how the code looks by default in widget.js: var topView = Ti.UI.createView({ width:Ti.UI.FILL, height: Ti.UI.FILL, zIndex:1200, visible:false }); // this gets