setIconifiedByDefault() setIconified() onActionViewExpanded()对比
来源:互联网 发布:程序员 博客 编辑:程序博客网 时间:2024/06/11 18:55
ps:不考虑光标的状态
1、不设置:
初始状态
点击放大镜
2、 mSearchView.setIconifiedByDefault(false);//The default value is true ,设置为false直接展开显示 左侧有放大镜 右侧无叉叉 有输入内容后有叉叉
3、 mSearchView.setIconified(false);//true value will collapse the SearchView to an icon, while a false will expand it. 左侧无放大镜 右侧有叉叉
4、mSearchView.onActionViewExpanded();//内部调用了setIconified(false); 直接展开显示 左侧无放大镜 右侧无叉叉 有输入内容后有叉叉
试试组合
5、
mSearchView.setIconifiedByDefault(false);//The default value is true mSearchView.setIconified(false);//true value will collapse the SearchView to an icon, while a false will expand it
效果类同2,交换顺序后效果一致
6、
mSearchView.setIconifiedByDefault(false);//The default value is true mSearchView.onActionViewExpanded();//内部调用了setIconified(false);
效果类同2,交换顺序后效果一致
7、
mSearchView.setIconified(false);//true value will collapse the SearchView to an icon, while a false will expand it mSearchView.onActionViewExpanded();//内部调用了setIconified(false);
效果类同4,交换顺序后效果一致
8、
mSearchView.setIconifiedByDefault(false);//The default value is truemSearchView.setIconified(false);//true value will collapse the SearchView to an icon, while a false will expand it mSearchView.onActionViewExpanded();//内部调用了setIconified(false);
效果类同2,交换顺序后效果一致
总结:mSearchView.setIconifiedByDefault(false);会让放大镜icon直接在搜索框中出现
0 0
- setIconifiedByDefault() setIconified() onActionViewExpanded()对比
- 对比
- 对比
- 对比
- 对比...
- 对比
- 对比
- 对比
- 对比
- 时间对比
- 对比SET
- 密码对比
- 对比同行
- 围脖对比
- 算法对比
- 博客对比
- 对比keys
- drawable对比
- 用代码实现你来这个世界多少天了.
- jquery的入口函数
- public、private、default、protected总结
- 入门训练 Fibonacci数列
- SpringMVC-HTTP Status 500 - Servlet.init() for servlet springmvc threw exception
- setIconifiedByDefault() setIconified() onActionViewExpanded()对比
- 简单的MapReduce程序wordCount
- UIFramework之功能分析
- 初学者parseInt()和parseFloat()的理解(仅供参考,老司机笔下留情)
- 使用wxWidgets进行跨平台的C++开发
- g_2 + g_3
- cocos2d-x游戏摇杆开发
- 微痕迹简介
- onclick 点击事件