Community Questions & Answers
ListView with auto height row
Hi, I can't figure out how to set the row height of new ListView to 'auto'. Due to dynamic content, I can not set a fix height. I have tried it with 'auto', Ti.UI.SIZE and Ti.UI.FILL as item property but nothing works. Even if I wrap an auto-sized view...
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...
\n not working, get real height of 'auto'
I'm developing for blackberry and am using a very old sdk which is 1.7.0. The problem I'm facing now is that I have a label and two string thatI want to display. The second string will be a new line below the first. I've tried suing '\n' but it does;t...
Scrollview auto scroll
Just curious is it possible to make the scrollview auto scroll every couple seconds? Also once it gets to the end to return to the 1st view.
Webview: Auto height doesn't work
Hello I have a webview in my app with above that webview a label and an imageview. I made a mainView to hold the label, imageview and webview. Now when I put the webviews height on auto, i can't scroll (well i can scroll a little piece down, but it goes...
ScrollView issues Ti 2: ImageView inside a scrollView
Using titanium 2 intensively last days, one of the most breaking changes in iOS I've found is the new scrollview behavior CASE 1 - ImageView inside a ScrollView ------- (please note that `auto` is still valid in `contentWidth` and `contentHeight`...
Auto height images in scrollview - too much spacing between vertical layout images android
Hello, I have a little problem with images on android. On iphone everything works great. I have several large images that I want to display in a menu in a scrollview. See the image for clarification. Layout is vertical for both columns. [image of the...
Images shifting with auto height or width
Ok, the whole url: to image: deprecation really screwed me over and I can't get back on track. So, I've got an image I want to display in the top left corner (top: 10, left: 10). I've got it at set width and I want it to calculate the height automatically...
Scrollview contentwidth 'auto' in android not working
Application type : mobile Titanium SDK : 2.1.3.GA Platform : Android 2.2 OS : Mac OS X Hello, I'm trying to create an horizontal scrollview with an variable number of views in it. On iOS this works fine, but on Android it only shows the first three...
Label.toImage().width or height processing time
I am using toImage() to get the width or height of an auto sized label or component. I am using this repeatedly for like 50 labels in one screen to have a nice formated chat messages window ( kind of like the whatsapp window or viber when you are chatting...
Auto size vs Ti.UI.FILL Ti.UI.SIZE in SDK 2.0
I simply don't get it ... I have a simple task that I want to migrate, I have a label that loads a text.. it has a fixed width and should display ALL the text and autosize the label with wordwrap What is does now, it show maximum 2 rows and shows the...
Set file registrations on iphone?
Hi This is my scenario: When someone receives an email with an attachment of certain file extensions (e.g. CSV), and opens the attachment, I need iphone to automatically open my app and imports the file into the app. I think it can be done as I have...
TextFields... How to display properly?
If I use a set height on textfields I can use "top" to position them. However, they look horrible on different devices with different resolutions. I prefer to use "auto" for height. However, then "top" is not accurate for...
Creating imageview with auto width and height?
I've created an image view with `Ti.UI.createImageView()` and i'm loading an image in it. I want the image view to scale to the size of the image. But how do i do this? I've tried the following, but that doesn't work: ~~~ var logo =...
BUG: Asking for height of 'auto'-sized label causes crash
I mentioned this in a previous post, and had high hopes that it would be fixed in 1.4, but it has not yet been fixed in 1.4 RC. In the following code, the last line will cause an iPhone app to crash: ~~~ var label1 = Titanium.UI.createLabel({ ...
Grouped TableView 'auto' width + scrolling = problems
Whenever I have a grouped TableView with enough content that it requires scrolling, I run into problems with the padding of the rows changing as they're scrolled in and out of view. The following image highlights the problem (notice the alignment of the...
View inside another view with auto-width for tags representation
Hi, I want to make a list of tags like the one in [this shot](http://img809.imageshack.us/img809/7186/populartags.png) from the Q&A web from Titanium. Using following code: ~~~ var tagsView = Ti.UI.createView({ layout: 'horizontal', touchEnabled:...
[WARN] [object TiUIView] has an auto width value of 0
Hello, I adapted my code to sdk 2.0, in all views I have replaced the "auto" height/width attribute width Ti.UI.FILL or Ti.UI.SIZE depending of my needs. When I run my app I'm receiving several WARNINGS like this `[WARN] [object TiUIView] has an...
Get warning line
Hello, with transition to SDK 2.0 we are all getting tons of warnings about width and height auto sizing of views, labels ecc.. ~~~ .... [WARN] [object TiUILabel] has an auto height value of 0, meaning this view may not be visible. [WARN] [object...
Height auto rendering as height 100% on ios
Since I recently upgraded to xcode 4.2 i've had rendering issues on iOS. Setting height to 'auto' results in the element filling the parent - equivalent to setting height to 100%. In the example below, i'd expect the element 'item' to be 40 units high -...
How to determine adequate text field height?
Hi experts,, When I set the height of textfield as 'auto', most android system gets adequate size. Most 480x800 system looks nice, and 600x1024 system looks OK. But, in Galaxy Note with 800x1280 system, the textfield shows only the lower half of the...
Big problem with Titanium 2.1.0: What are the differences using height 'auto' in version 2.1.0?
I'am just using the stable 2.1.0 of Titanium. After recompiling my current 1.8.2 project in 2.1.0 the layout of the whole app is scrambled up! It seems that there is a major difference/problem in Titanium 2.1.0 when views are used with height 'auto'....
How to calculate size of a label without adding it to a view?
In Titanium SDK before 2.0 the following snippet worked like a charm on iOS Apps: var label = Titanium.UI.createLabel({ text: 'Sample Text', width: 'auto' }); alert(label.width); // shows the pixel width of the label With the...
Auto height webview does not work as it should
Hello, i'm struggling with setting the height of a webview. I want this webview to have an auto height, but it does not seem to work. On IOS it sometimes appears right. On Android it does a whole other thing, when the webview is loaded, it totally...
Label padding
Hi guys I have a label with width: 'auto', height: 'auto', top: 10, left: 10, right: 10, bottom: 10 inside a table view with height: 'auto'. this has the desired effect of having a padding around the label however, for some text lengths the top and bottom...
Titanium.UI.TableView row height problem
I have the following code: ~~~ var win = Titanium.UI.currentWindow; var tableRow = Titanium.UI.createTableViewRow({ }); var textArea = Titanium.UI.createTextArea({ value: ' ' + win.content, font: {fontSize: 12}, editable:...
Label padding sometimes incorrect using height 'auto'
I'am trying to create a label with a padding around it, assigned to a view. Well, most times the padding is rendered correctly. But in case the label text is a bit too long - causing a new line break - the 'auto' height of the label seems to be calculated...
Get height of Label
If I try to get the height of a label, which has no particular height definition, I get the values 0 or 'auto'. It doesn't matter if the height is unset or set to 'auto'. However this problem only apears on Android devices or the Android simulator, it...
auto height into another auto height view
Hello, I have a view with `height:'auto'`, containing other views, images and text, and the height increases and decreases correctly based on the content. This view in container into another main view with `height:'auto'` but this view is not resizing if...
Ti Studio - code completion not working for Ti SDK
Hello, if I type ~~~ var but2 = Titanium.UI.c ~~~ and hit control-space, the Titanium API proposals don't show up (like 'create2Dmatrix etc). Only the JavaScript stuff (e.g. constructor) are there. This is one of my Macs, on the other everything is...
Issues with vertical-layout and width/height
Hello everyone, i have some problems width the width- / height-attributes on a layout: 'vertical' window on iphone. I'm using Titanium SDK 1.4.1.1. if i use the following code: ~~~ var win = Titanium.UI.createWindow({ backgroundColor:'yellow', ...
A 'auto' height webview in an 'auto' height tableviewrow
I am trying to build a TableView that has 3 rows: a title row (with a label); an image row; and a row with text in it. Now, that has all proved do-able apart from the fact that the text needs to be rich text and the only way to do this is with a WebView...
how to find window height when its child element's height is auto
Hi, In my app, I have a window which has two views and both the views have their height as auto. Is it possible to find the height of the window in this case? If so, how? There were many questions asked related to this, but none seem to have the...
Picker as keyboard with a tableview
Building on Dan Tamas' guide to using a slide up picker like a keyboard: http://cssgallery.info/making-a-combo-box-in-titanium-appcelerator-code-and-video I had the need to do something similar with a tableview similar to the way the calendar app handles...
auto scroll label
Hi, I don't know if there is a name for this in english: i'd like to have a label on one line; and if the text is too large, then the text scroll by itself....do you see what i mean? I thought the ellipsize property will help me..but no :( Here is my...
Auto height problem with a WebView in a iPad
Hi, I have to display a WebView to display an html text in a tableview. I Use this code : ~~~ var new_summary = "<p>Imprimante photo domestique compacte et abordable, produisant des impressions de qualité professionnelle...
Scrollview auto height doesn't work. (Bug?)
Hello I have a scrollable view with in there another view. In that other view i ordened my page with multiple other views. Now my scrollable view won't scroll unless i put a static height. The 'auto' doesn't work. Is this a bug? or am i doing something...
Auto scrolling in TableView Scrolling too far
I have a tableview with sections with custom headers. My table also has several rows in it. The TableViewRows have text fields in them. If I'm in landscape mode and one of those textfields gain focus, the table tries to auto scroll so that the textfield is...
Android label height
Does someone knows why it doesn't work in Android to use the "auto" value for the height of a label? I was using that to measure the position of the next item, as the text was dynamic. Is there any other option to achieve this?
Solution: 1.5.0 and TableViewRow height
If you are facing the problem that height : "auto" doesn't work for TableViewRows since you updated Titanium SDK to 1.5.0, you might want to try the following: 1. create the row without height attribute 2. set the classname for the row using...
***Bug*** Label 'Auto' Width Broken in 1.4.2
simple code causes the app to crash (tested on ipad simulator) --- Ti.UI.createLabel({ ID:1, text:'hi', font:{fontSize:14,fontWeight:'bold',fontFamily:'Helvetica Neue'}, color:'#ffffff', width:'auto', height: 25, left:2 }); ---
***Bug*** Label 'Auto' Height Broken in 1.4.2
This is the code being used( with the text being dynamically updated and changed ) ~~~ var labelHere = Ti.UI.createLabel({ color:'#808080', font:{fontSize:18,fontWeight:'bold',...
Any way to determine the actual height of a Label or ImageView
If I am creating a label where i do not know the length and set height to 'auto'. Is there any way to determine height of the object in the view after it has been added? The purpose is to be able to display a Title and then an image below the title. But...
Set view to phone width and height
I've made a simple view. Its just a box. Can I set the width and height to the phones width and height? I tried 'auto' but if I do that nothing shows up.
Padding on a view element
Is there a way to get padding (like CSS padding) on a view element? Say I want my view to be as long as my content, but it has a bgcolor. I don't want the text to hug the edges of the coloured box so I want to give it some padding. I need to use...
Table View Auto Height on iPad
Hi, if i copy the Table view Auto Height example (table_view_api_auto_height.js) from the kitchensink app to an iPad Project the textlabels inside the table rows do not render correct, in fact they renders to small as if the . After changing the...
Vertical Layouts
Hi, It's been fairly easy to understand and work with the Mobile API so far - good work. One problem I have now is vertical layouts. My basic layout is: - image of set height - text of variable height - text of variable height I've tried the...
createButton width: 'auto' broken on iPhone.
Looks like the Titanium.UI.CreateButton code is broken on iPhone if you set the width to 'auto' on 1.3.3. Seems to work ok on android though. ~~~ var button_AllItems = Titanium.UI.createButton({ top: 220, height: 35, width:...
How to vertically align labels
Is there a way to vertically align labels? I understand that you can use `height: 'auto'` to make the height auto adjust to the size of the label. This would great except that I need the height of the label to be a certain value. So I figure I have to...
TableViewRow height:'auto' ignores padding values.
Hi. There seems to be something wrong in the calculation of a tableview's row height when using an additional padding for a label (at least on android). It seems the padding (top and bottom values) is ignored when when using height:'auto'. Thus text gets...
Showing 1-50 of 55 1 2