Community Questions & Answers
Label Text not wrapping 3.1
Hello: I've a problem with the text wrapping inside a label on Android. This code works fine in the v 3.0.2. ~~~ var labelDir = Ti.UI.createLabel({ top: '1%', left : '13%', right : '10%', height: '50%', color :...
Text value input prompt dialog
How can I create a dialog that asks the user for text input? So like an alert dialog with a label, a text box, and an "OK" and "Cancel" button? This is for an iOS app. I've seen it used in other apps before, as well as the native OS,...
Text position inside TextField - Android cut off - iOS no left border
I have a TextField with rounded borders and a prefiled text. On Android the text (and the input text) is cut off and on iOS the text has no left border: http://img72.imageshack.us/img72/6462/imagegkx.jpg (left iOS, right Android) my code: ~~~ var...
Use of LeftPadding in textField
hello i want to know how to use leftPadding and right padding in textfield, it would be good if anyone help ... thanks
adding long text to label in multiple line
Hi, I want to put a long text in label. Its about 15 lines. So what is the procedure to add this text to label in multiple line. ~~~ var label1 = Titanium.UI.createLabel({ top:100, color:'black', text:"adfafds fdskjfk dsfjklsdjfkldsjfkl kdjf...
How to change the font color int he title bar
How do you change the font color in the title bar? I'm using a light color for the barColor attribute, making the white text hard to read. Any ideas besides changing the barColor?
Embossed / LetterPressed effect on texts
Is there a way to create effects like this ones using shadows of something different? [http://acrisdesign.com/2010/03/letterpress-text-effect-using-photoshop-and-css/](http://acrisdesign.com/2010/03/letterpress-text-effect-using-photoshop-and-css/)
CSS problem in webview.
I have a problem with padding a text in a webview. The padding-right doesn't seem to work. Please see the code for the webview. Using SDK 3.0.0.GA on IOS 6.1. ~~~ var desc = ui.web({ html: "<html><head><meta name = 'viewport'...
Text aligment within the Label
is it possible to justify text to the left-right sides - sililar for example like in CSS: **text-align:justify** ?
Text Align Justify
Is Text align (justify) supported in Titanium? If not, what is the reason why justifying is not supported? I am using Titanium to develop an application for enterprise and the UI looks not so professional with only left, right, center alignments. Any...
inner shadow text effect on lable
Hi Experts, Does anyone have an idea about how to create inner shadow text effect on label using shadowoffset and shadowcolor property? What type of color we use and what is an offset value to create a nice perfect innershadow effect. Example of this...
Fetch scaledDensity on Android
Is there any way to fetch the [scaledDensity](http://developer.android.com/reference/android/util/DisplayMetrics.html#scaledDensity) value on Android devices from Titanium? I'm trying to create a pixelRatio that will scale text appropriately on all...
Some questions about styling labels
Hi guys, I have some question concerning styling labels. For instance, I have some text in my database file which is fetched and placed into a label. - Is it in any way possible to add a 'bold' or 'italic' style to a specific word inside my label? - Is...
Aligning multiple lines of text in a Label
Hi guys, I'm having some trouble aligning 2 lines of text in a Label: ~~~ introLabel = Ti.UI.createLabel({ textAlign: 'TEXT_ALIGNMENT_CENTER', //center: {x: '50%'}, width:'auto', height: 'auto', font: {fontSize: 25}, color: 'black', text:...
SQLite Sanitize input for possible exploit?
Hi, I was making an app which using SQLite for storing information from text fields and i want to ask if it is possible someone evil user to put "evil text" in these text fields in order to exploit the phone's database or possibly the app...
Compare string or search a char in a string
i scan a barcode then i want to specifiy, its a number , text or a website adress and if this is a website for example i want to open a webview or safari. Can ? achieve this?? Can i compare string and a char ?? sorry for my english..
Display resultset (text) within a label, multiline
I´m actually trying to fetch some data from the underlying sqlite database on iPhone platform. This does work pretty well, indeed. This works for simple text only. Multiline (with \n and \r) does not. Does someone know how to solve this, how to make...
Text takes ages to load
I have a simple label on screen that is incremented when the user presses a button. The number on the label takes ages to update if it is displaying a number that has not been displayed before, however if it is changing to a number that has been displayed...
TextAreas not rendering properly within a ScrollableView
I have an iPad application that contains a number of "pages" within a ScrollableView. Into each view of the ScrollableView I put a TextField, ImageView and TextArea for the user to enter data into - kind of like a basic book. My problem is that...
Only display x amount of Characters
Hi all I have a problem I have a json that returns this >> 2012-10-29T09:13:11.49 but all i want it to display is 2012-10-29 how can I only display the first 10 Characters of the string ?
Titanium + 3rd party open-source iOS library
Hi, I found a third party open-source iOS library called OpenEars that does text to speach on the iPhone. It is designed to work with xcode and objective-c. I was wondering if there is any way that I can make a Titanium app that uses that capability. Thanks
Bold text in a label
is really crazy that I can not differentiate the text that I write from normal to bold .. and that to do so is to create a label in webview for every word that I want to differentiate. Can not be solved in another way? Thanks!
Hide/Show Navigation Bar or Hide/Show Text on it
**Hi.!!** # # *I'm having trouble here with the Navigation Bar in the app. Want to either display text on the Navigation Bar or hide it totally (since it doesn't show any text on it). The code being used right now (as shown below), shows either text such...
Reading text messages from a specific number
Hi, I am planning to extend one of my apps and I am trying to work out what is possible. Basically I have a device which you send a text message and it will send one back with some information but currently you have to got to the messaging app and copy and...
customizing spinner style picker options on android
I'm using a picker on android with usespinner:true ~~~ var picker = Ti.UI.createPicker({ useSpinner: true, visibleItems: 9, selectionIndicator:true, type : Ti.UI.PICKER_TYPE_PLAIN, bottom: 0 height: 200, columns: [pickerColumn], className:...
Is there a way to make label/textField text auto size to to it's width?
Title says it all, but to be clear... I want to take a label and have the text be sized based on how wide the label is in order to make text fit within any size label. Is there a way to do this?
How to parse Text
Good morning community, my problem is that i can't parse my Text..following situation with an XML Snippet which is out of my control Here the XML Snippet : ~~~ <item> [129236] Description of the product </item> ~~~ Now i get the Line by...
epub reader - changing font / font sizes
Hi, Has any created or have any code samples of creating a book reader using Titanium. In short - I'd like to be able to read an epub file, then have settings so a user can change the font and/or font size for the pages. The pages would then be...
Get a nice list inside a label - How to do it?
Hey guys, I just finished my first real App with Titanium and it works really nicely but there is one point which just refuses to work / look pretty: I got several labels with text in them inside this app and in several of them there are lists with...
display text length while typing
titanium mobile sdk 2.1 iphone sdk 5.1 Hi, I created a Label and wanted to show the number of characters as the user types. I can't see any events like `keyup` or `onchange` so am kind of stuck for now. thanks for your help.
Text color when in Iphone emulator not working the same as in android emulator. Any suggestions?
So, I have code that works in android and not apple.... is that common? (i'm starting to think that is the case...) Here is what is going on... the text color is not showing up, but when i click a button it shows it underneath like it is being highlighted...
Activity Indicator Text
Hi there, The iPhone simulator seems to work fine, however there is no text present on my activity indicator as per the below: ~~~ var actInd = Titanium.UI.createActivityIndicator({ bottom:50, height:55, ...
strike through on label
Is there any way in titanium to strike through a label (text)? Thanks
Dividing block text
Hi! So I'm trying to layout text on a page to simulate line-height. I've managed to do this just fine vertically aligning the labels. But is anyone aware of a function that will take a block of text, and work out how much to fit on one line? Lets take an...
Problem with displaying downloaded data
Hello everyone, I made my application that get data form a the internet. But at the moment I need to 1) launch the program 2) refresh my data to let the application display everything. Otherwise every label.text will be displaying...
How do I clear a textfield on edit?
I want to clear my textfield on edit. code: var tal3 = Titanium.UI.createTextArea({ editable: true, value:'Skriv din kommentar här', height:140, width:280, top:155, font:{fontSize:16,...
can the texts of the buttons have shadows?
I've noticed that the Labels have shadows to make the text more crisp, Can i make a text on a button to have a shadow?
unable to receive text from a web server
I am trying to use the example code provided with the Ti.Network.createHTTPClient API documentation. However I am receiving null in the Ti.Api.Info onerror. I know for sure it is not the server that is the issue as I can read the text from the file...
Apostrophe treatment
Hi, I've got an app where I have some news feeds. If the title of the feed is something like: "Obama's days are numbered" It would print it out as: Obama's days are numbered. How do I get rid of the 's ?? Its quite odd...
Refresh certain portion of the codings
Dear all, I have set a function to call out the necessary portion that needs to be reloaded. However, i received an error that pullquote (variable) is undefined. is there a bug or something? ~~~ //FirstView Component Constructor function FirstView()...
A simple Jss example?
Hi, Iam getting a parse error while trying to use jss. I have tried with Id,className for a simple font-color/size for a text.But i could not make it work even after trying out as kitchen sink. pls help me out with a clear simple example for jss.
Add text to the right in tableview
I made a tableview assigned to a json with 2 rows below each other. How do I add text to the right in the tableview, just before the hasChild sign? CODE: var url = 'http://dl.dropbox.com/u/42299448/listacsam.json'; var table =...
Text 'cancel' of a cancel button inside SearchBar in spanish
In Kitchen Sink, when show a search bar with cancel button the text 'cancel' is in spanish 'cancelar'. How can I do it? I try searchbar but the text is in english. Titanium SDK 1.6.2
Changing the color of the table text
How to change color of the table text? I tried like this: ~~~ var tbl_data = [ {title:'MenuItem1'}, {title:'MenuItem2'}, {title:'MenuItem3'}, {title:'MenuItem4'}, {title:'MenuItem5'} ]; var table = Titanium.UI.createTableView({ ...
Problem with textarea. When its one line tall, the text automatically scrolls out of view
I'm not sure if this is a bug, but I have a textarea that is 35 high and when i focus onto the element, the text is not visible. Its being pushed a line higher and out of view. Is there a bottom padding setting on a text area?
Many labels vs. drawing text on a view
I have a component of my app that takes a string and splits it by spaces, and determines what color to color that Label. (It's like super-lite-html, for one specific purpose within my app.) I measure the text height and width this way also, to determine...
Possible solution for blurry text
It annoys me when my labels or buttons are blurry. Here are a few things you should check if you are having the problem: - Make sure the width/height are even numbers. Seems like Titanium tries to scale the text and it causes a blur. - You should...
How to vertical align text in a TextArea?
Is there a way to vertical align text all the way to the top of a TextArea? Right now, the text seems to begin rendering somewhere in the neighborhood of 10 pixels from the top of the TextArea's extent. The verticalAlign prop only seems to exist on the...
Blurry text fix?
Hi there, While width:"auto" is a great way of getting a label to center the text, it also introduce a new bug, blurry text. I figured out that if the label is placed on a float number due to the automatic calc of width:"auto" than...
Copy formatted text to Clipboard
Hey Guys, Say i have 3 or 4 text input boxs or labels. How would i copy these values into the clipboard all together so its formatted as such "Textline1" "Textline2" "Textline3" *blankline* "Textline4" Would...