您的位置:首页 > 其它

避免Activity启动时某个控件马上获取焦点(如EditText/Gallery等)

2015-01-12 17:03 281 查看
一:一般招数:AndroidManifest.xml中的<Activity>节点中配置android:windowSoftInputMode="adjustUnspecified|stateHidden"(一般无用,经测试)

二:绝招:在布局中间的开头加入(有用)

[html] view
plaincopy

<LinearLayout

android:focusable="true"

android:focusableInTouchMode="true"

android:layout_width="0px"

android:layout_height="0px"/>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