tkowalczyk / simplecustomgestureframe Goto Github PK
View Code? Open in Web Editor NEWSwipe gestures on custom frame in Xamarin.Forms project.
License: MIT License
Swipe gestures on custom frame in Xamarin.Forms project.
License: MIT License
I was running your sample app under this env:
Xamarin forms: 1.3.1
Xamarin.Adnroid 4.20.0.37
I had it work for the iOS, but not Android.
No error during the compilation, no issue and no bug. But, no response when I swipe it on Android.
I done the testing via Xamarin Android Player, as well as on a actual physical device (Samsung galaxy S4), but both having the same result.
Am I missing something? Anything else that I need to include?
Hi, I'm trying to add your gestureFrame but in Xaml and it says this:
/Users/luis/Dropbox/projects/rasoApp/xxx/obj/Debug/testFramePage.xaml.g.cs(17,17): Error CS0246: The type or namespace name GestureFrame' could not be found. Are you missing
SimpleCustomGesureFrame' using directive? (CS0246) (xxx)
it works using the gestureFrame declaratively but not in xaml
Is it possible to bind the gesture to some ViewModel Command?
Hi @tkowalczyk and thanks for your work.
I have tried to insert your GestureFrame inside a CarouselView but it does not work very well. It's very difficult to have a SwipeTop.. can you take a look? Thanks.
Hi Guys,
Any idea if there is support for UWP?
Hello
It was working for android and ios, now it shows a blank screen in android
Greetings
rubenc
Hi @tkowalczyk
I am using your GestureFrame in my project all the events are working fine,Thanks for your sample. but i cant find touch event in it.can you help me with this..!!!
NOTE:
when i am using tap gesture event which is in xamarin.forms default it is working in ios but not working in android.
Thanks.
Hello,
Im trying to apply your solution in a ViewCell for do a hide menu list options.
Is that possible?
In my view i have:
<ViewCell xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="PhotoShelter.Views.MasterContentCell" Height="70" >
<Frame x:Name="MiStackLayouy">
<Grid RowSpacing="0" x:Name="myGrid" BackgroundColor="White">
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<StackLayout Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="5" Grid.RowSpan="3" Padding="15,10,0,10" Orientation="Horizontal" Spacing="10" x:Name="frontStackLayout" BackgroundColor="White">
<StackLayout Orientation="Vertical">
<Image Source="{Binding display_key}" Aspect="AspectFit" HorizontalOptions="Center" VerticalOptions="Center" x:Name="imageGrid" HeightRequest="40" WidthRequest="40">
<Image.GestureRecognizers>
<TapGestureRecognizer
Tapped="OnCollectionSelected"
NumberOfTapsRequired="1"/>
</Image.GestureRecognizers>
</Image>
</StackLayout>
<StackLayout Orientation="Vertical" Spacing="0">
<StackLayout Orientation="Horizontal">
<Label Text="{Binding item_name}" Font="Large" TextColor="Black" VerticalOptions="End" x:Name="nameGrid"> </Label>
</StackLayout>
<StackLayout Orientation="Horizontal" >
<Label Text="{Binding total}" Font="Small, Bold" TextColor="Gray" x:Name="totalgrid"></Label>
<Label Text="{Binding display_type}" Font="Small, Bold" TextColor="Gray" x:Name="activityTypeGrid"></Label>
<Label Text="created" Font="Medium" TextColor="Gray" x:Name="createdGrid"></Label>
<Label Text="{Binding c_date}" Font="Small, Bold" TextColor="Gray" x:Name="cdateGrid"></Label>
</StackLayout>
</StackLayout>
</StackLayout>
<StackLayout Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="8" Grid.RowSpan="3" Orientation="Horizontal" x:Name="backStackLayout" IsVisible="false">
<StackLayout Spacing="30" Orientation="Horizontal" BackgroundColor="#EFEFF4" Padding="20,0,20,10">
<Image Source="copy_link.png" Aspect="AspectFit" HeightRequest="35" WidthRequest="40" x:Name="sendicon" VerticalOptions="Center">
<Image.GestureRecognizers>
<TapGestureRecognizer
Tapped="SendTapped"
NumberOfTapsRequired="1"/>
</Image.GestureRecognizers>
</Image>
<Image Source="visibility.png" Aspect="AspectFit" HeightRequest="40" WidthRequest="40" x:Name="visibitiyicon" VerticalOptions="Center" >
<Image.GestureRecognizers>
<TapGestureRecognizer
Tapped="VisibilityTapped"
NumberOfTapsRequired="1"/>
</Image.GestureRecognizers>
</Image>
<Image Source="uploadswipe.png" Aspect="AspectFit" HeightRequest="40" WidthRequest="40" x:Name="uploadicon" VerticalOptions="Center">
<Image.GestureRecognizers>
<TapGestureRecognizer
Tapped="UploadTapped"
NumberOfTapsRequired="1"/>
</Image.GestureRecognizers>
</Image>
<Image Source="Move.png" Aspect="AspectFit" HeightRequest="40" WidthRequest="40" x:Name="moveicon" VerticalOptions="Center">
<Image.GestureRecognizers>
<TapGestureRecognizer
Tapped="MoveTapped"
NumberOfTapsRequired="1"/>
</Image.GestureRecognizers>
</Image>
</StackLayout>
<StackLayout Orientation="Horizontal" BackgroundColor="White" Padding="10,10,0,10">
<StackLayout>
<Image Source="{Binding display_key}" Aspect="AspectFit" HorizontalOptions="Center" VerticalOptions="Center" x:Name="newimagegrid" HeightRequest="40" WidthRequest="40">
<Image.GestureRecognizers>
<TapGestureRecognizer
Tapped="ImageTapped"
NumberOfTapsRequired="1"/>
</Image.GestureRecognizers>
</Image>
</StackLayout>
<StackLayout Orientation="Vertical" Spacing="0">
<Label Text="{Binding item_name}" Font="Large" TextColor="Black" x:Name="newnameGrid"> </Label>
<Label Text="{Binding total}" Font="Small, Bold" TextColor="Gray" x:Name="newtotalgrid" ></Label>
</StackLayout>
</StackLayout>
</StackLayout>
<!-- Always hide-->
<StackLayout Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="5" Grid.RowSpan="3" Padding="15,10,0,10" Orientation="Horizontal" Spacing="10" IsVisible="false" BackgroundColor="White">
<Label Text="{Binding url}" Font="Small, Bold" TextColor="Gray" IsVisible="false" x:Name="urlbinded"></Label>
</StackLayout>
</Grid>
</Frame>
</ViewCell>
And the code behind:
public MasterContentCell ()
{
InitializeComponent ();
FrontStackLayout = frontStackLayout;
BackStackLayout = backStackLayout;
GestureFrame gi = new GestureFrame
{
Content = MiStackLayouy
};
gi.SwipeRight += (s, e) =>
{
FrontStackLayout.IsVisible = false;
BackStackLayout.IsVisible = true;
};
MiStackLayouy = gi;
}
The Swipe gesture is not recognized :(
Hi, If I try to use the gesture in a scrollview in Android it doesn't works, any clue?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.