Xamarin.Forms vertical Tabs and HorizontalListView drag and drop
Tabs version 2.1.0 and HorizontalListView v1.8.1 are here \o/ (and also MaterialFrame v1.1.4)
https://github.com/roubachof/Sharpnado.Tabs | |
WARNING the HorizontalListView has been renamed to CollectionView since version 2.0.
https://github.com/roubachof/Sharpnado.CollectionView | |
What's new?
Vertical Tabs
PR by @nor0x (Joachim Leonfellner).
You can now change the orientation of the tabs to achieve vertical tabs.
It could be pretty convenient for landscape or tablet layout.
<sho:TabHostView x:Name="TabHostLogo"
Grid.Row="3"
WidthRequest="200"
HeightRequest="60"
Margin="15"
Padding="20,0"
HorizontalOptions="Center"
VerticalOptions="Start"
BackgroundColor="{DynamicResource DynamicBottomBarBackground}"
CornerRadius="30"
IsSegmented="True"
Orientation="Horizontal"
Shades="{DynamicResource DynamicBottomTabsShadow}"
TabType="Fixed">
You can find in the silly app (https://github.com/roubachof/Xamarin-Forms-Practices/blob/master/SillyCompany.Mobile.Practices/Presentation/Views/TabsLayout/SillyBottomTabsPage.xaml.cs) an example of dynamically adapting tabs orientation while switching from portrait to landscape:
HorizontalListView runtime drag and drop animations
EnableDragAndDrop
is now a bindable property, so you can enable it at runtime.
You can now also specify a custom animation when the EnableDragAndDrop
is set to ture:
HorizontalListView.DragAndDropEnabledAnimationAsync = async (viewCell, token) =>
{
while (!token.IsCancellationRequested)
{
await viewCell.View.RotateTo(8);
await viewCell.View.RotateTo(-8);
}
await viewCell.View.RotateTo(0);
};
will result in:
You can decide to start the drag without long press on iOS thanks to the iOS specific property iOSDragAndDropOnPanGesture
:
<sho:HorizontalListView
...
iOSDragAndDropOnPanGesture="True" />
Fixes
MaterialFrame v1.1.4
- Fixes #16: issue with background color on android with Xamarin.Forms 5.0
Tabs
- Fixes #20 #8: bad icon or text color when dynamically changing colors