Android Question Tabhost tab click issue

GudEvil

Member
Licensed User
Longtime User
I have a project which has navdrawer with list view n tabhost tabs.

whenever I click on tab or navdrawer list item, it loads respective panel.

My issue is while loading app it selects tab1, (with underline color, which represents selected tab)
then it loads with navdrawer list option1 n its panel. but it still shows tab1 selected (but no panel loaded).

I got to select tab2 then tab1 ...then it loads tab1_panel. Because tabhostchanged event is fired when tab changes...

it doesnt fire when tab1 is selected n still u click on tab1...

Is there any way to acieve this??
can tabhost (or tabhostextras) has method which has property that no tab selected??

thanks
 

GudEvil

Member
Licensed User
Longtime User
ok...i will try..
I had tried before currenttab=0 but was error..

also thinking that will update current tab index at runtime while navdrawer list selected..

Will update the results...
 
Upvote 0

GudEvil

Member
Licensed User
Longtime User
I tried to set "tabhost1.currenttab=-1" but no changes...
even NULL doesnt work

also i tried to debug but currenttab value doesnt change its default 0...
 
Last edited:
Upvote 0

GudEvil

Member
Licensed User
Longtime User
I tried adding n extra tab n set its visibility false. N whenever I had to show no tab selected I programmatically select that extra tab index..

it worked ....
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…