Skip to content

Commit

Permalink
> Update all nugets
Browse files Browse the repository at this point in the history
> DemoImageWallView, use a StackLayout instead of Absolute...way easier!
> DemoRatingsView Add a iOS only back button
> App.xaml, set the base root navigation page to be the MainView so "Pop" always gets you back to that page
> WallView, explicitly call Height and WidthRequest so that StackLayout and other layout managers can know the view's preferred size. Also, OnSizeAllocated gets called multiple times, make sure that 'UpdateViewModels' is only called once and only when the width & height change (i.e. initially and on resize)
  • Loading branch information
jasonCodesAway committed Oct 1, 2016
1 parent da73d79 commit 5b05aaf
Show file tree
Hide file tree
Showing 22 changed files with 105 additions and 73 deletions.
23 changes: 16 additions & 7 deletions XamJam.Demo/XamJam.Demo.Droid/Resources/Resource.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions XamJam.Demo/XamJam.Demo.Droid/XamJam.Demo.Droid.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,19 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="FFImageLoading, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Xamarin.FFImageLoading.2.1.7\lib\MonoAndroid10\FFImageLoading.dll</HintPath>
<HintPath>..\..\packages\Xamarin.FFImageLoading.2.1.8\lib\MonoAndroid10\FFImageLoading.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="FFImageLoading.Forms, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Xamarin.FFImageLoading.Forms.2.1.7\lib\MonoAndroid10\FFImageLoading.Forms.dll</HintPath>
<HintPath>..\..\packages\Xamarin.FFImageLoading.Forms.2.1.8\lib\MonoAndroid10\FFImageLoading.Forms.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="FFImageLoading.Forms.Droid, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Xamarin.FFImageLoading.Forms.2.1.7\lib\MonoAndroid10\FFImageLoading.Forms.Droid.dll</HintPath>
<HintPath>..\..\packages\Xamarin.FFImageLoading.Forms.2.1.8\lib\MonoAndroid10\FFImageLoading.Forms.Droid.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="FFImageLoading.Platform, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Xamarin.FFImageLoading.2.1.7\lib\MonoAndroid10\FFImageLoading.Platform.dll</HintPath>
<HintPath>..\..\packages\Xamarin.FFImageLoading.2.1.8\lib\MonoAndroid10\FFImageLoading.Platform.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="FormsViewGroup, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
Expand Down Expand Up @@ -136,19 +136,19 @@
<Private>True</Private>
</Reference>
<Reference Include="XamSvg.Droid, Version=1.1.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Vapolia.XamSvg.Forms.2.3.0.8\lib\MonoAndroid44\XamSvg.Droid.dll</HintPath>
<HintPath>..\..\packages\Vapolia.XamSvg.Forms.2.3.2.2\lib\MonoAndroid44\XamSvg.Droid.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="XamSvg.Shared, Version=1.0.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Vapolia.XamSvg.Forms.2.3.0.8\lib\MonoAndroid44\XamSvg.Shared.dll</HintPath>
<HintPath>..\..\packages\Vapolia.XamSvg.Forms.2.3.2.2\lib\MonoAndroid44\XamSvg.Shared.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="XamSvg.XamForms, Version=1.0.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Vapolia.XamSvg.Forms.2.3.0.8\lib\MonoAndroid44\XamSvg.XamForms.dll</HintPath>
<HintPath>..\..\packages\Vapolia.XamSvg.Forms.2.3.2.2\lib\MonoAndroid44\XamSvg.XamForms.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="XamSvg.XamForms.Droid, Version=1.0.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Vapolia.XamSvg.Forms.2.3.0.8\lib\MonoAndroid44\XamSvg.XamForms.Droid.dll</HintPath>
<HintPath>..\..\packages\Vapolia.XamSvg.Forms.2.3.2.2\lib\MonoAndroid44\XamSvg.XamForms.Droid.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
Expand Down
8 changes: 4 additions & 4 deletions XamJam.Demo/XamJam.Demo.Droid/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<package id="Fody" version="1.29.4" targetFramework="monoandroid60" developmentDependency="true" />
<package id="MR.Gestures" version="1.3.5" targetFramework="monoandroid60" />
<package id="PropertyChanged.Fody" version="1.51.3" targetFramework="monoandroid60" developmentDependency="true" />
<package id="Softlion.XamSvg" version="2.3.1.4" targetFramework="monoandroid60" />
<package id="Vapolia.XamSvg.Forms" version="2.3.0.8" targetFramework="monoandroid60" />
<package id="Softlion.XamSvg" version="2.3.2.2" targetFramework="monoandroid70" />
<package id="Vapolia.XamSvg.Forms" version="2.3.2.2" targetFramework="monoandroid70" />
<package id="Xamarin.Android.Support.Animated.Vector.Drawable" version="23.3.0" targetFramework="monoandroid60" />
<package id="Xamarin.Android.Support.Design" version="23.3.0" targetFramework="monoandroid60" />
<package id="Xamarin.Android.Support.v4" version="23.3.0" targetFramework="monoandroid60" />
Expand All @@ -13,7 +13,7 @@
<package id="Xamarin.Android.Support.v7.MediaRouter" version="23.3.0" targetFramework="monoandroid60" />
<package id="Xamarin.Android.Support.v7.RecyclerView" version="23.3.0" targetFramework="monoandroid60" />
<package id="Xamarin.Android.Support.Vector.Drawable" version="23.3.0" targetFramework="monoandroid60" />
<package id="Xamarin.FFImageLoading" version="2.1.7" targetFramework="monoandroid60" />
<package id="Xamarin.FFImageLoading.Forms" version="2.1.7" targetFramework="monoandroid60" />
<package id="Xamarin.FFImageLoading" version="2.1.8" targetFramework="monoandroid70" />
<package id="Xamarin.FFImageLoading.Forms" version="2.1.8" targetFramework="monoandroid70" />
<package id="Xamarin.Forms" version="2.3.2.127" targetFramework="monoandroid60" />
</packages>
16 changes: 8 additions & 8 deletions XamJam.Demo/XamJam.Demo.iOS/XamJam.Demo.iOS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -117,19 +117,19 @@
</ItemGroup>
<ItemGroup>
<Reference Include="FFImageLoading, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Xamarin.FFImageLoading.2.1.7\lib\Xamarin.iOS10\FFImageLoading.dll</HintPath>
<HintPath>..\..\packages\Xamarin.FFImageLoading.2.1.8\lib\Xamarin.iOS10\FFImageLoading.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="FFImageLoading.Forms, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Xamarin.FFImageLoading.Forms.2.1.7\lib\Xamarin.iOS10\FFImageLoading.Forms.dll</HintPath>
<HintPath>..\..\packages\Xamarin.FFImageLoading.Forms.2.1.8\lib\Xamarin.iOS10\FFImageLoading.Forms.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="FFImageLoading.Forms.Touch, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Xamarin.FFImageLoading.Forms.2.1.7\lib\Xamarin.iOS10\FFImageLoading.Forms.Touch.dll</HintPath>
<HintPath>..\..\packages\Xamarin.FFImageLoading.Forms.2.1.8\lib\Xamarin.iOS10\FFImageLoading.Forms.Touch.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="FFImageLoading.Platform, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Xamarin.FFImageLoading.2.1.7\lib\Xamarin.iOS10\FFImageLoading.Platform.dll</HintPath>
<HintPath>..\..\packages\Xamarin.FFImageLoading.2.1.8\lib\Xamarin.iOS10\FFImageLoading.Platform.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="MR.Gestures, Version=1.3.5.0, Culture=neutral, processorArchitecture=MSIL">
Expand Down Expand Up @@ -169,19 +169,19 @@
</Reference>
<Reference Include="Xamarin.iOS" />
<Reference Include="XamSvg.Ios, Version=1.1.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Vapolia.XamSvg.Forms.2.3.0.8\lib\Xamarin.iOS\XamSvg.Ios.dll</HintPath>
<HintPath>..\..\packages\Vapolia.XamSvg.Forms.2.3.2.2\lib\Xamarin.iOS\XamSvg.Ios.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="XamSvg.Shared, Version=1.0.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Vapolia.XamSvg.Forms.2.3.0.8\lib\Xamarin.iOS\XamSvg.Shared.dll</HintPath>
<HintPath>..\..\packages\Vapolia.XamSvg.Forms.2.3.2.2\lib\Xamarin.iOS\XamSvg.Shared.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="XamSvg.XamForms, Version=1.0.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Vapolia.XamSvg.Forms.2.3.0.8\lib\Xamarin.iOS\XamSvg.XamForms.dll</HintPath>
<HintPath>..\..\packages\Vapolia.XamSvg.Forms.2.3.2.2\lib\Xamarin.iOS\XamSvg.XamForms.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="XamSvg.XamForms.iOS, Version=1.0.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Vapolia.XamSvg.Forms.2.3.0.8\lib\Xamarin.iOS\XamSvg.XamForms.iOS.dll</HintPath>
<HintPath>..\..\packages\Vapolia.XamSvg.Forms.2.3.2.2\lib\Xamarin.iOS\XamSvg.XamForms.iOS.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
Expand Down
8 changes: 4 additions & 4 deletions XamJam.Demo/XamJam.Demo.iOS/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
<package id="Fody" version="1.29.4" targetFramework="xamarinios10" developmentDependency="true" />
<package id="MR.Gestures" version="1.3.5" targetFramework="xamarinios10" />
<package id="PropertyChanged.Fody" version="1.51.3" targetFramework="xamarinios10" developmentDependency="true" />
<package id="Softlion.XamSvg" version="2.3.1.4" targetFramework="xamarinios10" />
<package id="Vapolia.XamSvg.Forms" version="2.3.0.8" targetFramework="xamarinios10" />
<package id="Softlion.XamSvg" version="2.3.2.2" targetFramework="xamarinios10" />
<package id="Vapolia.XamSvg.Forms" version="2.3.2.2" targetFramework="xamarinios10" />
<package id="WebP.Touch" version="1.0.2" targetFramework="xamarinios10" />
<package id="Xamarin.FFImageLoading" version="2.1.7" targetFramework="xamarinios10" />
<package id="Xamarin.FFImageLoading.Forms" version="2.1.7" targetFramework="xamarinios10" />
<package id="Xamarin.FFImageLoading" version="2.1.8" targetFramework="xamarinios10" />
<package id="Xamarin.FFImageLoading.Forms" version="2.1.8" targetFramework="xamarinios10" />
<package id="Xamarin.Forms" version="2.3.2.127" targetFramework="xamarinios10" />
</packages>
4 changes: 2 additions & 2 deletions XamJam.Demo/XamJam.Demo/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ private static IDestination<INavScheme>[] CreateDestinations(Navigator navigator
var navScheme = new NavigationScheme(RootScheme.Singleton);
return new IDestination<INavScheme>[]
{
new RootDestination<MainViewModel>(RootScheme.Singleton, new MainViewModel(navigator), new MainView()),
new NavigationDestination<MainViewModel>(navScheme, new MainViewModel(navigator), new MainView()),
new NavigationDestination<DemoImageWallViewModel>(navScheme, new DemoImageWallViewModel(navigator), new DemoImageWallView(navigator)),
new NavigationDestination<DemoRatingsViewModel>(navScheme, new DemoRatingsViewModel(), new DemoRatingsView()),
new NavigationDestination<DemoRatingsViewModel>(navScheme, new DemoRatingsViewModel(navigator), new DemoRatingsView()),
new NavigationDestination<DemoImageSingleViewModel>(navScheme, new DemoImageSingleViewModel(navigator), new DemoImageSingleView())
};
}
Expand Down
4 changes: 0 additions & 4 deletions XamJam.Demo/XamJam.Demo/GettingStarted.Xamarin

