appcelerator

How can I adjust the width of a pickerColumn to the text inside the pickerColumns?

我只是一个虾纸丫 提交于 2019-12-25 18:12:35
问题 So far I can only adjust the size of each PickerColumn manually through code, but I want each of them to adjust automatically according to the contents from the largest PickerRow inside of any of them. This is because I'm working with dynamic PickerColumns whose PickerRows content change according to the previous PickerColumn's selected value. I found out how to scale the whole Picker using the next code: var transformPicker=Ti.UI.create2DMatrix().scale(0.5); var picker = Ti.UI.createPicker({

How can I adjust the width of a pickerColumn to the text inside the pickerColumns?

夙愿已清 提交于 2019-12-25 18:12:11
问题 So far I can only adjust the size of each PickerColumn manually through code, but I want each of them to adjust automatically according to the contents from the largest PickerRow inside of any of them. This is because I'm working with dynamic PickerColumns whose PickerRows content change according to the previous PickerColumn's selected value. I found out how to scale the whole Picker using the next code: var transformPicker=Ti.UI.create2DMatrix().scale(0.5); var picker = Ti.UI.createPicker({

app will freeze if re-launch from the task bar after closing it using Titanium.Android.currentActivity.finish();

谁说我不能喝 提交于 2019-12-25 07:39:01
问题 anyone knows any workaround? We are closing the application by calling this line of code Titanium.Android.currentActivity.finish() when the user tap the back button(device back). Though the application will close completely, if the user tried to re-launch the app using the recent apps(task bar), the application will freeze that affects device performance. I created a new app, tested it and was able to replicate the issue. Anyone knows a work-around? Steps: 1. Create an app 2. Create a window

Titanium Alloy Controller Constructor doesn't exposer functions

妖精的绣舞 提交于 2019-12-25 07:17:11
问题 I am creating a row made from a widget dynamically from another controller. While I seem to have access to the views I cannot access the exported functions. Here is the controller code for the widget. var moment = require("/lib/moment-with-locales"); var args = $.args; var isSent = true; function configure(data){ $.userImage.image = data.otherUser.attributes["avatar-thumb-url"]; $.userNameLabel.text = Alloy.Globals.getFormattedName(data.otherUser.attributes["first-name"], data.otherUser

Titanium Alloy Controller Constructor doesn't exposer functions

狂风中的少年 提交于 2019-12-25 07:16:00
问题 I am creating a row made from a widget dynamically from another controller. While I seem to have access to the views I cannot access the exported functions. Here is the controller code for the widget. var moment = require("/lib/moment-with-locales"); var args = $.args; var isSent = true; function configure(data){ $.userImage.image = data.otherUser.attributes["avatar-thumb-url"]; $.userNameLabel.text = Alloy.Globals.getFormattedName(data.otherUser.attributes["first-name"], data.otherUser

Cookie corruption with multiple createHTTPClient Titanium calls

女生的网名这么多〃 提交于 2019-12-25 06:26:04
问题 While creating an Android app in Appcelerator's Titanium that involves both webView and background calls, I ran into a problem / bug where the cookies were getting corrupted on multiple createHTTPClient calls. Cookies were originally obtained from the webView: var webview = Ti.UI.createWebView(); webview.url = 'http://www.example.com'; window.add(webview); webview.addEventListener('load', function(e) { cookies = e.source.evalJS("document.cookie"); Titanium.App.Properties.setString('cookies'

Appcelerator : iOS 10 Apple Push Service not working

北慕城南 提交于 2019-12-25 04:10:10
问题 I'm working with SDK 5.5.1 I'm trying to send APS in production with my own nodejs server. Everything is working fine with publishing on device in development state. I get the device token and the notification is received by the device. In production, with the same certificate exports (with the production cert and p12), i can get the device token, but not receive the notification. Does anyone have a solution ? Here is my tiapp.xml <?xml version="1.0" encoding="UTF-8"?> <ti:app xmlns:ti="http:

Disable autoscroll top on insertRowBefore in a TableView in Appcelerator/Titanium

梦想的初衷 提交于 2019-12-25 02:26:36
问题 i'm currently using a TableView to display some elements in Appcelerator/Titanium. The problem that i have is that when i make a pull to refresh and i call the method " insertRowBefore " to insert new elements at the beginning of the table using the method like following: $.table.insertRowBefore(0,row); The table auto scrolls to top, and it looks a little bit bad when there're a lot rows to insert, i want to keep the current position. Any ideas? 回答1: I have had the same problem it looks very

Android window - view animation

瘦欲@ 提交于 2019-12-25 01:47:22
问题 Hello I'm new to titanium studio I'm reading the docs 2 days now and trying to make a simple slide animation or even any animation of any kind except opening a modal window. but I can't make it work.Here is what I was trying now but fails: var slide_it_left = Titanium.UI.createAnimation(); slide_it_left.left = 500; slide_it_left.duration = 500; var mainWinOpts = { backgroundColor:'#fff', fullscreen:true, navBarHidden: true } var animWinOpts = { navBarHidden: true, backgroundColor:'#000', top

titanium InAppBilling queryInventory return error code -1003 (InAppBilling.IAB_RESULT_VERIFICATION_FAILED)

僤鯓⒐⒋嵵緔 提交于 2019-12-25 01:22:27
问题 I'm using ti.inappbilling module for in-app billing on Android. I use titanium sdk 5.1.2 But when I call it's always returning an error: var InAppBilling = require("ti.inappbilling"); InAppBilling.queryInventory({}); InAppBilling.addEventListener('queryinventorycomplete', function(e) { if (e.success) { purchase = e.inventory.getPurchase(productID); }else{ Ti.API.error('queryinventorycomplete: ' + e.responseCode + " - " + responseString(e.responseCode)); } }); queryinventorycomplete: -1003 -