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

5 Answers

  • Accepted Answer

    It's a known issue Ticket 878

    — answered August 11th 2010 by Don Thorp
    permalink
    0 Comments
  • Anyone? Is this a bug with Titanium?

    — answered August 10th 2010 by Chris Dotson
    permalink
    0 Comments
  • Does not work for me too.
    I used a http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.UI.ScrollView-object) instead.

    — answered August 10th 2010 by Frank Bösing
    permalink
    2 Comments
    • You mean you put your TextArea inside a ScrollView? I did that and the text is still seen as editable on the Android.

      — commented August 10th 2010 by Chris Dotson
    • No, put a label inside the scrollview.

      — commented August 11th 2010 by Frank Bösing
  • i found the solution its works

    var txtArea = Titanium.UI.TextArea({
    editable:false,
    enabled:false,
    });
    

    try this,…

    — answered June 17th 2011 by sachin thakur
    permalink
    0 Comments
  • Come on people if you do not want it to be editable then why use a text area…. Use a Label control…

    — answered August 11th 2010 by Satta Ravi
    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.