titanium

how to change hintText color in textField Titanium?

我的未来我决定 提交于 2019-12-06 13:59:47
this is my code,and I want to change the hintText Color, how to do? "#email":{ width: '70%', left:'13%', font:{ fontSize:'20sp' }, color: '#fff', hintText:'请输入手机号', borderColor:'transparent', bottom:'2%', //backgroundColor:'#d9d9d9', backgroundColor:'transparent', borderStyle:Ti.UI.INPUT_BORDERSTYLE_ROUNDED } actually you can't i tried before here what i did to change the hint color and font you need to create a view , textfeild and label with adding change listener on textfeild to show or hide the hint var mh_view = Ti.UI.createView({ backgroundColor : "white", height : "40dp", top : "224dp",

Titanium Desktop createProcess to run shell script

前提是你 提交于 2019-12-06 13:51:13
I'm new to Titanium and am trying to create a small test. I am on a Mac and trying to run the following code: <a id="btn-file" href="#">Create File</a> <script type="text/javascript"> document.getElementById("btn-file").addEventListener("click", function() { var process = Titanium.Process.createProcess( ['touch', 'file.txt'] ); }); </script> However, file.txt is not created. How do I run a terminal command from Titanium Desktop? Eventually, I'd like to click btn-file and it runs a shell script. Thanks! You're missing a call to the "launch" method. You create the process, but don't do anything

Appcelerator - Android failed to package application, duplicate file

女生的网名这么多〃 提交于 2019-12-06 12:55:13
Having a load of issues with Appcelerator at the moment, random error messages at every turn, but I know that comes with the territory. Today's hurdle is testing out the Facebook integration for my app and I'm testing on a vanilla project created by the studio. When I go to test the application I get the following error: [ERROR] : Failed to package application: [ERROR] : [ERROR] : /Users/auhjbe0/Documents/Appcelerator_Studio_Workspace/CleanProject/build/android/res/drawable-hdpi-v4/com_facebook_button_like_icon_selected.png: error: Duplicate file. [ERROR] : /Users/auhjbe0/Documents

How we get and post api in Titanium alloy?

£可爱£侵袭症+ 提交于 2019-12-06 12:37:28
How can we get and post api in Titanium alloy? I am having the api of userDetails, I just want that how can i code to get the data from api. function getUserDetails(){ } Thanks in advance. this is the solution for your problem:- var request = Titanium.Network.createHTTPClient(); var done=false; request.onload = function() { try { if (this.readyState == 4 && !done) { done=true; if(this.status===200){ var content = JSON.parse(this.responseText); }else{ alert('error code' + this.status); } } } catch (err) { Titanium.API.error(err); Titanium.UI.createAlertDialog({ message : err, title : "Remote

Issue regarding the change event of textfield in titanium

…衆ロ難τιáo~ 提交于 2019-12-06 12:23:09
I have the following code for(var i=0; i<3; i++){ var newTF = Ti.UI.createTextField({ top : 20, hintText : "new text field under "+(i+1)+" text field" width : '100%', id:args.obj.fields[i].id }); $.textFieldView1.add(newTF); } newTF.addEventListener('change',function(e){ if(e.source.getValue=='entered value'){ //do something } else{ //do something } }); Now the problem which I am facing is I am getting the last created textfield(i.e id of last created textfield).So I am not able change trigger any changes on previously created textfields.Its like previous id of textfield is overlapped by

Appcelerator Titanium: how to record video?

橙三吉。 提交于 2019-12-06 12:05:53
How to record video in Appcelerator Titanium and store in a specific location ? I am using an Android 2.3.6 device. This gist: https://gist.github.com/832488 does not seem to work as suggested / expected. It starts the video capture intent var intent = Titanium.Android.createIntent({ action: 'android.media.action.VIDEO_CAPTURE' }); as an activityForResult but the callback in Titanium.Android.currentActivity.startActivityForResult(intent, function(e) { ... }); is never called, none of notifications in code appear and the video is stored in some default location. The KitchenSink app does not

How do I run the Xcode project generated by Titanium?

丶灬走出姿态 提交于 2019-12-06 11:25:35
I'm sure it used to be possible to do this but I don't seem to be able to run the Xcode project generated by Titanium in Xcode. The app installs in the simulator and starts but immediately stops with the following runtime error: Could not find the file app.js I'm running Xcode 7.2.1 with appc cli 5.1.0 / ti CLI 5.0.5. The app is built with 5.1.2.GA. Running the app in Xcode would provided access to instruments and perhaps better insight in native level crashes etc. What you are trying to do isn't officially supported, but it is possible. First, do a clean build of your Titanium app from

navigate between multiple windows in titanium

倖福魔咒の 提交于 2019-12-06 11:12:26
问题 Let's assume I have 3 files Window1.js , Window2.js and Window3.js . I can navigate from Window1 to Window2 and from Window2 to Window3 with no problem. When I want to come back from window3 to window2 I do: window3.close(); Now I'm on window2 and want to go back to window1, so I did: window2.close(); . But instead that got my back to window3 not to window1 as I wanted. Is there any way to get back to window1? Can someone explain me how to navigate between this windows in titanium?Thanks 回答1:

how to live view in Titanium?

百般思念 提交于 2019-12-06 10:53:32
问题 My team have been developing Titanium in the past few months, and now we are facing a problem: when we make changes on the View code(change its font, its background or size) , it takes a long time ( about 1 minute ) until we see the result displayed on device. that is really a big waste of time. I saw the TiShadow already, it's great, but it only support js code( like Alloy.createTableList... ), doesn't support the Alloy XML( I mean you can't see your changes displayed on the screen once

Memory Leak in Titanium tabbed iPhone application

℡╲_俬逩灬. 提交于 2019-12-06 07:15:26
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, which I call from app.js function ApplicationWindow