Skip to content

Commit

Permalink
Merge pull request #55 from muak/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
muak committed Jan 16, 2019
2 parents f4a16ab + 0d60062 commit 8415142
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 12 deletions.
4 changes: 2 additions & 2 deletions Sample/Sample.Droid/Sample.Droid.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,10 @@
<HintPath>..\packages\Xamarin.Forms.3.0.0.482510\lib\MonoAndroid10\Xamarin.Forms.Xaml.dll</HintPath>
</Reference>
<Reference Include="AiForms.Effects">
<HintPath>..\packages\AiForms.Effects.1.4.0-pre\lib\MonoAndroid\AiForms.Effects.dll</HintPath>
<HintPath>..\packages\AiForms.Effects.1.4.5-pre\lib\MonoAndroid\AiForms.Effects.dll</HintPath>
</Reference>
<Reference Include="AiForms.Effects.Droid">
<HintPath>..\packages\AiForms.Effects.1.4.0-pre\lib\MonoAndroid\AiForms.Effects.Droid.dll</HintPath>
<HintPath>..\packages\AiForms.Effects.1.4.5-pre\lib\MonoAndroid\AiForms.Effects.Droid.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Sample/Sample.Droid/packages.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="AiForms.Effects" version="1.4.0-pre" targetFramework="monoandroid90" />
<package id="AiForms.Effects" version="1.4.5-pre" targetFramework="monoandroid90" />
<package id="AiForms.Layouts" version="1.0.4" targetFramework="monoandroid81" />
<package id="CommonServiceLocator" version="1.3" targetFramework="monoandroid71" />
<package id="Microsoft.NETCore.Platforms" version="1.0.1" targetFramework="monoandroid81" />
Expand Down
4 changes: 2 additions & 2 deletions Sample/Sample.iOS/Sample.iOS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,10 @@
<HintPath>..\packages\Xamarin.Forms.3.0.0.482510\lib\Xamarin.iOS10\Xamarin.Forms.Xaml.dll</HintPath>
</Reference>
<Reference Include="AiForms.Effects">
<HintPath>..\packages\AiForms.Effects.1.4.0-pre\lib\Xamarin.iOS10\AiForms.Effects.dll</HintPath>
<HintPath>..\packages\AiForms.Effects.1.4.5-pre\lib\Xamarin.iOS10\AiForms.Effects.dll</HintPath>
</Reference>
<Reference Include="AiForms.Effects.iOS">
<HintPath>..\packages\AiForms.Effects.1.4.0-pre\lib\Xamarin.iOS10\AiForms.Effects.iOS.dll</HintPath>
<HintPath>..\packages\AiForms.Effects.1.4.5-pre\lib\Xamarin.iOS10\AiForms.Effects.iOS.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Sample/Sample.iOS/packages.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="AiForms.Effects" version="1.4.0-pre" targetFramework="xamarinios10" />
<package id="AiForms.Effects" version="1.4.5-pre" targetFramework="xamarinios10" />
<package id="AiForms.Layouts" version="1.0.4" targetFramework="xamarinios10" />
<package id="CommonServiceLocator" version="1.3" targetFramework="xamarinios10" />
<package id="Microsoft.NETCore.Platforms" version="1.0.1" targetFramework="xamarinios10" />
Expand Down
2 changes: 1 addition & 1 deletion Sample/Sample/Sample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<PackageReference Include="ReactiveProperty" Version="4.2.2" />

<PackageReference Include="Xamarin.Forms" Version="3.0.0.482510" />
<PackageReference Include="AiForms.Effects" Version="1.4.0-pre" />
<PackageReference Include="AiForms.Effects" Version="1.4.5-pre" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\SettingsView\SettingsView.csproj" />
Expand Down
8 changes: 6 additions & 2 deletions Sample/Sample/ViewModels/PickerSurveyViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,13 @@ public class PickerSurveyViewModel:BindableBase,INavigatingAware
string[] listLetters = { "a", "b", "c", "d", "e" };
string[] listNumbers = { "1", "2", "3", "4", "5" };

public PickerSurveyViewModel()
public ReactiveCommand TestCommand { get; } = new ReactiveCommand();

public PickerSurveyViewModel(INavigationService navigationService)
{

TestCommand.Subscribe(async _ => {
await navigationService.NavigateAsync("/MyNavigationPage/MainPage/PickerSurvey", null, true, true);
});
}

public void OnNavigatingTo(NavigationParameters parameters)
Expand Down
6 changes: 4 additions & 2 deletions Sample/Sample/Views/PickerSurvey.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:sv="clr-namespace:AiForms.Renderers;assembly=SettingsView"
xmlns:aie="clr-namespace:AiForms.Effects;assembly=AiForms.Effects"
x:Class="Sample.Views.PickerSurvey" x:Name="Me">

<ContentPage.Resources>
Expand Down Expand Up @@ -55,12 +56,12 @@
</ResourceDictionary>
</ContentPage.Resources>

<sv:SettingsView HeaderHeight="0" BackgroundColor="White" HasUnevenRows="true" RowHeight="44"
<sv:SettingsView HeaderHeight="0" BackgroundColor="White" HasUnevenRows="false" RowHeight="44"
x:Name="settings" CellBackgroundColor="Transparent" SelectedColor="Red">

<sv:Section>
<ViewCell>
<StackLayout Padding="10,10,10,10" Orientation="Horizontal" Spacing="20">
<StackLayout Padding="10,10,10,10" Orientation="Horizontal" Spacing="20" aie:Feedback.EffectColor="Blue">
<BoxView WidthRequest="20" />
<Label Text="ああああああああああああああ" TextColor="Black" />
</StackLayout>
Expand All @@ -71,6 +72,7 @@
<Label Text="あああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああ" TextColor="Black" />
</StackLayout>
</ViewCell>
<sv:CommandCell Title="Move" Command="{Binding TestCommand}" />
</sv:Section>
</sv:SettingsView>

Expand Down
8 changes: 7 additions & 1 deletion SettingsView.Droid/SettingsViewRecyclerAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,13 @@ protected override void Dispose(bool disposing)
if (disposing)
{
var nativeCell = Body.GetChildAt(0);
nativeCell?.Dispose();
if(nativeCell is INativeElementView nativeElementView) {
// If a ViewCell is used, it stops the ViewCellContainer from executing the dispose method.
// Because if the AiForms.Effects is used and a ViewCellContainer is disposed, it crashes.
if (!(nativeElementView.Element is ViewCell)) {
nativeCell?.Dispose();
}
}
Border?.Dispose();
Border = null;
Body?.Dispose();
Expand Down
1 change: 1 addition & 0 deletions nuget/AzurePipelines.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ There are various cells such as (LabelCell,ButtonCell,CommandCell,SwitchCell,Che
## Bug fixes

* [Android] When SettingsView.HasUnevenrows is true and a ViewCell is used and FormsView's height is smaller than the RowHeight, the Cell is not filled.
* [Others] When the AiForms.Effects.Feedback is used, it sometimes crashes.
</releaseNotes>
<tags>Xamarin.Forms TableView Cell Setting Configuration Option ListView UITableView RecyclerView ReOrder DragDrop</tags>
<language>en-US</language>
Expand Down

0 comments on commit 8415142

Please sign in to comment.