Quantcast
Viewing all articles
Browse latest Browse all 8068

Slow typing with textarea

I have an app for iOS and my users are complaining about typing performance. They say that they cannot type so fast, 'cause some letters get missing ... It seems that they can type fast enough in other apps, but in this one they can't.

Does anyone have any tips?

In my case I put my textfields and textareas inside TableViews. (look-and-feel purpose only).

Code:

var self = Ti.UI.createTableView({
        style: Ti.UI.iPhone.ListViewStyle.GROUPED
    });
 
    var rows = [];
    var inputs = [];
 
    for (i in fields)
    {
        var f = fields[i];
        var hint = f.hint || '';
        var label = f.label || '';
        var keyboardType = f.keyboardType || Titanium.UI.KEYBOARD_DEFAULT;
        var inputType = f.inputType || "textbox";
        var validator = f.validator || null;
        var name = f.name || "field-"+i;
        var value = f.value || "";
 
        var row = Ti.UI.createTableViewRow({
            header:label,
            selectionStyle: Ti.UI.iPhone.TableViewCellSelectionStyle.NONE,
            className: 'control'});
        if (inputType == "textbox")
        {
            var inputBox = Titanium.UI.createTextField({
                width:Ti.UI.FILL,
                left:10,
                height:40,
                backgroundColor:"transparent",
                font:{fontSize: 20},
                borderStyle: Titanium.UI.INPUT_BORDERSTYLE_NONE,
                keyboardType: keyboardType,
                hint: hint
            });
        }
        else
        {
            var inputBox = Titanium.UI.createTextArea({
                width:Ti.UI.FILL,
                left:10,
                height:'auto',
                backgroundColor:"transparent",
                font:{fontSize: 20},
                borderStyle: Titanium.UI.INPUT_BORDERSTYLE_NONE,
                keyboardType: keyboardType,
                hint: hint,
                suppressReturn: false,
                scrollable: false,
            });
        }
        inputBox.value = value;
        inputBox.validator = validator;
        inputBox.formName = name;
        inputs.push(inputBox);
 
        row.add(inputBox);
        rows.push(row);
    }

I'm using Alloy also.

Application type: mobile Titanium SDK: CLI version 3.1.2, Titanium SDK version 3.1.3.GA Platform & version: iOS 6.1 Device: iPhone 4GS Host Operating System: N/A Titanium Studio: Titanium Studio, build: 3.1.0.201304151600


Viewing all articles
Browse latest Browse all 8068

Trending Articles