void
setOutsideTouchable(boolean touchable)
Controls whether the pop-up will be informed of touch events outside of its window.
void
setFocusable(boolean focusable)
...
在android开发过程中关于EditText在setFocusable(false);后,当需要再次获得焦点输入时设置setFocusable(true);后还是无法获得焦点的问题:解决办法:对EditText设置后就可以了!et.setFocusable(true);et.setFocusabl...
分类:
移动开发 时间:
2015-07-09 17:37:47
阅读次数:
193
在android关于开发过程EditText在setFocusable(false);后,设置时需要再次获得输入焦点setFocusable(true);问题后仍然无法获得焦点:解决的方法:对EditText设置后就能够了。et.setFocusable(true);et.setFocusableI...
分类:
移动开发 时间:
2015-07-06 08:50:00
阅读次数:
152
在android开发中,关于EditText自动获取焦点弹出键盘,我们可能又是会有让键盘自动弹出的需求,有时可能又会有不想让键盘自动弹出的需求,下面是我所总结的两种方法: 需求:EditText自动获取焦点并弹出键盘,代码: EditText.setFocusable(true); ...
分类:
移动开发 时间:
2015-07-02 22:17:36
阅读次数:
134
这三个属性必须同时设置:privateEditTextpasswde=null; passwde.setFocusable(true); passwde.setFocusableInTouchMode(true); passwde.requestFocus();
分类:
其他好文 时间:
2015-07-02 19:25:05
阅读次数:
125
当ScrollView下嵌套GridView或ListView时,如果内容超过一屏默认位置不在ScrollView的顶部,这是因为嵌套GridView或ListView获了焦点,解决方法有如下几种:
方法1把ScrollView里的第一个View获取焦点:
baseView.setFocusable(true);
baseView.setFocusableInTouchMode(true)...
分类:
其他好文 时间:
2015-06-12 23:58:13
阅读次数:
128
显示键盘: EditText editText.setFocusable(true); editText.setFocusableInTouchMode(true); editText.requestFocus(); InputMetho...
分类:
移动开发 时间:
2015-06-05 13:56:39
阅读次数:
172
有时直接使用requestFocus()不能给button设置焦点,经网上查找得到如下结论:先setFocus,再requestFocus。 btn.setFocusable(true); btn.setFocusableInTouchMode(true); b...
分类:
移动开发 时间:
2015-05-11 12:32:43
阅读次数:
107
一、布局中软键盘自动弹出bargain_dialog_offer_edit.requestFocus();bargain_dialog_offer_edit.setFocusable(true);InputMethodManager imm = (InputMethodManager) contex...
分类:
移动开发 时间:
2015-04-30 19:51:50
阅读次数:
132
引言:ListView 中嵌套按钮,按钮点击事件无效,将按钮 setFocusable(false) 后才能正常使用点击事件的情况相信许多开发者都遇到过,很多人可能找到一个解决办法就把这个问题抛在了一边,但题主本着探索的精神从源码的角度找到了问题的答案如果没有看过 深入理解 View 的事件传递机制 ,看今天的内容可能会有些吃力,所以建议大家还是先去看看我的这篇文章啦。废话不多说,进入正题:一、概述...
分类:
其他好文 时间:
2015-04-26 09:13:53
阅读次数:
139