Detect touch on activity title

warwound

Expert
Licensed User
Longtime User
Hi.

After recently creating my TabHostExtras library i want to now show/hide all tabs of a TabHost to give some extra screen space to an app.

Rather than have an activity menu item i thought i'd try using a touch on the app title to toggle the visibility of the tabs in the TabHost so i'm looking for a method to achieve this.

It looks like my only option is to listen for the activity touch event and then use some simple maths to determine if the touch was on the activity title or not.

Am i correct or is there a more elegant (ie simple!) way to detect a title touch?

If i must use the activity touch event then what functions are available for me to get the dimensions of the activity title so i can detect if the touch was on the title or elsewhere on the screen?

Thanks.

Martin.
 

warwound

Expert
Licensed User
Longtime User
Thanks for the replies.

Looks like hiding the title and using a label is the way to go then.

Martin.
 
Upvote 0
Top