appcelerator

Appcelerator Titanium: CSS width won't work with percentages

夙愿已清 提交于 2019-12-14 03:56:29
问题 I have made a HTML project in Appcelerator. I want a full screen canvas so in CSS I set the property to 100% (without quotes) which I found out doesn't work with Appcelerator. I've tried '100%' with quotes and Ti.UI.SIZE which both size it at a weird size that has the same aspect ratio seen in the image below. I have coloured the canvas green and the body yellow so you know its not the parent that's the problem. I have tried searching but HTML only apps don't seem to be too popular with

Error running Android emulator from Titanium Studio

一个人想着一个人 提交于 2019-12-14 02:59:35
问题 Basically trying to get the default sample project (which is linked to here) to run in the Android simulator. (I'm on Windows XP-SP3, see the "Diagnostics Log" output in the question's footer for more config info, if you have any questions about configs let me know.) Here's what I've done so far: Installed the current version of Titanium Mobile SDK Version: 2.0.1 Installed the Java SDK "jdk-6u31-windows-i586.exe" Installed the Android SDK Manager r18, then the following packages: Android SDK

It's necessary to remove views? In order to cleanup the Alloy controller (memory/performance)

这一生的挚爱 提交于 2019-12-14 02:55:39
问题 Lets say that I've a ScrollableView with 3 Views (forms), those form views have at least 10 fields, take a look at this exemple. index.js $.content.add(Alloy.createController('scrollable').getView()); scrollable.js $.scrollableView.addView(Alloy.createController('form',{ fields:[ {label:'field 1',type:'text'}, {label:'field 1',type:'date',value:'2016-06-08'}, ... ] }).getView()); $.scrollableView.cleanup = function() { $.destroy(); $.off(); for(var i = parseInt($.scrollableView.views.length);

Titanium: How to add Contact in Phone book in Android?

断了今生、忘了曾经 提交于 2019-12-13 20:36:01
问题 I want to add Contacts in phone book. I can add contacts in iPhone properly but in documentation I got to know that in Android, phone book is ReadOnly !!! Is there any other way to add ? Thanks.. 回答1: Solved ! I got help from this Link . We can add contacts in Android by Intent. if (Titanium.Platform.name == 'android') { var intent = Ti.Android.createIntent ({ action: 'com.android.contacts.action.SHOW_OR_CREATE_CONTACT', data: 'mailto:'+firstName+' '+lastName }); intent.putExtra('email',

How to get a transition for windows element like in scroll views?

心不动则不痛 提交于 2019-12-13 20:26:09
问题 I am trying to make a Demo in Appcelerator here is the code for it. var tabGroup = Titanium.UI.createTabGroup(); var main_win = Titanium.UI.createWindow({ title:'Tab 1', backgroundColor:'#fff' }); var win1 = Titanium.UI.createWindow({ title:'Tab 1', backgroundColor:'#fff' }); var tab1 = Titanium.UI.createTab({ title:'Tab 1', window:win1 }); var label1 = Titanium.UI.createLabel({ text:'I am Window 1', win:win1 }); win1.add(label1); var win2 = Titanium.UI.createWindow({ title:'Tab 2',

Embeded Youtube video to WebView (Appcelerator) doesn't show (black screen)

时光总嘲笑我的痴心妄想 提交于 2019-12-13 08:47:18
问题 I try to show YT video in my application (Appcelerator, Android). I found that the best way is to show embeded video in WebView, so I do it with such code: var webView = Ti.UI.createWebView({ url: 'https://www.youtube.com/embed/LTRfmqc0KBg', enableZoomControls: false, scalesPageToFit: true, scrollsToTop: false, showScrollbars: false }); but video does not load (I see only black screen - instead of webview's white). WebView works properly because it shows other pages. 回答1: Then you can try

Not able to set permission in Android 7.0.0

空扰寡人 提交于 2019-12-13 06:46:06
问题 Not able to set permission in Android 7.0.0. App launch sets Camera ,Location, storage ,calendar permissions which is not working in Android os ver >6. Please help. I tried below link example but no luck http://docs.appcelerator.com/platform/latest/#!/api/Titanium.Android Permissions section. Please advise 回答1: There is currently (Ti SDK 6.0.2.GA) a JIRA ticket and an open Github pull request about Nougat permissions. Might be worth following that ticket. 回答2: You need to add the permissions

Titanium: How to show multiple Annotations on Map?

时间秒杀一切 提交于 2019-12-13 05:48:58
问题 Its mine 2nd day on Titanium SDK. I want to show multiple annotations on the map. I have referred answers at SO but couldn't find fix ! I tried below code : - // To create map var mapview = Titanium.Map.createView({ mapType: Titanium.Map.STANDARD_TYPE, region:{latitude:33.74511, longitude:-84.38993, latitudeDelta:0.5, longitudeDelta:0.5}, animate:true, regionFit:true, userLocation:true, annotations:[createAnnotations()], top:110, height:200 }); // CREATE ANNOTATIONS function createAnnotations

Android Build Error: Unable to locate Java VM. Please set JAVA_HOME environment variable

夙愿已清 提交于 2019-12-13 05:29:46
问题 I'm using Ti Studio on Win7, and my project builds and works when I have my Android plugged in via USB and I run using "Android Device". However, when I try to buid it for distribution I get: [ERROR] Program launch failed. Unable to locate Java VM. Please set JAVA_HOME environment variable. I have looked at this thread which describes a similar problem, and verified that JAVA_HOME is set: +>echo %JAVA_HOME% C:\Program Files\Java\jdk1.6.0_29 Also, in Ti Studio I have verified that Preferences-

Does .jss feature is not supported in Titanium mobile SDK

放肆的年华 提交于 2019-12-13 05:23:47
问题 I am trying to use .jss. but i dont know why it is not working. I have a mywindow.js file and i have created a mywindow.jss file. in mywindow.jss file #b { width: 40; height: 50; color: '#324f85'; font: {fontFamily: 'Helvetica-Bold', fontSize: 15}; } in mywindow.js var myButton = Titanium.UI.createButton({ id : "b", title: 'clickME' }); I dont know what i am doing wrong here. Both .js and .jss file are in same location. Using sdk 1.8.1 回答1: Whenever you change (or create) any JSS classes, you