This file was deleted.

10 changes: 5 additions & 5 deletions XamJam.Demo/XamJam.Demo/View/DemoImageWallView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:wall="clr-namespace:XamJam.Wall;assembly=XamJam.Wall"
x:Class="XamJam.Demo.View.DemoImageWallView">
<AbsoluteLayout>
<wall:WallView ViewModelCreator="{Binding ViewModelCreator}" ViewCreator="{Binding ViewCreator}" WallSizer="{Binding WallSizer}" MaxCacheSize="20" AbsoluteLayout.LayoutBounds="0,0,1,1" AbsoluteLayout.LayoutFlags="All"/>
<Button Text="back" Command="{Binding BackCommand}" BackgroundColor="White" AbsoluteLayout.LayoutBounds="0,0,10,10" AbsoluteLayout.LayoutFlags="None">
<StackLayout>
<wall:WallView VerticalOptions="CenterAndExpand" HorizontalOptions="CenterAndExpand" ViewModelCreator="{Binding ViewModelCreator}" ViewCreator="{Binding ViewCreator}" WallSizer="{Binding WallSizer}" MaxCacheSize="20"/>
<Button VerticalOptions="End" Text="back" Command="{Binding BackCommand}">
<Button.IsVisible>
<OnPlatform x:TypeArguments="x:Boolean" iOS="True" Android="False" WinPhone="False"/>
</Button.IsVisible>
</Button>
</AbsoluteLayout>
</Button>
</StackLayout>
</ContentView>
6 changes: 5 additions & 1 deletion XamJam.Demo/XamJam.Demo/View/DemoRatingsView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
<StackLayout>
<Label Text="Welcome to Ratings"/>
<ratings:RatingView BindingContext="{Binding RatingViewModel}"/>
<Label Text="..."/>
<Button Text="Back" Command="{Binding BackCommand}">
<Button.IsVisible>
<OnPlatform x:TypeArguments="x:Boolean" iOS="True" Android="False" WinPhone="False"/>
</Button.IsVisible>
</Button>
</StackLayout>
</ContentView>
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,10 @@ await navigator.ShowAsync<DemoImageSingleViewModel>(vm =>
});
});
}

