Sharpnado.Tabs icon indicating copy to clipboard operation
Sharpnado.Tabs copied to clipboard

How to swipe between tabs

Open MoeHamdan opened this issue 5 years ago • 14 comments

Is your feature request related to a problem? Please describe. I want the TabHostView and ViewSwitcher to have the carousel effect? In other words make it work just like a tabstrip works on Android.[...]

Thank you very much for this amazing library.

MoeHamdan avatar Jul 04 '19 09:07 MoeHamdan

You can already :) Use a TabHostView with the HorizontalList (with Carousel Layout) instead of the ViewSwitcher, and bind SelectedIndex to CurrentIndex.

roubachof avatar Jul 04 '19 09:07 roubachof

Oh! You are awesome!!! That worked perfectly!

I have 1 more small question, how would I make the underlined part of the tab header to have the carousel effect? is that possible?

MoeHamdan avatar Jul 04 '19 09:07 MoeHamdan

unfortunately it would require a new implementation of the tabs for this...

roubachof avatar Jul 04 '19 09:07 roubachof

I see thank you! I will try implementing the tab.

MoeHamdan avatar Jul 04 '19 09:07 MoeHamdan

You can create a feature request for this. I will have time to improve tabs this summer :)

roubachof avatar Jul 04 '19 09:07 roubachof

If I was successful I will pull request it. If not I will feature request it.

Again, Than you so much for this library!

MoeHamdan avatar Jul 04 '19 09:07 MoeHamdan

You can already :) Use a TabHostView with the HorizontalList (with Carousel Layout) instead of the ViewSwitcher, and bind SelectedIndex to CurrentIndex.

Hi @roubachof, How to use HorizontalList (with Carousel Layout) instead of ViewSwitcher with different content in each tab? As I know, HorizontalListView has only one DataTemplate to declare its content.

Thank you for your amazing lib.

TienNK1987 avatar Feb 14 '20 08:02 TienNK1987

With a DataTemplateSelector :)

roubachof avatar Feb 14 '20 13:02 roubachof

With a DataTemplateSelector :) Could you please give me a sample? Thank you @roubachof,

TienNK1987 avatar Feb 15 '20 03:02 TienNK1987

https://docs.microsoft.com/en/xamarin/xamarin-forms/app-fundamentals/templates/data-templates/selector

roubachof avatar Feb 15 '20 07:02 roubachof

Shouldn't this be the default behaviour. If not, is it planned in the future?

dpjha84 avatar Feb 26 '23 19:02 dpjha84

Use a TabHostView with the HorizontalList (or even with CardsView instead of the ViewSwitcher, and bind SelectedIndex to CurrentIndex.

roubachof avatar Mar 01 '23 09:03 roubachof

If we use the horizontalist, can we still use the delayed view? I found the delayed view is very useful.

eyeveye avatar Sep 23 '23 07:09 eyeveye

I'm looking to divide a view into tabs, allowing users to navigate without scrolling by organizing properties into context-specific tabs (for instance, one tab for credentials and another for notification preferences in a profile view). As a collection view isn't suitable for this, I'd like to implement a way to swipe between tabs. I've experimented with SwipeGestureRecognizers, but the outcome wasn't ideal.

mpapadis avatar Jun 10 '24 07:06 mpapadis