titanium-mobile

Titanium Alloy ListView Nested Model Array of Tags

我怕爱的太早我们不能终老 提交于 2019-12-03 09:11:01
I am using Titanium Alloy version 3.2. I have a collection of posts in a listview. My data looks like this: [ { username: 'dude', imageUrl: 'url', tags: ['tag1','tag2','tag3'] }, { username: 'wheres', imageUrl: 'url', tags: ['tag1'] }, { username: 'my', imageUrl: 'url', tags: ['tag1','tag2','tag3','tag4'] }, { username: 'car', imageUrl: 'url', tags: ['tag1','tag2'] } ] And here is the xml. This works only for username and image. I can't figure out how to add the tags to each post. <ListView id="streamListview"> <Templates> <ItemTemplate name="template" id="template"> <View class="item

android:back (device back button) event in Titanium not working

江枫思渺然 提交于 2019-12-03 07:40:25
Hi i am working on android application development.I am using Titanium studio for development. I create a simple application.I want to capture the device back button event in my application because I don't want to user android default tabs in titanium.I am creating my own tabs.I tried following code : :list.js var expt = Titanium.UI.currentWindow; expt.addEventListener('android:back', function (e) { Ti.App.fireEvent('expt_back_event'); }); :app.js Ti.App.addEventListener('expt_back_event',function(e) { alert('hiiii in side event listener'); }); But its not working instead of giving pop-up it

Recreating this animation in Titanium SDK

徘徊边缘 提交于 2019-12-03 00:50:39
I was previously developing my application in Xcode but decided to move over to Titanium to allow for Android development. I'm still getting used to Titanium so I'm running into some problems when trying to rewrite my app. For instance: how would I go about recreating this animation in Titanium? Basically I have UIView that contains a MKMapVIew, a UITableview and a button that toggle between them. Any help is greatly appreciated! http://www.screenr.com/2kts Sagar B. You can use this code to flip window in ios and android both. Create two animation objects var anim_minimize = Titanium.UI

Easy to follow beginners tutorial for Titanium mobile/studio [closed]

爷,独闯天下 提交于 2019-12-02 16:33:47
I'm new to Titanium mobile as well as titanium studio, but have heard good things about it. Can anybody recommend some easy to follow tutorials for beginners? I am also new to Mac - and javascript,- so go easy on me :) Muhammad Zeeshan Here are few links you can follow: 1- Titanium Wiki 2- Seven days with Titanium 3- Titanium WareHouse 来源: https://stackoverflow.com/questions/9301405/easy-to-follow-beginners-tutorial-for-titanium-mobile-studio

Is a TiTouchImageView working in an alloy project? [UPDATE]

允我心安 提交于 2019-12-02 08:42:45
I am currently developing a titanium app for android and iOs including an imageView which should be scrollable and scalable (via a slider). I already get this to work on iOs but on Android it is really hard to achieve the scrolling behaviour. I decided to use the TiTouchImageView module but the documentation only shows how to use it in a non-Alloy project. My current code looks like this: if (Ti.Platform.osname == "android") { var TiTouchImageView = require('org.iotashan.TiTouchImageView'); var androidImageView = TiTouchImageView.createView({ top: 0, left: 0, zoom: originalScaleValue, maxZoom:

Cannot run an application in titanium

非 Y 不嫁゛ 提交于 2019-11-30 23:42:17
I am newbie on Titanium , I have installed Titanium on my windows based laptop. Also imported Kitchen Sink application it in studio. I have set all the path variables also latest Android SDK . Also i have changed Run Configuration log and all. But when i try to run an application it gives me an error. I am trying to run it on android emulator of Titanium studio . Titanium Command-Line Interface, CLI version 3.1.1, Titanium SDK version 3.1.1.GA Copyright (c) 2012-2013, Appcelerator, Inc. All Rights Reserved. [ERROR] : Unable to detect Android SDK targets. [ERROR] Application Installer abnormal

How to get the number of unread messages PubNub

断了今生、忘了曾经 提交于 2019-11-30 14:12:41
Hey i'm using pubnub Services to add chat functionality to my Titanium App but i'm wondering if there is a way to get the number of unread messages. there is no info about this on api references What i tried to save the numbers of messages in history then reloading new history and calculate the difference but it's so stupid and complex solution any body know how to achieve this ? Thanks Track Read/Unread Messages on PubNub Years back we promised we'd make it super easy method for tracking Unread Message Counts in your app. Now it is finally possible! Using PubNub Functions , you can add

How to check if array element exists or not in javascript?

不羁岁月 提交于 2019-11-30 06:13:08
问题 I am working with Titanium, my code looks like this: var currentData = new Array(); if(currentData[index]!==""||currentData[index]!==null||currentData[index]!=='null') { Ti.API.info("is exists " + currentData[index]); return true; } else { return false; } I am passing an index to the array currentData . I am still not able to detect a non-existing element using above code. 回答1: Use typeof arrayName[index] === 'undefined' i.e. if(typeof arrayName[index] === 'undefined') { // does not exist }

Titanium Mobile: cant navigate between pages

南笙酒味 提交于 2019-11-30 06:05:12
问题 i am new to Titanium and i am have 2 seemingly simple problems while trying to use it for the Android. 1) i am trying to navigate to the next page on click of a button. but instead it is showing me a blank black screen. i know my second page CreateNewMeetup.js is correct because i tried displaying it as the landing page of my app and it works. my codes are as follows:- ApplicationWindow.js ... var button = Ti.UI.createButton({ height:44, width:'auto', title:'Create New Meetup', top:20 });

How to get the number of unread messages PubNub

拥有回忆 提交于 2019-11-29 20:19:59
问题 Hey i'm using pubnub Services to add chat functionality to my Titanium App but i'm wondering if there is a way to get the number of unread messages. there is no info about this on api references What i tried to save the numbers of messages in history then reloading new history and calculate the difference but it's so stupid and complex solution any body know how to achieve this ? Thanks 回答1: Track Read/Unread Messages on PubNub Years back we promised we'd make it super easy method for