Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Modified Kb #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@
<MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
<MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix>
<AndroidUseLatestPlatformSdk>false</AndroidUseLatestPlatformSdk>
<TargetFrameworkVersion>v8.1</TargetFrameworkVersion>
<TargetFrameworkVersion>v9.0</TargetFrameworkVersion>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
@@ -49,9 +49,9 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Syncfusion.Xamarin.SfListView">
<Version>17.3.0.26</Version>
<Version>17.4.0.55</Version>
</PackageReference>
<PackageReference Include="Xamarin.Forms" Version="4.3.0.947036" />
<PackageReference Include="Xamarin.Forms" Version="4.5.0.356" />
</ItemGroup>
<ItemGroup>
<Compile Include="MainActivity.cs" />

This file was deleted.

Original file line number Diff line number Diff line change
@@ -6,6 +6,7 @@
using Android.Views;
using Android.Widget;
using Android.OS;
using AbortAnimation.Droid;

namespace Animation.Droid
{
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.companyname.Animation">
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="27" />
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="28" />
<application android:label="Animation.Android"></application>
</manifest>
</manifest>
14,115 changes: 10,242 additions & 3,873 deletions listview-sample/Animation/Animation.Android/Resources/Resource.Designer.cs

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions listview-sample/Animation/Animation.UWP/Animation.UWP.csproj
Original file line number Diff line number Diff line change
@@ -144,9 +144,9 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Syncfusion.Xamarin.SfListView">
<Version>17.3.0.26</Version>
<Version>17.4.0.55</Version>
</PackageReference>
<PackageReference Include="Xamarin.Forms" Version="4.3.0.947036" />
<PackageReference Include="Xamarin.Forms" Version="4.5.0.356" />
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="6.0.6" />
</ItemGroup>
<ItemGroup>
4 changes: 2 additions & 2 deletions listview-sample/Animation/Animation.iOS/Animation.iOS.csproj
Original file line number Diff line number Diff line change
@@ -148,9 +148,9 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Syncfusion.Xamarin.SfListView">
<Version>17.3.0.26</Version>
<Version>17.4.0.55</Version>
</PackageReference>
<PackageReference Include="Xamarin.Forms" Version="4.3.0.947036" />
<PackageReference Include="Xamarin.Forms" Version="4.5.0.356" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Animation\Animation.csproj">
4 changes: 2 additions & 2 deletions listview-sample/Animation/Animation/Animation.csproj
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Syncfusion.Xamarin.SfListView" Version="17.3.0.26" />
<PackageReference Include="Xamarin.Forms" Version="4.3.0.947036" />
<PackageReference Include="Syncfusion.Xamarin.SfListView" Version="17.4.0.55" />
<PackageReference Include="Xamarin.Forms" Version="4.5.0.356" />
</ItemGroup>
</Project>
110 changes: 19 additions & 91 deletions listview-sample/Animation/Animation/View/MainPage.xaml
Original file line number Diff line number Diff line change
@@ -15,122 +15,50 @@
<RowDefinition Height="50" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>

<SearchBar x:Name="filterText"
Placeholder="Search here to filter"
Grid.Row="0">
<SearchBar.HeightRequest>
<OnPlatform x:TypeArguments="x:Double"
Android="50"
iOS="50">
<OnPlatform.WinPhone>
<OnIdiom x:TypeArguments="x:Double">
<OnIdiom.Phone>40</OnIdiom.Phone>
<OnIdiom.Tablet>40</OnIdiom.Tablet>
</OnIdiom>
</OnPlatform.WinPhone>
</OnPlatform>
</SearchBar.HeightRequest>
Placeholder="Search here to filter"
Grid.Row="0">
</SearchBar>

<listView:SfListView x:Name="listView" Grid.Row="1" ItemSize="60" AllowGroupExpandCollapse="True"
ItemsSource="{Binding CustomerDetails}">
<!--<listView:SfListView.DataSource>
<data:DataSource>
<data:DataSource.GroupDescriptors>
<data:GroupDescriptor PropertyName="ContactType" />
</data:DataSource.GroupDescriptors>
</data:DataSource>
</listView:SfListView.DataSource>-->
ItemsSource="{Binding CustomerDetails}">
<listView:SfListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<ViewCell.View>
<Grid x:Name="grid">
<Grid x:Name="itemTemplateGrid">
<Grid.GestureRecognizers>
<TapGestureRecognizer Command="{Binding Path=BindingContext.OnTap, Source={x:Reference listView}}" CommandParameter="{x:Reference itemTemplateGrid}"/>
</Grid.GestureRecognizers>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="1" />
</Grid.RowDefinitions>

<Grid Grid.Column="0"
RowSpacing="1"
Padding="0,0,0,0"
VerticalOptions="Start">
RowSpacing="1"
Padding="0,0,0,0"
VerticalOptions="Start">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>

<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>

<Label LineBreakMode="NoWrap"
Text="{Binding ContactName}"
FontAttributes="Bold"
TextColor="Teal">
<Label.FontSize>
<OnPlatform x:TypeArguments="x:Double">
<OnPlatform.WinPhone>
<OnIdiom x:TypeArguments="x:Double" Phone="18" Tablet="20" />
</OnPlatform.WinPhone>
<OnPlatform.Android>
<OnIdiom x:TypeArguments="x:Double"
Phone="16"
Tablet="18" />
</OnPlatform.Android>
<OnPlatform.iOS>
<OnIdiom x:TypeArguments="x:Double"
Phone="18"
Tablet="20" />
</OnPlatform.iOS>
</OnPlatform>
</Label.FontSize>
Text="{Binding ContactName}"
FontAttributes="Bold"
TextColor="Teal">
</Label>
<Label Grid.Row="1"
Grid.Column="0"
LineBreakMode="NoWrap"
Text="{Binding ContactNumber}"
TextColor="Teal">
<Label.FontSize>
<OnPlatform x:TypeArguments="x:Double">
<OnPlatform.WinPhone>
<OnIdiom x:TypeArguments="x:Double" Phone="12" Tablet="12" />
</OnPlatform.WinPhone>
<OnPlatform.Android>
<OnIdiom x:TypeArguments="x:Double"
Phone="12"
Tablet="14" />
</OnPlatform.Android>
<OnPlatform.iOS>
<OnIdiom x:TypeArguments="x:Double"
Phone="12"
Tablet="14" />
</OnPlatform.iOS>
</OnPlatform>
</Label.FontSize>
Grid.Column="0"
LineBreakMode="NoWrap"
Text="{Binding ContactNumber}"
TextColor="Teal">
</Label>
<Label LineBreakMode="NoWrap"
Text="{Binding ContactType}"
TextColor="Teal" Grid.Row="0" Grid.Column="1" VerticalTextAlignment="End" XAlign="End" YAlign="End" Margin="5" >
<Label.FontSize>
<OnPlatform x:TypeArguments="x:Double">
<OnPlatform.WinPhone>
<OnIdiom x:TypeArguments="x:Double" Phone="10" Tablet="11" />
</OnPlatform.WinPhone>
<OnPlatform.Android>
<OnIdiom x:TypeArguments="x:Double"
Phone="10"
Tablet="12" />
</OnPlatform.Android>
<OnPlatform.iOS>
<OnIdiom x:TypeArguments="x:Double"
Phone="10"
Tablet="12" />
</OnPlatform.iOS>
</OnPlatform>
</Label.FontSize>
Text="{Binding ContactType}"
TextColor="Teal" Grid.Row="0" Grid.Column="1" VerticalTextAlignment="End" XAlign="End" YAlign="End" Margin="5" >
</Label>
</Grid>
<StackLayout Grid.Row="1" BackgroundColor="Gray" HeightRequest="1"/>
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Text;
using Xamarin.Forms;

namespace Animation
{
@@ -14,7 +15,7 @@ public ObservableCollection<Contacts> CustomerDetails
get;
set;
}

public Command<object> OnTap { get; }
#endregion

#region Fields
@@ -28,6 +29,7 @@ public ObservableCollection<Contacts> CustomerDetails
public ContactsViewModel()
{
this.GetContactDetails(20);
OnTap = new Command<object>(OnTapped);
}

#endregion
@@ -49,6 +51,16 @@ private void GetContactDetails(int count)
CustomerDetails.Add(details);
}
}
private async void OnTapped(object obj)
{
var itemTemplateGrid = obj as Grid;
var item = itemTemplateGrid.BindingContext as Contacts;

itemTemplateGrid.Opacity = 0;
await itemTemplateGrid.FadeTo(1, 1000, Easing.SinInOut);

this.CustomerDetails.Remove(item);
}

#endregion