Titanium Community Questions & Answer Archive

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

Keypad Covers screen area (titanium)

In my application
In many pages when i m going to type in textfield at that time keypad covers most of the area of the screen

— asked November 22nd 2010 by nilap shah
  • application
  • mobile
0 Comments

2 Answers

  • If you use a ScrollView or a ScrollableView, your view should slide up when the keyboard is displayed. You might need to manually slide it back down when the keyboard is closed .. you can add an event listener on the text field's blur event to adjust the positioning of the view.

    — answered November 22nd 2010 by Tim Poulsen
    permalink
    0 Comments
  • Wrapping the view in a scrollview does help but there's a bug where it will only scroll down once per each textfield that you set focus to. You will need to manually scroll down on focus and back up on blur every time to make it work consistently:

    textbox.addEventListener("focus", function() { scrollView.scrollTo(0, 100); });
    textbox.addEventListener("blur", function() { scrollView.scrollTo(0, 0); });
    
    — answered November 30th 2010 by Justin Toth
    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.