在捕获的Andr​​oid TabView的选项卡单击事件单击、选项卡、事件、Andr

由网友(有点上瘾)分享简介:我在我的Andr​​oid应用程序一个TabView的有3个标签。这些选项卡都工作正常。I have a tabview in my android app with 3 tabs. The tabs are all working fine.现在我想执行一些额外的逻辑,当前激活的选项卡的标签(顶部)被点击时。...

我在我的Andr​​oid应用程序一个TabView的有3个标签。这些选项卡都工作正常。

I have a tabview in my android app with 3 tabs. The tabs are all working fine.

现在我想执行一些额外的逻辑,当前激活的选项卡的标签(顶部)被点击时。

Now I want to perform some additional logic when the tab (on the top) of the currently active tab is clicked.

下面是一个例子:

在我的标签之一,我提供对用户进行排序的东西不同顺序的选项。当preSS当前激活的选项卡的标签,我想重置所有这些排序。

In one of my tabs, I provide an option for the user to sort things in different order. When the press the tab of the currently active tab, I want to reset all these sorting.

是否有可能捕捉选项卡中单击事件TabView的并执行一些额外的逻辑?

Is it possible to capture the tab click event in tabview and perform some additional logic?

编辑:编辑为清楚起见

推荐答案

如果你顷,直到寻找一个解决方案,我可能已经找到了一个。 看看这里:Android TabWidget检测点击当前标签

If you ares till looking for a solution, I might have found one. Take a look here: Android TabWidget detect click on current tab

阅读全文

相关推荐

最新文章