在捕获的Andr​​oid TabView的选项卡单击事件 [英] Capturing the tab click event in Android Tabview

查看:311
本文介绍了在捕获的Andr​​oid TabView的选项卡单击事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的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?

编辑:编辑为清楚起见

推荐答案

如果你顷,直到寻找一个解决方案,我可能已经找到了一个。 看看这里:<一href="http://stackoverflow.com/questions/4337514/android-tabwidget-detect-click-on-current-tab?tab=active#tab-top">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

这篇关于在捕获的Andr​​oid TabView的选项卡单击事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