Community Questions & Answers
Access controls generated inside of a custom event listener
Hi, My first time here so be gentle :D Basically i have this piece of code here: ~~~ exports.httpTest2 = function(file) { var xhr = Ti.Network.createHTTPClient(); xhr.onload = function() { Ti.App.fireEvent("generateControls",...
Dynamically Reset the date Picker in Android
having the date picker instance with the default date picker value as current date. Need to reset date of the same date picker in some other button event dynamically . How to achieve this ?. picker = Ti.UI.createPicker({ type :...
Simplest thing just wont work
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TYPE: Mobile PLATFORM: IOS DEVICE: Simulator HOST: OSX...
Creating buttons dynamically based on the length array
Hi, can anybody help me with this requirement. I have a view. Inside that i'm placing buttons with the title as a numbers(1,2,3....). These buttons should display dynamically depending upon the length array. Here i'm using an array(e.g the length is...
Create/Remove labels dynamically
So, I have like a search engine that returns answers to a word or words that are searched. This answer comes as json and has dynamic length. I want to create as much labels as answers I have. E.g.: I search house, I get three answers, I create three...
Add elements to window inside a function
Mobile, Android, Titanium Studio, build: 2.0.1, Windows 7 64x So, I'm trying to add some elements to my window, dynamically. I have a query, and the answer of that query will come in rows. I want to be created as much labels as rows I recieve. I have...
dynamically grow scrollView (for feature: very long A-Z index view)
Hi all! Is there any way to dynamically add space to the **TOP** of a scrollView? Unfortunately, if I increase the contentHeight the space usually will always be added to the bottom. If not - is there any way to move the focus of a scrollView...
How to create a dynamically scrolling table ?
I am using this following code from Kitchensink example to make a table which fetch data automatically when scrolled to bottom in Android ~~~ var win = Ti.UI.createWindow({ backgroundColor:"#efefef" }); var data = []; var lastRow = 10; for...
Best way to create and destroy dynamically created objects in a detailview on a splitpanel
I am dynamically creating buttons textfields and other UI components from JSON sent by our server, to a detailview in a split window for an iPad application. What is the best practice way to destroy these dynamically created UI components? When ever I...
Howto prevent leaks when adding / removing views permanently
Hi, in my current app i permanently add and remove views to a window. Unfortunately this produces memory leaks in XCode / instruments. The concept is the following: - 1 main window - this window has a "current_view" and a "last_view"...
periodically filling of tableview
Hi, I try to fill a tableview dynamic: ~~~ velo.ui.createTableView = function() { tv = Ti.UI.createTableView(); setInterval(function(){ // here I am get from process the data as array // like [{title:'A'},{title:'B'}] },10000); ...
Change a class dynamically
Hi, Do you know if it's possible to change dynamically the classes associated to a TabViewRow (or any other kind of view)? I have tried : ~~~ row = Ti.UI.createTableViewRow({ classNames: ['class1', 'class2'] }); row.classNames = ['class3',...
Dynamically change font size, etc.
Okay I am sure this is simple but for the life of me I cannot figure out how to change the font dynamically like I would change the text: ~~~ label.text = 'new words'; ~~~ But how would you do that with the font size? ~~~ label.font=...
App crash with 20+ ImageViews in ScrollableView
Does anyone know how to dynamically add and remove multiple ImageViews in a ScrollableView? If I have more than 20 ImageViews in the scrollableView of my app, it crashes.
Dynamically populate a ScrollView
Hey there. I created some popovers with ScrollViews in them. These work but instead of populating the scrollview with images by hand, I want to populate it dynamically by getting the images out of an array and place them next to each other in the...
imageView width and height
Hello, I'm loading differently sized images from a local source on the device into the url of an imageView. Is there a way to find out what the actual dimension of the image is? I would like to center the image but in order to do so, I would need to know...
Showing 1-16 of 16