How can I create a resizeable text area in Sencha Touch?

雨燕双飞 提交于 2019-12-23 03:21:33

问题


I have an application in Sencha Touch where I have a textareafield. In Chrome, this is resizeable, but not when using an iPhone (I haven't tried on an Android device).

I need to have a text input area where people can enter text anything from one or two words long to many sentences. So I need this to either automatically resize; have some way of manually resizing it; or some way of scrolling within it.

So far I have been unable to do any of these with Sencha Touch. I would really appreciate it if someone can point me towards a workable solution. It doesn't need to be any specific component in Sencha Touch.


回答1:


There is a post on the Google Code blog explaining how they handled textarea auto growing in Mobile Gmail. Here's the link: http://googlecode.blogspot.com/2009/07/gmail-for-mobile-html5-series.html

I threw together a quick sample with jsfiddle: http://jsfiddle.net/rFcUH/

I did it with Sencha Touch 1.1, though something similar should work with Sencha Touch 2.



来源:https://stackoverflow.com/questions/9522813/how-can-i-create-a-resizeable-text-area-in-sencha-touch

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!