DialogFragment 监听按键事件的方法(onkeydown)
2016-02-18 09:36
423 查看
this.getDialog().setOnKeyListener(new OnKeyListener()
{
public boolean onKey(DialogInterface dialog, int keyCode, KeyEvent event){
if (keyCode == KeyEvent.KEYCODE_SEARCH)
return true; // pretend we've processed it
else
return false; // pass on to be processed as normal
}
});
{
public boolean onKey(DialogInterface dialog, int keyCode, KeyEvent event){
if (keyCode == KeyEvent.KEYCODE_SEARCH)
return true; // pretend we've processed it
else
return false; // pass on to be processed as normal
}
});
相关文章推荐
- LeetCode_OJ【54】Spiral Matrix
- Android开发艺术探索读书笔记(三)
- SELECT INTO…OUTFILE语句和LOAD DATA …INFILE语句使用说明
- 欢迎使用CSDN-markdown编辑器
- cocos2dx3.2 异步载入和动态载入
- 理解复杂的声明
- ASP.NET Core 1.0
- 13条建议搞定程序员发展
- Fortigate 防火墙策略路由配置实现双链路互访
- MyEclipse提示过期“Your 30-day trial of MyEclipse has expired.”
- mfc里showwindow的一个坑
- 从2月14号开始,上传AppStore会碰到:Failed to locate or generate matching signing assets
- springmvc创建restful接口通过HttpURLConnection创建连接传递数据
- Android 软键盘弹出与关闭监听
- 我做的一个websocket的demo(php server)
- UVaLive4043 UVa1411 Ants 巨人与鬼
- CI-持续集成(2)-软件工业“流水线”技术实现
- 文件IO(系统IO和标准IO)
- Android开发艺术探索读书笔记(二)
- 2015年十大测试工具你认识几个?