can i know how can we use a double touch on tabs in android.
I found that onclicklistener and onlongclicklistener are not working for tabs. so now am in need of a double touch on tabs.
Thanks in advance.

Recommended Answers

All 7 Replies

Once again you are trying to go against mobile UIX curriculum. What would be the purpose of double click on tab?

Thanks for the reply peter budo.
i am having two tabs in which there is some content (and a series of activities).
When i click on a tab it should give its particular content.
And when i double click on the first tab it should show the first activity.
Should we use the concept of double click ?

Isnt this possible or is it that we should not implement double touch on tabs in android ?

Everything is possible we just need to find a way, example provide a listener for first tab that on first click will set a boolean to true and start thread that does countdown of half second. If in that period there is another click on tab you jump to whatever you want to display in whatever state, however if in the given period thereis no second click thread will change boolean to flase and whole process have to be started from action of first click.

As I look at this, the whole process is ilogical, since click on any of the tab should present user with specific content which is purpose of the tab. You may want to re-think your project execution steps and see if you follow natural flow or you introducing some bariers

I agree with you peter budo that click on any tab should present user with specific content which is the foremost purpose of tab..Nothing to do with doule click..

yes i too agree with peter budo.
But i am trying to use double click (which is similar to iphone default implementation)
i thought A project done in iphone and in android will be similar which will be easy for the user.

And i tried the thing you said previously.
I checked which tab is currently on focus and if the first tab is in focus i am making a boolean value true and next if i am on the second tab i am making it false.
But i found its not working.

Any how i think its against to the free usage of user but when i am trying to use onclick on the tab i am unable to understand how to move further.

(i am using this as a reference to create tabs Click Here)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.