点击标签时,在同一屏幕的选项卡显示的ContextMenu [英] Display a contextmenu when clicking a tab, in the same screen with the tabs
问题描述
我要像当某个标签是pressed,像这样的上下文菜单中显示的内容:
I need to display something like a context menu when a certain tab is pressed, something like this :
这可能吗?我知道,当一个标签宣布它必须设置一个Intent,我想,以显示与选项卡在同一个屏幕此上下文菜单(相同的活动)。需要一些帮助。任何想法是值得欢迎的。先谢谢了。
Is it possible? I know that when a tab is declared it must be set an Intent, and I want to display this context menu in the same screen with the tabs (the same activity). Need some help. Any idea is welcome. Thanks in advance.
编辑:我想说的是,最后一个标签是这样的:
EDIT : I want to say that the last tab to be something like this :
在Facebook上。最后一个标签有一些选择,但不进行修改的内容。
on Facebook. The last tab to have some options but the content to not be modified.
推荐答案
至于根据您的reqiurement的,只想要CONTEX菜单选项卡将其他数据该选项卡妳比没有必要添加意图类型的选项卡或评论说,意图像
As according to your reqiurement as u only want contex menu at Tab not other data for that tab than u there is no need to add intent type for that tab or comment that intent for that tab example like
// intent = new Intent().setClass(this, tabactivity3.class);
spec = tabHost.newTabSpec("songs").setIndicator("Search",
res.getDrawable(R.drawable.act3))
.setContent(intent);
tabHost.addTab(spec);
我评论过意向的标签,3 这将显示在后面观为previous标签数据如下那里我ic_launcher图像显示的显示图像上下文菜单中的标签1
i have commented intent for tab 3 which will show context menu on behind view as previous tab data as shown image below where my ic_launcher image display is of tab 1
这篇关于点击标签时,在同一屏幕的选项卡显示的ContextMenu的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!