cosmos 联系人实现笔画快速搜索算法
来源:互联网 发布:如何在淘宝客上推广 编辑:程序博客网 时间:2024/05/06 09:27
在cosmos contact list 中,为实现输入笔画显示到输入框,并搜索出对应的联系人,可以参考下面修改两处实现:
1,添加一句 m_editor->setIME(IMM_INPUT_TYPE_QUICK_SEARCH);///
void VappPhbListCp::setSearchString(const VfxWString& search)
{
VcpListMenuSearchBar *m_searchbar = enableSearchBar();
VcpTextEditor *m_editor;
m_editor = m_searchbar->getSearchEditor();
VfxWString text = search;
m_editor->setText(text, MMI_PHB_QSEARCH_LENGTH - 1);
m_editor->setHint(VFX_WSTR_RES(STR_GLOBAL_SEARCH));
m_editor->setIME(IMM_INPUT_TYPE_QUICK_SEARCH);///
m_editor->m_signalTextChanged.connect(this, &VappPhbListCp::OnTextChanged);
// query result
m_list->setQuery(search);
}
2,将 if (code != pinyin->ori_char) 注释掉,
将 IMM_INPUT_MODE_QUICK_SEARCH_PINYIN, 改为 mmi_imm_get_curr_input_mode()
static MMI_BOOL srv_phb_filter_convert_name(
WCHAR* name,
srv_phb_cov_name_cntx_struct* cntx,
srv_phb_query_cache_struct* cache,
U16 pattern_len,
srv_phb_query_match_info_struct* match_info)
{
。。。。。。
if (!pinyin)
{
pinyin = &(cache->pinyin_cache[min(cntx->name_offset, (MMI_PHB_PINYIN_CACHE_COUNT -1))]);
}
// if (code != pinyin->ori_char)
{
pinyin->ori_char = code;
pinyin->len = srv_phb_convert_to_spelling(
mmi_imm_get_curr_input_mode(),//
IMM_INPUT_MODE_QUICK_SEARCH_PINYIN,
code,
(WCHAR*)(pinyin->pinyin),
MMI_PHB_QSEARCH_LENGTH);
}
if (cntx->conv_char_pos[cntx->conv_start])
{
match_info->sequence_len++;
}
else
{
match_info->sequence_len = 1;
match_info->sequence_start = cntx->name_offset;
}
1,添加一句 m_editor->setIME(IMM_INPUT_TYPE_QUICK_SEARCH);///
void VappPhbListCp::setSearchString(const VfxWString& search)
{
VcpListMenuSearchBar *m_searchbar = enableSearchBar();
VcpTextEditor *m_editor;
m_editor = m_searchbar->getSearchEditor();
VfxWString text = search;
m_editor->setText(text, MMI_PHB_QSEARCH_LENGTH - 1);
m_editor->setHint(VFX_WSTR_RES(STR_GLOBAL_SEARCH));
m_editor->setIME(IMM_INPUT_TYPE_QUICK_SEARCH);///
m_editor->m_signalTextChanged.connect(this, &VappPhbListCp::OnTextChanged);
// query result
m_list->setQuery(search);
}
2,将 if (code != pinyin->ori_char) 注释掉,
将 IMM_INPUT_MODE_QUICK_SEARCH_PINYIN, 改为 mmi_imm_get_curr_input_mode()
static MMI_BOOL srv_phb_filter_convert_name(
WCHAR* name,
srv_phb_cov_name_cntx_struct* cntx,
srv_phb_query_cache_struct* cache,
U16 pattern_len,
srv_phb_query_match_info_struct* match_info)
{
。。。。。。
if (!pinyin)
{
pinyin = &(cache->pinyin_cache[min(cntx->name_offset, (MMI_PHB_PINYIN_CACHE_COUNT -1))]);
}
// if (code != pinyin->ori_char)
{
pinyin->ori_char = code;
pinyin->len = srv_phb_convert_to_spelling(
mmi_imm_get_curr_input_mode(),//
IMM_INPUT_MODE_QUICK_SEARCH_PINYIN,
code,
(WCHAR*)(pinyin->pinyin),
MMI_PHB_QSEARCH_LENGTH);
}
if (cntx->conv_char_pos[cntx->conv_start])
{
match_info->sequence_len++;
}
else
{
match_info->sequence_len = 1;
match_info->sequence_start = cntx->name_offset;
}
- cosmos 联系人实现笔画快速搜索算法
- 联系人字母快速搜索
- Android实现列表仿联系人快速查找和关键字搜索
- 联系人快速检索实现
- T9搜索联系人的实现
- 11B Cosmos 平台手写笔画显示比较滞后问题
- 手机通讯录联系人拼音首字母搜索算法
- 实现类似Android联系人搜索功能
- 搜索实现最近联系人 thinkPHP框架
- ionic2实现通讯录,联系人搜索功能
- 一笔画问题(搜索)
- Android仿微信实现快速索引选择联系人
- 自定义View实现联系人快速查找
- 自定义view实现联系人快速检索
- Android仿微信实现快速索引选择联系人
- 带搜索框及快速索引的联系人列表
- 安卓仿手机联系人右侧快速搜索菜单自定义View
- Cosmos 如何实现多点触摸手势识别
- js移出字符串中所有的特定字符串
- a:focus{outline: none;} 如何去掉点击链接时周围的虚线框outline属性
- 文件管理中手机项格式化,进照相机和视频播放器会直接进入文件管理,并且选手机会提示存储空间不足
- java发送邮件
- linux ssh scp 无密码登录及机器copy-机器互信建立
- cosmos 联系人实现笔画快速搜索算法
- /usr/local/apache/modules/libphp5.so: cannot restore segment prot after reloc: Permission denied
- 拙眼识工作
- FDN, SDN, ADN, BDN, MSISDN,LND, EXT1,EXT2, EXT3 代表的意义和作用
- Android之基于HTTP协议的通信详解
- jquery Ajax get方法 中文参数乱码的问题
- javax.xml.parsers.DocumentBuilderFactory.setXIncludeAware(Z)V错误解决办法
- LAMP 系统性能调优(LAMP 系统的工作原理、性能度量方法及底层操作系统的调优方法)
- SIM 保存长号码失败, 提示:”Notsaved, number too long”