How to prevent scrolling to focused EditText

This question already has an answer here:

  • Stop EditText from gaining focus at Activity startup 46 answers

  • 为EditText尝试setSelected(false)


    Instead of the EditText one can use another View to steal the focus eg layout with attributes android:focusable="true" and android:focusableInTouchMode="true". Android does not seem to use this to scroll ScrollView which is exactly what I need. It's a hack and discouraged but my 1st attempt is a hack too, to work around a bug so who cares :). Thanks matthias for the hint.

    链接地址: http://www.djcxy.com/p/24164.html

    上一篇: 不自动选择EditText字段

    下一篇: 如何防止滚动聚焦EditText