forked from xamarin/Xamarin.Forms
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Wrong initial ActionView Layout using Drag SwipeTransitionMode (xamar…
- Loading branch information
1 parent
94be14a
commit 7dd033f
Showing
4 changed files
with
229 additions
and
2 deletions.
There are no files selected for viewing
176 changes: 176 additions & 0 deletions
176
Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue13495.xaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,176 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<local:TestContentPage | ||
xmlns="http://xamarin.com/schemas/2014/forms" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | ||
xmlns:d="http://xamarin.com/schemas/2014/forms/design" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
mc:Ignorable="d" | ||
Title="Test 13495" xmlns:local="using:Xamarin.Forms.Controls" | ||
x:Class="Xamarin.Forms.Controls.Issues.Issue13495" | ||
xmlns:ios="clr-namespace:Xamarin.Forms.PlatformConfiguration.iOSSpecific;assembly=Xamarin.Forms.Core"> | ||
<StackLayout> | ||
<Label | ||
Padding="12" | ||
BackgroundColor="Black" | ||
TextColor="White" | ||
Text="Swipe any SwipeView several times, without a SwipeItem glitch when pulled out (using Drag SwipeTransitionMode), the test has passed."/> | ||
<Label | ||
Text="Left Items"/> | ||
<CollectionView | ||
HeightRequest="100" | ||
ItemSizingStrategy="MeasureFirstItem"> | ||
<CollectionView.ItemsSource> | ||
<x:Array Type="{x:Type x:String}"> | ||
<x:String>Item 1</x:String> | ||
<x:String>Item 2</x:String> | ||
</x:Array> | ||
</CollectionView.ItemsSource> | ||
<CollectionView.ItemTemplate> | ||
<DataTemplate x:DataType="x:String"> | ||
<SwipeView | ||
ios:SwipeView.SwipeTransitionMode="Drag"> | ||
<SwipeView.LeftItems> | ||
<SwipeItems | ||
SwipeBehaviorOnInvoked="RemainOpen"> | ||
<SwipeItem | ||
Text="Delete" | ||
BackgroundColor="Red"/> | ||
</SwipeItems> | ||
</SwipeView.LeftItems> | ||
<Grid> | ||
<Frame | ||
HorizontalOptions="Start" | ||
BackgroundColor="LightGray" | ||
CornerRadius="12" | ||
Padding="6" | ||
HasShadow="False" | ||
Margin="6" | ||
Opacity="0.75"> | ||
<Label | ||
Text="{Binding .}"/> | ||
</Frame> | ||
</Grid> | ||
</SwipeView> | ||
</DataTemplate> | ||
</CollectionView.ItemTemplate> | ||
</CollectionView> | ||
<Label | ||
Text="Top Items"/> | ||
<CollectionView | ||
HeightRequest="100" | ||
ItemSizingStrategy="MeasureFirstItem"> | ||
<CollectionView.ItemsSource> | ||
<x:Array Type="{x:Type x:String}"> | ||
<x:String>Item 1</x:String> | ||
<x:String>Item 2</x:String> | ||
</x:Array> | ||
</CollectionView.ItemsSource> | ||
<CollectionView.ItemTemplate> | ||
<DataTemplate x:DataType="x:String"> | ||
<SwipeView | ||
ios:SwipeView.SwipeTransitionMode="Drag"> | ||
<SwipeView.TopItems> | ||
<SwipeItems | ||
SwipeBehaviorOnInvoked="RemainOpen"> | ||
<SwipeItem | ||
Text="Delete" | ||
BackgroundColor="Red"/> | ||
</SwipeItems> | ||
</SwipeView.TopItems> | ||
<Grid> | ||
<Frame | ||
BackgroundColor="LightGray" | ||
CornerRadius="12" | ||
Padding="6" | ||
HasShadow="False" | ||
Margin="6" | ||
Opacity="0.75"> | ||
<Label | ||
Text="{Binding .}"/> | ||
</Frame> | ||
</Grid> | ||
</SwipeView> | ||
</DataTemplate> | ||
</CollectionView.ItemTemplate> | ||
</CollectionView> | ||
<Label | ||
Text="Right Items"/> | ||
<CollectionView | ||
HeightRequest="100" | ||
ItemSizingStrategy="MeasureFirstItem"> | ||
<CollectionView.ItemsSource> | ||
<x:Array Type="{x:Type x:String}"> | ||
<x:String>Item 1</x:String> | ||
<x:String>Item 2</x:String> | ||
</x:Array> | ||
</CollectionView.ItemsSource> | ||
<CollectionView.ItemTemplate> | ||
<DataTemplate x:DataType="x:String"> | ||
<SwipeView | ||
ios:SwipeView.SwipeTransitionMode="Drag"> | ||
<SwipeView.RightItems> | ||
<SwipeItems | ||
SwipeBehaviorOnInvoked="RemainOpen"> | ||
<SwipeItem | ||
Text="Delete" | ||
BackgroundColor="Red"/> | ||
</SwipeItems> | ||
</SwipeView.RightItems> | ||
<Grid> | ||
<Frame | ||
HorizontalOptions="End" | ||
BackgroundColor="LightGray" | ||
CornerRadius="12" | ||
Padding="6" | ||
HasShadow="False" | ||
Margin="6" | ||
Opacity="0.75"> | ||
<Label | ||
Text="{Binding .}"/> | ||
</Frame> | ||
</Grid> | ||
</SwipeView> | ||
</DataTemplate> | ||
</CollectionView.ItemTemplate> | ||
</CollectionView> | ||
<Label | ||
Text="Bottom Items"/> | ||
<CollectionView | ||
HeightRequest="100" | ||
ItemSizingStrategy="MeasureFirstItem"> | ||
<CollectionView.ItemsSource> | ||
<x:Array Type="{x:Type x:String}"> | ||
<x:String>Item 1</x:String> | ||
<x:String>Item 2</x:String> | ||
</x:Array> | ||
</CollectionView.ItemsSource> | ||
<CollectionView.ItemTemplate> | ||
<DataTemplate x:DataType="x:String"> | ||
<SwipeView | ||
ios:SwipeView.SwipeTransitionMode="Drag"> | ||
<SwipeView.BottomItems> | ||
<SwipeItems | ||
SwipeBehaviorOnInvoked="RemainOpen"> | ||
<SwipeItem | ||
Text="Delete" | ||
BackgroundColor="Red"/> | ||
</SwipeItems> | ||
</SwipeView.BottomItems> | ||
<Grid> | ||
<Frame | ||
BackgroundColor="LightGray" | ||
CornerRadius="12" | ||
Padding="6" | ||
HasShadow="False" | ||
Margin="6" | ||
Opacity="0.75"> | ||
<Label | ||
Text="{Binding .}"/> | ||
</Frame> | ||
</Grid> | ||
</SwipeView> | ||
</DataTemplate> | ||
</CollectionView.ItemTemplate> | ||
</CollectionView> | ||
</StackLayout> | ||
</local:TestContentPage> |
27 changes: 27 additions & 0 deletions
27
Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue13495.xaml.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using Xamarin.Forms.CustomAttributes; | ||
|
||
#if UITEST | ||
using Xamarin.UITest; | ||
using NUnit.Framework; | ||
using Xamarin.Forms.Core.UITests; | ||
#endif | ||
|
||
namespace Xamarin.Forms.Controls.Issues | ||
{ | ||
[Issue(IssueTracker.Github, 13495, | ||
"[Bug] Regression in XF5: SwipeView glitches when pulled out", | ||
PlatformAffected.iOS)] | ||
public partial class Issue13495 : TestContentPage | ||
{ | ||
public Issue13495() | ||
{ | ||
#if APP | ||
InitializeComponent(); | ||
#endif | ||
} | ||
|
||
protected override void Init() | ||
{ | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters