Community Questions & Answers
Android - Change position of Heavyweight Window
Hi everyone, I was wondering if it is possible to change the position, actually I want to change the "left" position, of a heavyweight window? My current code looks this way: ~~~ var win = Ti.UI.createWindow({ title:...
create interface
hi everybody can you help me i want to create an interface with linear icons wich every icon will display some data i don't know how and what to use for that : button ,view ,image view ... i'm really confused some idea please or indication
Mockup or wireframes tool for iPad app designing
Can anyone suggest link or tools for the mentioned subject?
Can't hide navBar on Window, please help.
I have a Window that's part of a TabGroup. When I target the window using Titanium.UI.currentWindow and try to change the navBarHidden property to true it doesn't work. I've tried using all of the following: ~~~ myWindow.navBarHidden =...
How to hide Keyboard
Hi, I'm new to Titanium and i'm tryin to create a calculator app for my own use. The problem is, that none of the default apple keyboards have the buttons i need, so i'm trying to make a custom keyboard layout with single buttons. My Question is now, how...
How to just put two buttons in window with Alloy?
~~~ <Alloy> <Window class="container"> <Button id="button1" onClick="startA">Start A</Button> <Button id="button2" onClick="startB">Start bla bla...
CSS HTML Auto-content formating
I'm developing an app where I'm unsing a HTML file. In this file the HTML tag is not properly fitted and so the text is way to big.I can scroll way to much down my mobile phone. I tried to solve the problem with the following...
Cant set elements on vertical layout with alloy
I've been trying for hours now. I can't understand what I'm doing wrong. I'm trying to put 3 elements vertically aligned and nothing i change seems to affect the view. i've tried to add a view then table view, then tableViewRows, then set layouts vertical...
How to hide Keyboard
Hi, I'm new to Titanium and i'm tryin to create a calculator app for my own use. the problem is, that none of the default apple keyboards have the buttons i need, so i'm trying to make a custom keyboard layout with buttons. My Question is now, how can i...
Alloy horizontal layout with fixed width for the rightmost column
Hi, I want to create a three column horizontal layout with Alloy. The first column has dynamic width 30%, the second column will fill the center area, and the third column is a fixed width column (for toolbar). I try something like the code below....
horizontal layout with vertical ones ?!
hi, i want to make horizontal layout in a vertical one, i had idea to using views on vertical in windows on horizontal but it didn't work, any help ... ! here is what i tried to do : exampl.xml ~~~ <Alloy> <Window class="container"...
Create List/Tableview
I'm new to Titanium and am just wondering what the best way would be to achieve something like this:  I tried a function something like this, however I would want to have the text overlay the row backgrounds....
Alloy: How to position variable size elements?
The basics: - **Platform:** iOS (iPad only) - **Device:** iOS Simulator - **Titanium Studio:** 3.1.1.201304151136 - **Titanium SDK:** 3.1.0GA - **Alloy:** 1.0.0 I've got a view in the application I'm developing that has the following UI structure: -...
rightNavButton - Horizontal Layout not working
I'm using the code below to try and set a View as the rightNavButton for a Window. The view does appear, but not as I'd expect. What I'd like to do is have the view's layout set to horizontal so it works if there is 1 button, 2 buttons, etc. and they can...
Design Advice
It seems like I have been struggling for a couple years now to create anything beyond a basic app. I just cannot get the design concepts. When I started learning HTML 15 years ago I just did a view source. No such luck with phone apps. No reverse...
How to underline labels?
Hi All, I was wondering what is the best way to underline a Label created by Titanium.UI.createLabel() Thanks, Ajay
composing views in vertical layout
I Need to create this sample using a main vertical layout, but I can't put the blue view at the bottom of the mainview. Please, help :) ~~~ win = Ti.UI.createWindow(); mainview = Ti.UI.createView({ width : "80%", height :...
Android stylesheets
Hi. How can i make different stylesheets for different android screen sizes? I dont want it to be only for differnt resolution screens i need it to be for differnt screen sizes. I have a win/view with A LOT of labels, text firelds and buttons that needs...
Layout centered, how to
I'm a little confused about how to make this windows design. Can you help me? thanks 
Problems with TableView Layout (drawing error and slow scrolling)
Hi there, for some reason I'm experiencing some problems with an Alloy TableView that I use to display someones FB friends. In particular the scrolling becomes horribly slow as soon as there are more then ~75 rows. Furthermore there seems to be some kind...
Prevent label reposition y a tableviewrow
Hi people, I've this visual problem. The code I use is ~~~ row= Ti.UI.createTableViewRow(); view= Ti.UI.createView({layout:'horizontal'}); button= Ti.UI.createButton({image:'/iconos/info.png'}); label= Ti.UI.createLabel({text:<some...
Android fontSize different layout
Hi. I need to use different fontSize for Android device. Is it possible in Titanium ? How can I set this value ? In Java-Android app I can set values <dimen> or <string> in different "res" folder. In Titanium ?
Improve rendering speed of complex views
I have an app where views (plain views, image view, labels etc) are added in about 6-7 levels of views and child views. On some levels I need to know the absolute size of the parent view, which is not available until postlayout event. The problem is that...
How to force a re-layout of an Alloy based screen
I am using Titanium 3.02 and Alloy 1.0 to create an iOS app. Most of the app is in portrait orientation but I have one window that is in landscape. When I open the landscape window everything works as expected but when i close the landscape window to...
pinterest layout in Ti
Greeting Guys, May I know how can I implement like pinterest layout in Ti? Any suggestion? Thanks!
Error when using TableView in vertical layout
Please see the example below, the table shows only 9 elements(instead of 10 items added). Any ideas why? ~~~ var win = Ti.UI.currentWindow; win.backgroundColor = '#fff'; win.layout='vertical'; var lbl1 = Titanium.UI.createLabel( { color: '#000', ...
Layout in android and iOS
Hi, I have developed an application for iOS. I have set the top and left manually. Because of this, my app contents are not properly aligned in android. Is it possible to use the screen width and align the contents relative to the screen size, so that the...
Settting divider height to 0
Hi, I am trying to make two textfields that are joined.Some thing like this http://imageshack.us/photo/my-images/40/screenshot20120726at913.png/ One way of doing this is by adding two textfields to two different rows in the TableView and then setting...
Forcing a button to the bottom of the screen in Android
Hi I'm trying to position a screen element so that it is always at the bottom of the screen. On the face of it, "bottom=0" would do the trick, but it seems that when using layout=vertical, the bottom=0 thing is always ignored. I'm quite keen...
Ti.UI.SIZE doing a FILL on android
I have a view with a width set to Ti.UI.SIZE and it appears to be filling the whole screen. It is working fine on iOS, but not android. My code is as follows: ~~~ var tray =...
Alloy dynamic View creation from XML
The Alloy Documentation says that following code ~~~ <Alloy> <Window class="container"> <Label id="label" onClick="doClick">Hello, World</Label> </Window> </Alloy> ~~~ will be...
Getting force close in landscape mode by pressing a button
I have an application which shows a list of items in runtime,and by pressing a button the user can delete the checked item,in the portrait mode all the things work well but when I switch to landscape mode when the number of rows are more than 3 ,pressing...
Consistent Cross Platform UI
I know this has been answered somewhere but in two days of searching off and on and rewatching the training videos I still cannot figure it out. Basically I want my application to look basically the same on iOS and Android at all resolutions. By the same...
Alloy: layout system for different screen sizes
Hi Tony! I have completed a portion of my new project and running well in iPhone. Then I tried to run in android devices, and noticed that everything fits exactly the way that I lay out views according to iPhone's screen size, despite its a smaller...
Fill the remaining space of a parent
Hi there! I have a parent view (with horizontal layout) and 2 child views: one has specified with and I expect another one to fill the remaining space of it's parent. Is there an easy way to achieve that? If I try to set `width: Ti.UI.FILL` to the second...
Get TableView's height
I have a complex window with several views in it. I want to scroll the full page with all the views at once. I have a ScrollView attached to the Window, and a View with auto height in it. In this View are the other two Views and a TableView. I have exact...
Bar with left aligned text |right aligned buttons
I try to create a Bar with a left aligned label and right aligned buttons. If possible, this should work if you add an explicit width (eg. 300 or '100%') or you add an implicit width (with left:10 / right:10) ~~~ | ...
Cache Layout
Is there anyway to cache layout in Titanium Appcelerator?
zIndex effect vertical positioning on Android
I have a vertical layout view which works correctly on iOS. However on Android, the elements that have higer zIndex values are placed at the bottom of the lower zIndex elements, rather than below. What i am trying to do is to place the element at the...
Absolute position with layout vertical
Hi all, i have a layout with some buttons. --- var self = Ti.UI.createView({ backgroundImage : "/assets/background_verlauf.png", layout : "vertical" }); --- and I also have a toolbar on the bottom. How can a absolute position it...
Populating object property names using function arguments
Hi I'm a Titanium noob and having trouble creating a factory function for creating borders. What I want to do is something like the following: ~~~ var Hr = function($color, $pos) { var hr = Titanium.UI.createView({ color: $color, $pos: 0, ...
createScrollView with layout:'vertical' still scrolls horizontally
Hi, I am trying to use the following code to create a rounded box with a textField in it. When the text field is focused, I'd like the window to scroll up so the input field is visible - but not to scroll horizontally to center the input. I thought I...
dock toolbar to bottom in vertical layout
I have a view with a layout of `vertical` ~~~~ var tray = Ti.UI.createView({ width:deviceWidth * 0.9, height:'100%', top:0, left:0, backgroundColor:'transparent', layout:'vertical' }); win.add(tray); ~~~~ Inside `tray` I have a...
Layout messedup when phone returns from screenlock
If the phone goes on the lockscreen and returns on again, the navbar will be shown for a split second and will disappear. Which is normal behavior. In win1 it works fine. My layout has been built 'under' the navbar so when it disappears, everything looks...
Centering imageviews on scrollview with layout:horizontal
I am using the code below and cannot figure out how to align the images in the center of the screen. Does it have to do with layout: horizontal? ~~~ var winThumbs = Ti.UI.currentWindow; var scrollView = Titanium.UI.createScrollView({ }); var myView...
How to 'refresh' the layout after pressing a button?
I got 4 views with labels in it. Those views have a addEventlistener ~~~ tableTextAnswersContainer.addEventListener('click',function(e){ for (var iiiii=0;iiiii<ak;iiiii++){ if(e.source.index ==...
TableViewRow Layout
Titanium Studio 3.0.1.201212181159 (SDK 3.0.0GA) Iphone Emulator Would like to have a tableviewrow with the following layout (This is what a single row looks like) ~~~ -------------------------------------------------------------------------------- | ...
Finding absolute screen coordinates of a View
Hi, I have a view on a tablerow that is clickable. When I click it I like to start an animation from that view growing into a popup. For this I need to know exactly the top,left coodinates of the view as well as the size. The latter is fine, while I have...
How to emulate android horizontal layout behaviour in iPhone when using labels and images combined.
Hi there, Android works like a web browser. You add words and images in the same line and everything works as expected. Words that don't fit in a line go to the next one, too big words are cut and continued in the next line, images appear between correct...
Add a view in the middle of other views (vertical layout)
Say I have a view with layout set to "vertical", and a bunch of child-views in it, and now I want to add a new view in the middle of them all, is there something like view.addAtIndex() ?? Example: ~~~ var myView = Ti.UI.createView({ layout :...