如何把某个指定的java 从java menu list hide 掉?
[SOLUTION]
1.
1)需要修改mmi_java_fetch_mids_list。
这个接口是fetch mids list 的处理函数中, 下面以指定第2个default game 隐藏为例。
MMI_BOOL mmi_java_fetch_mids_list(S32 item_index, UI_string_type str_buff, PU8 *img_buff_p, U8
str_img_mask)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
if (needToSendGetListReq)
{
/* only check the first item_index fetch request */
if (item_index < g_java.total_java_app_mids
&& g_java.mids_info_start <= item_index &&
(g_java.mids_info_end == g_java.total_java_app_mids ||
item_index + MMI_MAX_MENUITEMS_IN_CONTENT < g_java.mids_info_end))
{
needToSendGetListReq = MMI_FALSE;
/* nothing to do, because data is in cache. */
}
else
{
/* search the cache */
int i;
int j;
U32 event_group;
mmi_java_mids_getlist_cnf_struct *ptr;
S32 saved_item_index = item_index;
/* scroll up, item_index - 3 for speeding up */
if (g_java.mids_info_start > saved_item_index)
{
saved_item_index -= JAVA_LIST_CACHE_COUNT - MMI_MAX_MENUITEMS_IN_CONTENT;
if (saved_item_index < 0)
{
saved_item_index = 0;
}
}
if (g_java.total_java_app_mids < saved_item_index + JAVA_LIST_CACHE_COUNT)
{
saved_item_index = g_java.total_java_app_mids - JAVA_LIST_CACHE_COUNT;
}
mmi_java_send_mids_get_list_req(saved_item_index, MMI_TRUE, &ptr, &g_java.mids_list_filter);
kal_retrieve_eg_events(g_jam_getlist_event_group, 1, KAL_OR_CONSUME,
(kal_uint32*)&event_group, KAL_SUSPEND);
if (mids_info_start == -1)
{
/* if hide the second one, please follow the code*/
for (i = 0,j = 0; i < ptr->mids_list_count; i++)
{
if (i != 1)
{
j++
}
g_java.mids_info[i] = ptr->pmids_list[j];
}
ptr->mids_list_count --;
}
else
{
for (i = 0; i < ptr->mids_list_count; i++)
{
g_java.mids_info[i] = ptr->pmids_list[i];
}
}
g_java.mids_info_start = ptr->start_indx;
g_java.mids_info_end = ptr->start_indx + ptr->mids_list_count;
g_java.total_java_app_mids = ptr->mids_count -1;
free_local_para((local_para_struct*) ptr);
needToSendGetListReq = MMI_FALSE;
}
}
else
{
if (!(item_index < g_java.total_java_app_mids
&& g_java.mids_info_start <= item_index && item_index < g_java.mids_info_end))
{
ASSERT(0);
}
}
if (g_java.total_java_app_mids == 0)
{
return MMI_TRUE;
}
ASSERT(g_java.mids_info_start <= item_index && item_index < g_java.mids_info_end);
/* fetch the icon */
if (img_buff_p)
{
if (g_java.mids_info[item_index - g_java.mids_info_start].mids_icon != NULL)
{
(*img_buff_p) = (PU8) g_java.mids_info[item_index - g_java.mids_info_start].mids_icon;
}
else
{
if (g_java.mids_info[item_index - g_java.mids_info_start].mid_count == 1)
{
(*img_buff_p) = (PU8) GetImage(IMG_JAVA_STAR1);
}
else
{
(*img_buff_p) = (PU8) GetImage(IMG_JAVA_STAR2);
}
}
}
/* fetch the item name */
if (str_buff)
{
mmi_ucs2ncpy(
(S8*) str_buff,
(const S8*)g_java.mids_info[item_index - g_java.mids_info_start].mids_name,
MAX_SUBMENU_CHARACTERS);
}
return MMI_TRUE;
}
隐藏JAVA应用菜单
原创
©著作权归作者所有:来自51CTO博客作者曹观沧海的原创作品,请联系作者获取转载授权,否则将追究法律责任
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
有趣的CSS - 汉堡菜单按钮
用 css 实现汉堡菜单图标与关闭图标过渡动画交互效果。
css 汉堡图标 动画 ux 交互体验 -
看懂OSSIM的WebUI菜单源码文件
本文详细介绍OSSIM前端WebUI菜单结构和代码注释
数组 OSSIM 汉化 -
菜单的显示和隐藏
&n
职场 休闲 MTK 菜单显示 菜单隐藏 -
Layui 隐藏左侧菜单
简单实现
简单实现 ico IT