public override string ToString()
{
return ImageText;
}
}
}
9 changes: 9 additions & 0 deletions XamJam.Demo/XamJam.Demo/ViewModel/DemoRatingsViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,21 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
using XamJam.Nav;
using XamJam.Ratings;

namespace XamJam.Demo.ViewModel
{
public class DemoRatingsViewModel
{
public RatingViewModel RatingViewModel { get; } = new RatingViewModel();

public Command BackCommand { get; }

public DemoRatingsViewModel(Navigator nav)
{
BackCommand = nav.BackAsyncCommand;
}
}
}
11 changes: 5 additions & 6 deletions XamJam.Demo/XamJam.Demo/XamJam.Demo.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -67,20 +67,19 @@
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="GettingStarted.Xamarin" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Reference Include="FFImageLoading, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Xamarin.FFImageLoading.2.1.7\lib\portable-net45+win8+wpa81+wp8\FFImageLoading.dll</HintPath>
<HintPath>..\..\packages\Xamarin.FFImageLoading.2.1.8\lib\portable-net45+win8+wpa81+wp8\FFImageLoading.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="FFImageLoading.Forms, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Xamarin.FFImageLoading.Forms.2.1.7\lib\portable-net45+win8+wpa81+wp8\FFImageLoading.Forms.dll</HintPath>
<HintPath>..\..\packages\Xamarin.FFImageLoading.Forms.2.1.8\lib\portable-net45+win8+wpa81+wp8\FFImageLoading.Forms.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="FFImageLoading.Platform, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Xamarin.FFImageLoading.2.1.7\lib\portable-net45+win8+wpa81+wp8\FFImageLoading.Platform.dll</HintPath>
<HintPath>..\..\packages\Xamarin.FFImageLoading.2.1.8\lib\portable-net45+win8+wpa81+wp8\FFImageLoading.Platform.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="MR.Gestures, Version=1.3.5.0, Culture=neutral, processorArchitecture=MSIL">
Expand All @@ -104,11 +103,11 @@
<Private>True</Private>
</Reference>
<Reference Include="XamSvg.Shared, Version=1.0.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>$(SolutionDir)\packages\Vapolia.XamSvg.Forms.2.3.0.8\lib\portable-win8+net45+wp8+wpa81+MonoAndroid44+Xamarin.iOS10\XamSvg.Shared.dll</HintPath>
<HintPath>..\..\packages\Vapolia.XamSvg.Forms.2.3.2.2\lib\portable-win8+net45+wp8+wpa81+MonoAndroid44+Xamarin.iOS10\XamSvg.Shared.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="XamSvg.XamForms, Version=1.0.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>$(SolutionDir)\packages\Vapolia.XamSvg.Forms.2.3.0.8\lib\portable-win8+net45+wp8+wpa81+MonoAndroid44+Xamarin.iOS10\XamSvg.XamForms.dll</HintPath>
<HintPath>..\..\packages\Vapolia.XamSvg.Forms.2.3.2.2\lib\portable-win8+net45+wp8+wpa81+MonoAndroid44+Xamarin.iOS10\XamSvg.XamForms.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions XamJam.Demo/XamJam.Demo/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<package id="Fody" version="1.29.4" targetFramework="portable45-net45+win8+wpa81" developmentDependency="true" />
<package id="MR.Gestures" version="1.3.5" targetFramework="portable45-net45+win8+wpa81" />
<package id="PropertyChanged.Fody" version="1.51.3" targetFramework="portable45-net45+win8+wpa81" developmentDependency="true" />
<package id="Vapolia.XamSvg.Forms" version="2.3.0.8" targetFramework="portable45-net45+win8+wpa81" />
<package id="Xamarin.FFImageLoading" version="2.1.7" targetFramework="portable45-net45+win8+wpa81" />
<package id="Xamarin.FFImageLoading.Forms" version="2.1.7" targetFramework="portable45-net45+win8+wpa81" />
<package id="Vapolia.XamSvg.Forms" version="2.3.2.2" targetFramework="portable45-net45+win8+wpa81" />
<package id="Xamarin.FFImageLoading" version="2.1.8" targetFramework="portable45-net45+win8+wpa81" />
<package id="Xamarin.FFImageLoading.Forms" version="2.1.8" targetFramework="portable45-net45+win8+wpa81" />
<package id="Xamarin.Forms" version="2.3.2.127" targetFramework="portable45-net45+win8+wpa81" />
</packages>
Loading

0 comments on commit 5b05aaf

Please sign in to comment.