titanium

Titanium delete TableViewRow, model-view binding should automatically reflect tableview

纵饮孤独 提交于 2020-01-15 12:33:17
问题 This is how I delete a tableviewrow on a longclick event of a tableview (android) $.tableview.deleteRow(e.index); , but this just removes the row. How do I also remove the data on my tableviewrow which will in turn remove it from collection via model id, and model-view binding should automatically reflect this in tableview.Any Ideas?Thank You. 回答1: you need to delete the model object from the collection which will then trigger the appropriate events to update the table. So in your longpress

Titanium delete TableViewRow, model-view binding should automatically reflect tableview

主宰稳场 提交于 2020-01-15 12:33:11
问题 This is how I delete a tableviewrow on a longclick event of a tableview (android) $.tableview.deleteRow(e.index); , but this just removes the row. How do I also remove the data on my tableviewrow which will in turn remove it from collection via model id, and model-view binding should automatically reflect this in tableview.Any Ideas?Thank You. 回答1: you need to delete the model object from the collection which will then trigger the appropriate events to update the table. So in your longpress

Android Remote Video with Titanium

♀尐吖头ヾ 提交于 2020-01-14 08:27:30
问题 Greetings all! I'm trying to play a video that is hosted on our webserver on an android phone. I've already built this for iPhone and it works great. Droid, however is a different issue. Instead of getting video, I'm just getting a black screen, no error or anything. The code I am using is: activeContent = Titanium.Media.createVideoPlayer({ contentURL: content, backgroundColor:'#111', movieControlMode:Titanium.Media.VIDEO_CONTROL_DEFAULT }); win.add(activeContent); activeContent.play(); The

How we get and post api in Titanium alloy?

痴心易碎 提交于 2020-01-13 19:11:33
问题 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. 回答1: 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); }

How do you link to pages/windows in Titanium Mobile without tabs?

允我心安 提交于 2020-01-13 06:56:23
问题 I realize this is the most basic of questions, but I am unable to find out how to link between windows without using tabs. The following code works to close a window, which sort of works as a back button. But how do I specify which file/url I would like to link to? btn_home.addEventListener("click", function() { Ti.UI.currentWindow.close(); }); I found a solution: btn_home.addEventListener('click', function() { var newWindow = Titanium.UI.createWindow({ url: 'home.js' }); newWindow.open

How do you link to pages/windows in Titanium Mobile without tabs?

﹥>﹥吖頭↗ 提交于 2020-01-13 06:56:07
问题 I realize this is the most basic of questions, but I am unable to find out how to link between windows without using tabs. The following code works to close a window, which sort of works as a back button. But how do I specify which file/url I would like to link to? btn_home.addEventListener("click", function() { Ti.UI.currentWindow.close(); }); I found a solution: btn_home.addEventListener('click', function() { var newWindow = Titanium.UI.createWindow({ url: 'home.js' }); newWindow.open

App store Rejects App for IPV6 network support on iOs 10

一笑奈何 提交于 2020-01-12 18:34:49
问题 I got an app rejection mail from apple which is below, We discovered one or more bugs in your app when reviewed on iPad and iPhone running iOS 10.0.2 on Wi-Fi connected to an IPv6 network. Specifically, app remains on splash screen upon launch. Based on their request i have created the NAT64 network on my Mac and shared that internet for the iPhone 5S device 10.0.2 os version , App was working fine, But apple says its not working with IPv6 Can anyone confirm that do i need to check anything

Titanium: navigation from one screen to other

好久不见. 提交于 2020-01-12 10:48:42
问题 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

convert base64 string to image with javascript

末鹿安然 提交于 2020-01-10 15:36:15
问题 Am developing an application with Titanium. I need to convert base64 string which i would be getting from JSON to an image. Your help would be greatly appreciated. 回答1: You can just create an img element and change its src with the required data: <img src="data:image/png;base64,iVBORw0KGgoAAAANS..." /> 回答2: For Titanium, you use the built in conversion utility Titanium.Utils.base64decode: var imageFromBase64 = Titanium.UI.createImageView({ image : Titanium.Utils.base64decode(

Unable to make an Image Blob JSON Serializable

强颜欢笑 提交于 2020-01-07 03:42:05
问题 JIRA Ticket created due to base64encode failure: https://jira.appcelerator.org/browse/TC-5876 My Current CFG: Titanium SDK 5.1.2.GA Testing on an iPhone iOS 9.1 I'm stuck in a problem in a project for a client that requires images took on device (using the camera) to be sent to a WebService and afterwards be seen on any device using the app (both Android and iOS devices). Titanium provides a Ti.Blob object (event.media) after taking a picture (which is not JSON serializable) and I need