titanium

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'

How to create pdf file of the webview content in titanium

吃可爱长大的小学妹 提交于 2019-12-25 05:25:17
问题 I am new to Titanium. I have a webview . The content of the webview can be a pdf file, or a url . I want to save the webview content as a pdf file. I have created webview using the below code: var webViews = Ti.UI.createWebView({ left : 0, top : 0, right : 0, bottom : 0, url : 'http://www.appcelerator.com' }); Please anyone help me out... 回答1: You cant directly convert the webview data in pdf but you have to first parse html and then use the js pdf to create the pdf.Here is the code with

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

Titanium button not changing background color when selected

て烟熏妆下的殇ゞ 提交于 2019-12-25 02:21:17
问题 I have a newbie question: A simple button I've created in Titanium for iPhone refuses to change colors when clicked. Originally I used a button for this function; since it didn't work, I changed to a View, but neither works. Here it how it is set up: var quifButton = Ti.UI.createView({ // tried this with createButton, as well top: 44, left: 5, width: 310, height: 42, backgroundColor: '#333', backgroundSelectedColor: '#fff', backgroundFocusedColor: '#fff', touchEnabled: true, borderColor: BOR

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

Image uploaded to Facebook but not shown on page

旧城冷巷雨未停 提交于 2019-12-25 01:18:37
问题 I am trying to upload an image to a specific album on Facebook page through Graph api call from ipad app. Everything is working correctly and the response from Facebook returns success with the id of post but I just can't see the image uploaded on the page. I am doing this using Appcelerator Titanium. Following is my code: var fb = require('facebook'); fb.appid = 'MY APP ID'; fb.permissions = ['read_stream']; function postImageToFb(){ fb.reauthorize(['publish_actions','manage_pages'], 'me',

How to reload the tab in tab group in titanium alloy

人盡茶涼 提交于 2019-12-25 01:15:16
问题 I have three tabs in my tab group. One tab is for change language. If user changes the language I should need to change the selected language for all the tabs. my tab group code is as follows, <Alloy> <TabGroup id="myTabGrp"> //Tabgroup Added <Tab id="one"> <Window class="container"> <Label>This is the Home View</Label> </Window> </Tab> <Tab id="two"> <Window class="container" id="winTwo"> <Label>This is the second View</Label> </Window> </Tab> <Tab id="three"> <Window class="container">

After Refresh dont append the same data

可紊 提交于 2019-12-25 00:48:44
问题 im using for first time appcelerator for a Iphone app, im using a TableViewRow, when the window load all is fine, but if i want to refresh the window, the TableViewRow repeat the same data every time that i push refresh, so, i have 5 Categories, after refresh im having the same Categories repeting every time that im trying to refresh. Ti.UI.backgroundColor = '#dddddd'; var url = "http://remoteJSON.js"; var win = Titanium.UI.currentWindow; var table = Titanium.UI.createTableView(); var

Appcelerator/ Titanium: Cannot send push notification to Android

折月煮酒 提交于 2019-12-25 00:04:04
问题 I want to be able to send push notifications using Titanium and Arrow Push on Android. I have followed the instructions here: Configuring Push Services Subscribing to push notifications Modules.CloudPush My simple code looks as follows: var CloudPush = require('ti.cloudpush'); var deviceToken = null; // Works fine CloudPush.retrieveDeviceToken({ success: function () { deviceToken = e.deviceToken; alert('deviceToken: ' + deviceToken); subscribeToChannel(); }, error: function () { alert('Failed