Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

How to make a textArea uneditable on Android

I want a text area that just displays text, but doesn't allow you to edit or type. I use the following code for both iPhone and Android. It works like I want on the iPhone, but the Android still displays the keyboard when you focus on the text.

Here is my code

var description = Titanium.UI.createTextArea({
    backgroundColor:'transparent',
    value:'The paragraph of text I want to appear',
    top:40,
    left:15,
    width:290,
    height:225,
    font:{fontWeight:'bold', fontSize:14},
    editable:false
});
— asked August 8th 2010 by Chris Dotson
  • android
  • keyboard
  • textarea
0 Comments

3 Answers

  • Hi Chris, code looks fine but if that is the case then you can raise a ticket in JIRA. for the time being can try touchEnabled : false so the user touch will get disabled.

    — answered October 8th 2012 by Ashish Nigam
    permalink
    0 Comments
  • he only needs hintText, doesn't he?

    — answered October 9th 2012 by abcdefg sadfdsds
    permalink
    0 Comments
  • I doubt you would have the same problem but for this amount of time but try:

    var description = Titanium.UI.createTextArea({
        backgroundColor:'transparent',
        hintText:'The paragraph of text I want to appear',
        top:40,
        left:15,
        width:290,
        height:225,
        font:{fontWeight:'bold', fontSize:14},
        editable:false
    });
    
    — answered October 8th 2012 by abcdefg sadfdsds
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.