So if I get more than four tabs then their begin to shrink and does not look, and so I want more than four tabs but don’t want them to shrink.
Thanks in advance.
So if I get more than four tabs then their begin to shrink and does not look, and so I want more than four tabs but don’t want them to shrink.
Thanks in advance.
Thanks It worked!!!
I am also trying to set an icon on the tab of view pager, any idea on how I can achieve that?
Unfortunately, you can’t, but you could hide the tabs using this property:
I tried your solution but when used together it does give the desired result.
they don’t sync as expected when swiped.
tabs don’t get active when view pager is swiped.
Use select tab property with the position variable in the ViewPager.PageSelected event, same for the TabItem selected event, you don’t need to use If then block Also you might need to subtract the view pager position variable by one as it starts from 0 not 1:
can you share the blocks image, it will save me a lot of time.
Thanks in advance.
@Mohamed_Tamer is a very nice person, but the time it would take them to make it compared to the time you would make it is equivalent. Plus it’s nice to learn for yourself once in a while!
Since I understand what @Mohamed_Tamer is saying, here’s an example, but without the blocks.
when View_Pager2.PageSelected(int position) {
set Tab_Layout1.selectTab(get position - 1);
}
when Tab_Layout1.TabItemSelected(String tab, int position) {
set View_Pager2.selectTab(get position - 1);
}
Actually, its not about the time.
The problem is, I know his solution is right, but haven’t figured out yet. else would have done it myself. Dont like to trouble community people.
If you know something it is a two minutes job for to show the blocks.
And yup, he is a nice person and solve queries really well.
Thanks
It’s always better to try your self , but since you haven’t figure out how to do it neither from my post nor from @hammerhai’s example, so I would show you the blocks that i’ve commented it out, so you can learn how they work
Wow!! It worked !!
And thanks a lot for such a great explanation. Understood it!
Then please close the topic by marking the solution
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.