warwound Expert Licensed User Longtime User Aug 26, 2011 #1 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.
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.
Djembefola Active Member Licensed User Longtime User Aug 26, 2011 #2 warwound said: (ie simple!) way to detect a title touch? Click to expand... The most simple way is setting the "Include Title" Option in the IDE Project Menu to false and drawing the Titlebar by yourself. Upvote 0
warwound said: (ie simple!) way to detect a title touch? Click to expand... The most simple way is setting the "Include Title" Option in the IDE Project Menu to false and drawing the Titlebar by yourself.
thedesolatesoul Expert Licensed User Longtime User Aug 26, 2011 #3 I like this idea. Just drag the titlebar down and get your tabs. Saves screen estate. I am not sure if there is a way to get titlebar.height. Maybe get the color of a point to detect. I am not sure. Upvote 0
I like this idea. Just drag the titlebar down and get your tabs. Saves screen estate. I am not sure if there is a way to get titlebar.height. Maybe get the color of a point to detect. I am not sure.
JesseW Active Member Licensed User Longtime User Aug 26, 2011 #4 Djembefola said: The most simple way is setting the "Include Title" Option in the IDE Project Menu to false and drawing the Titlebar by yourself. Click to expand... You could achieve this with a label, and no one would be the wiser Upvote 0
Djembefola said: The most simple way is setting the "Include Title" Option in the IDE Project Menu to false and drawing the Titlebar by yourself. Click to expand... You could achieve this with a label, and no one would be the wiser
warwound Expert Licensed User Longtime User Aug 27, 2011 #5 Thanks for the replies. Looks like hiding the title and using a label is the way to go then. Martin. Upvote 0