Community Questions & Answers
Getting the value of a TextField in ListView
Hi, I've been around this for 2 days now with no success. How can I get the value of a editable TextField inside a ListView? The best one I got so far was to use `listView.sections[0].items[0].rowTextField.value` but this doesn't work correctly, since it...
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...
Keyboard will not stay in numeric/symbol layout
I've been maintaining an app that uses a TableView for a input form, with textFields on each row to take input. But recently a behaviour has cropped up for iPhone that is annoying our users. When they are inputting into a textfield, and they swap to the...
Textfield text is cut off from top on Android
Hi All, I have a form with several textfield , but in every text field the vertical text alignment is not centered and text is cut off from the top. The same code is working well with ios platform. Here is the code which i am using: ~~~ var emailField =...
Alloy: how to set windowSoftInputMode?
how to set this windowSoftInputMode with Alloy? I tried to do it in js by getCurrentWindow, but it wont let me do it ;( it says can only set during creation, but what if I declare all my UI in XML? it says can only set during creation, but what if I...
Textfield on TableView loses focus (Android)
Usecase: A tabgroup with 2 tabs has a tableview on the 2nd tab with a textfield on a row. After a touch on the textfield the keyboard pops up but then the textfield loses focus(ie. there is no cursor in the field). (Also when using...
How to display entered password when click “?” Button
I am using password field in titanium iPhone application, I need to display entered password if user press "?" button and mask password field after release "?" button. I used these code ~~~ var password = Ti.UI.createTextField ...
Filling textfields causes crashes
Hello everyone. I created a function / class called Row which creates a view that contains a lable and a textfield. ~~~ function Row(rowName, additive, additiveValue){ var row = Ti.UI.createView({ height: 65, top: topPadding, width:...
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...
Webview html textfield keyboard bug
Hi Dudes, i've got a problem, when i want focus a html textfield on the webview. Sometimes if i foces the html textfield, the keyboard does not showing up! :( the method `webview.focus()` is not the solve! :( I use: Android SDK 2.2
TextField - next textfield witch <enter>
I am new to android, how is pressing the enter key skip to the next field textfield in android standard keyboard works, but I'm using ccd data collector, it sends enter the code as final
How to create Radio-Button, Checkbox and Textfield in Android-App
Anybody any idea, how i can create radio-buttons, checkboxes, Textfields for a survey-app in android? I've try it with webview and html-code but it's not a great solution :(
Latest Kitchen Sink Controls
I want to show latest controls in my app like the new kitchen sink have.. i-e Slider / Textbox with blue border.. When I run kitchen sink in my HTC one X its shows all controls when I add same control in my app i doesn't show up
How to vertical align text in center in a TextField in Android?
On Android , vertical align center not working for textfield. Please help me out. I am using Titanium sdk 2.1.1 here is the code i am using .it works fine on ios. var whereField = Titanium.UI.createTextField({ color:'#000000', ...
3.0.2 passwordMask bug
Can someone please confirm if this is a bug with Ti SDK 3.0.2 on iOS6 When passwordMask is set to true on a textField, the user is able to only type 1 character. When set to false or not included at all, it works just fine.
How to set the focus of editText textfield in preferences.xml to the end of the line instead of the start
Im using preferences.xml for storing my apps settings. Is it possible to get the keyboard to focus to the end of the line of text without requiring the user to click it themselves. I googled but it all required code such as getStringLength() then set...
textfield cursor position(android)
I am trying to restrict input (to a valid currency format)in a textfield as when it is being typed. However, when I change the value: txtField.value = newValue;, the position of the cursor moves to the front of the String. Example: position before: [ ...
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
TextField - Background Image and Text Position
Hi, I have a textField that I am using a background image for. However, on the iPhone the text the user types starts all the way at the very left of the background image - which looks crappy. Any way to offset where the text will start relative to the...
TextField paddingLeft Problem
I launched my first iPhone app built with Titanium last week (called Automotive App currently only available in Canada), and I started getting reports of an odd bug happening with TextField's. What was happening is that the first 1/6 of the TextField was...
textField + padding = lose touch!
If i user paddingRight on textfield, the field lose 50 pixels of touch on right. why? anybody have this problem? ~~~ myText = Ti.UI.createTextField({ textAlign:Ti.UI.TEXT_ALIGNMENT_RIGHT, paddingRight:5 }); ~~~ I use SDK 3.0.2.GA on iPhone.
Open a certain page depending on user input
Hi! I'm working on Ti SDK 3.1.0.GA, trying to code a app for iOS. Using a iOS sim on OSX 10.8.3. Problem: I have a textfield, and it has a type of num pad (so only numbers are allowed) and I want to open a window based on user input. As in if I input...
Height problem for textField in android
Hi all.. I am developing app usingTitanium SDK 2.1.3.. And Android SDK 4.0.. I am facing the problem in TextField..I have set border color for it..and i did not set height value in it..and border style is none.. The problem is textfield height...
Ti SDK 3.1.0 - TextField has some Serious Issues!
The TextField in Ti SDK 3.1.0.v.2013040912... on MacOSX has some serious issues. Cannot tap into a TextField as it looses focus immediately... works on SDK 3.0.2
Hide the keyboard (blur) when clicking out of a textField inside a tableView in Titanium
Hi, I'm developing in a Mac for IOS and Android and I'm using Titanium 3.1.0. I'm trying to get a table in Titanium where each row has a static text and a textField where I can input something. So I go and create a row where it's left part is the static...
Password field in TableViewRow only supports one character
I've got an Alloy view like the following, but as long as the password input is inside a `TableViewRow`, the maximum number of characters you can enter (certainly on the iOS Simulator) is one. It's not simply displaying a single character, it's messing...
Titanium Js issues
HI Developer Good Eve, I have one doubt in my current POC. How can i use one js page variables or textfield values in another js page. For Eg :- A.js i have clientName = John (This is textField value) B.js i want to display that clientName value in...
Textfield Input Limitation
I would like to limit input to only certain characters in a textfield I have. My current code kind of works, problem is that it allows spaces. I need to make sure this is Number and Letters Only (both uppercase and lowercase letters OK). My code as...
textfield without border
Hi, Im creating a textfield on android : here is its style in tss file : ~~~~~ "TextField" : { borderStyle: Ti.UI.INPUT_BORDERSTYLE_NONE, left: 5, width: Ti.UI.FILL, font: {fontSize: '12sp'} } ~~~~~ But i have still the border : look at...
UI of textarea
hi , In my app i am having a text area , UI of text area looks similar to that of a text box and goes on increasing when i enter text.i will be thank full if any one provides me solution. thanks
How do you change Label orientation?
I am using Titanium Alloy 3.0.2. I have a layout where the orientation of a few of the labels (these can be uneditable text fields) need to read from bottom to top. All other visual elements have standard orientation reading from left to right, so I am...
weird bug after clicking on textField
Hi, im developping a window (http://dzmob.net/tags.png) which displays tags for a photo and allows to add a tag : when there is no tags for a photo. a click on textField which allows to write tag and add it generates this weird exception !!!...
TextField Suggestion
Hi to all, how is possible to mane a suggestion textfield? what i mean is, think of the name of all usa states, if i write C i would like to see a menu with all the states that start with c.
Is clearButtonMode working for you in textfields?
Can anyone out there confirm that clearButtonMode is working ok? (It's the little 'x' which appears on the right of a textfield to clear the field. I have a weird setup here (due to foolishly trying the xCode beta ;p ) and I'm not seeing it at all....
Need Help: TableViewRow +TextField + TabelView
Hi Dudes, i got a problem with this part of code :( If i click on the TextField the View scroll automatically on the life side. Any Idea? :( ~~~ var view = Ti.UI.createView({ height : 'auto', }); var scrollView =...
Keyboard with Previous, Next and Done buttons
I have a view that has several textfields. I would like to have a keyboard that has the Previous, Next and Done buttons on the top above the keyboard and as I am filling in the textfields and clicking on next, it focus on the next field moving into above...
Placing cursor in textfiled
Is there anyway of placing the cursor in a specific position of a textfield in titanium or if not how it can be done otherwise? As far as I have searched this forum I haven't found a solution to position the cursor in a textfield or textarea. Thanks Oam
Ti Studio 3.0.1: Password Field with createTextField too short
Hi experts, When I create a password field like this ~~~ var l = Ti.UI.createTextField({ passwordMask: true, borderWidth: 1, borderColor: '#FF0000', hintText: 'hint', width: '200dp' }); ~~~ The resulting field accepts only one character. If I...
Calculate with textField values
Hi. I have 2 textFields that i put nrs in. I want to show the differential in a third textfield when the two first is filled. How can i do that? I have tried this (With no luck) ~~~ var small_nr = Ti.UI.createTextField({height:'20dp',left:'42dp', ...
When user want to change orientation of phone, my application show incorrect UI. Android
When user want to change orientation of phone, my application show incorrect UI. Phone OS: Android Titanium SDK: 3.0.2.GA My bug on video: http://www.youtube.com/watch?v=S0Yi-6ZKDcw ~~~ // create main app screen function ApplicationWindow() { var...
Strange behavier of editing text?
Hey, if i wanna edit my field like so: Enter a word and edit ONE LETTER in this word... So i jump to th position of the letter and hit "delete". the letter is deleted but the "editcursor" jumps to the end of the word... ? Seems very...
Access value from textfield through a loop
Hi, I am generating through a loop my textfields on a scrollview ~~~ var view = Ti.UI.createScrollView({ backgroundColor: '#3e3e3e', opacity: 0.6, left: 5, right: 5, top: 55, bottom: 5, zIndex: 1, contentWidth:'auto',...
borderStyle issue with android emulator
I have the following code, but the result is quite different from what I thought was going to be (ios verion). What am I doing wrong? ~~~ //creating the textfield for our loan amount input var tfAmount = Titanium.UI.createTextField({ width:...
Textfields not updated if value is set to null by alloy binding
Hi all, experimenting with alloy and data binding I found out that if a texfield will be bound to a null attribute, its text value wouldn't be updated (if a previous value was there, it's not even cleared). I tried after with a single standalone app.js...
Focus textfield on start window
Hi, I'm develop an Android application. I have a textfield added to a window inside a tab. When window opens, this textfield get focus (why?) and show me keyboard. I want my textfield does not have focus or at least I the keyboard doesn't start. I...
[Ti 3.0.2 + Alloy 1.0] Textfield/Password issue, user can't type more than 1 char
Strange behaviour... i couldn't find anyone facing the same issue. **Symptom**: Textfield/Password do not let the user type more than 1 character **Context**: The textfield is inside a TableViewRow **BAD Code**: ~~~ <TableViewRow> ...
How do I create a function that will create a view with a label and textfield?
I want to create a calculator app that has 20 lines (views) - each line will have a label and a textfield - the text field will be used to enter a parameter. I started creating the layout manually, but quickly realized that it was very time consuming to...
Validate string for date format
I have a string that I need to validate for a valid date format. How do I do that? I cannot use a datepicker in my application because it just looks ugly. So, I have three text fields that allow numbers only and now want to combine their content to form...
Allow only numbers as input
Is it possible to allow only numbers as textinput?