Xamarin.Forms 2.0.0 Service Release 1

TheRealJasonSmithTheRealJasonSmith XamuraiUSXamarin Team Xamurai

We will be calling post release updates from now on Service Releases instead of hotfixes to match naming with platform.

Bug Fixes

  • [WinRT] IsVisible sometimes not respected
  • [WinRT] Scrolling sometimes not responsive
  • [WinRT] Fix issue with images sometimes not showing up
  • [Android] Default text size for Entry/Editor restored
«1

Posts

  • NMackayNMackay mod GBInsider, University mod

    +1 for service releases.

    Really helps with planning for release cycles.

  • EdrianEdrian ✭✭ PHUniversity ✭✭

    Awesome xamarin team!

  • JKayJKay ✭✭✭ USMember ✭✭✭
    edited December 2015

    Sorry to be 'That guy' but

    Be good to get this looked at: Xamarin Forms Maps V2 nuget dependency to the wrong xamarin.GooglePlay.Maps

    It's a 2 minute job of changing

    Xamarin.GooglePlayServices.Maps (= 26.0.0.0)

    to

    Xamarin.GooglePlayServices.Maps (>= 26.0.0.0)

    on the Xamarin.Forms.Maps nuget package.

    It causes clashing nuget package which breaks your whole solution (which I myself have managed to solve) but could cause a lot of pain for others (more info on bugs / solutions bugzilla report)

  • rmarinhormarinho Xamurai PTMember, Insider, Beta Xamurai

    Hi @JKay we have looked at the problem and we aren't changing our explicit requirement, we are updating to require maps 27 in the next pre release though.
    We analysed the problem and we think we have more benefits on requiring the specific version of google.

    The problem some users are getting isn't directly related with XF but will the IDE and the way the IDE is handling the packages. For now it seems more a XS issue, where if you have the 27 folder (for some reason) it will not downgrade or delete the 27 , you have to do it manually. And most of users aren't affected with the problem.

  • JKayJKay ✭✭✭ USMember ✭✭✭

    @rmarinho Thanks for the update. That sheds more info on the problem and helps me understand. If anyone gets the issue for now they can look at the solutions in the bugzilla thread.

  • NMackayNMackay mod GBInsider, University mod

    @rmarinho said:
    Hi @JKay we have looked at the problem and we aren't changing our explicit requirement, we are updating to require maps 27 in the next pre release though.
    We analysed the problem and we think we have more benefits on requiring the specific version of google.

    The problem some users are getting isn't directly related with XF but will the IDE and the way the IDE is handling the packages. For now it seems more a XS issue, where if you have the 27 folder (for some reason) it will not downgrade or delete the 27 , you have to do it manually. And most of users aren't affected with the problem.

    Hi,

    I just got this in VS2013 (SP5) when trying to update to 2.0 SR1 (see attached).

  • NMackayNMackay mod GBInsider, University mod

    @JKay

    I appreciate you post, I was half way through before I saw it.

    I manually uninstalled Forms and Maps, restarted Visual Studio to make sure they were away...removed it again, nuked the packages folder apart from packages.config. Restarted VS, restored packages, installed Forms in PCL then Droid and iOS via console, same order for Maps and it worked fine, it installed GooglePlayServices.Maps V26 not 27.

  • JKayJKay ✭✭✭ USMember ✭✭✭
    edited December 2015

    Overriding ListView and using it in Xaml with the CachingStrategy property set breaks XamlC

    public class ExtendedListView : ListView
    {
        public ExtendedListView()
        {
    
        }
     }
    

    XAML

    <custom:ExtendedListView ItemsSource="{Binding Stuff}" SelectedItem="{Binding SelectedThing}" CachingStrategy="RecycleElement" HasUnevenRows="True"/>

    With the assembly declaration set:

    [assembly: XamlCompilation(XamlCompilationOptions.Compile)]

    gets the following error:

    Error Position 141:95. No property, bindable property, or event found for 'CachingStrategy'

    https://bugzilla.xamarin.com/show_bug.cgi?id=36415

    My current work around for this is to do:

        public class ExtendedListView : ListView
        {
            public ExtendedListView() : base(ListViewCachingStrategy.RecycleElement)
            {
    
            }
         }
    

    but it's slightly less flexible. It happens in my case that they all use RecycleElement. But just a heads up

  • StephaneDelcroixStephaneDelcroix ✭✭✭✭ USInsider, Beta ✭✭✭✭
    edited December 2015

    @JKay: no error here.

    XamlC report that there's no settable property for CachingStrategy, which is actually totally true. Even if it doesn't fail when XamlC is off, do not expect the CachingStrategy to be set according to what you expect.

    For ListView, we instructed our Xaml parser to treat CachingStrategy as a constructor argument, it's a trick to reduce syntax for the users. In your case, you want to use the x:Arguments XAML syntax

    <custom:ExtendedListView ...>
        <x:Arguments>
            <ListViewCachingStrategy>RecycleElement</ListViewCachingStrategy>
        </x:Arguments>
    
  • NMackayNMackay mod GBInsider, University mod
    edited December 2015

    @JKay

    I thought you could set the caching strategy in Xaml, can't see the property in intellisence. XamlC breaks my Listview so wanted to change the caching strategy to see if that was affecting it.

    :Edit
    Just seen the post above

  • JKayJKay ✭✭✭ USMember ✭✭✭

    @StephaneDelcroix You're totally right! I forgot ListViewCachingStrategy in Xaml is a bit of a trick. It's probably worth documenting that somewhere. Because I think ListViewCachingStrategy + XamlC could be a bit of a gotcha

  • NMackayNMackay mod GBInsider, University mod

    Yikes another project upgrade went awry, I didn't have maps so just updated via nuget UI, even though all references to forms resolved it wouldn't compile.

    Again,

    Manually remove Forms 1.5.1
    Close VS2013
    Nuke all nuget packages (just leave the config)
    Open VS2013 & project
    Restore packages
    Add Forms via package console, PCL 1st, then Droid & iOS
    Clean and exit
    Open and recompile and it all works.

    Wouldn't recommending updating in the usual way, leads to a world of hurt as @JKay said earlier.

  • KirillLyubimov.5134KirillLyubimov.5134 ✭✭ RUMember ✭✭

    Hello. Xamarin I updated to version 4, Forms and 2.0 versions. On Android, I use AppCompat.

    I had a problem. Previously, the Android keyboard caused resize view. Now this does not happen. The keyboard appears on the top view. And the desired Elements to be hiding.

    I've tried:

    [Activity(WindowSoftInputMode = SoftInput.AdjustResize, Label = "Title", Icon = "@drawable/icon", Theme = "@style/MyTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
        public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
        {
            protected override void OnCreate(Bundle bundle)
            {
                base.OnCreate(bundle);
    
                global::Xamarin.Forms.Forms.Init(this, bundle);
    
    
                ToolbarResource = Resource.Layout.toolbar;
                TabLayoutResource = Resource.Layout.tabs;
    
                LoadApplication(new App());
                Window.DecorView.SetFitsSystemWindows(true);
            }
        }
    
    

    Daylight AppCompat has been made on this lesson: https://blog.xamarin.com/material-design-for-your-xamarin-forms-android-apps/

    Thank you.
    imageimage

  • MichaelRumplerMichaelRumpler ✭✭✭✭✭ ATMember ✭✭✭✭✭

    @JKay said:
    @StephaneDelcroix You're totally right! I forgot ListViewCachingStrategy in Xaml is a bit of a trick. It's probably worth documenting that somewhere. Because I think ListViewCachingStrategy + XamlC could be a bit of a gotcha

    I'd prefer to change the internal property to be public. That way the Xaml property would simply work - also in inherited controls. Otherwise there will be a 2nd constructor property in the next version, then a 3rd, ...

    If somebody changes the property too late (when the renderer has been instantiated), then you can still just ignore it or throw an exception.

  • StephaneDelcroixStephaneDelcroix ✭✭✭✭ USInsider, Beta ✭✭✭✭

    @MichaelRumpler you get it wrong. There's no settable property, internal or public. That syntax is a shortcut for the x:Argument one.

  • MichaelRumplerMichaelRumpler ✭✭✭✭✭ ATMember ✭✭✭✭✭

    dotPeek tells me this:

    internal ListViewCachingStrategy CachingStrategy { get; private set; }
    

    And the constructor sets it:

    public ListView([Parameter("CachingStrategy")] ListViewCachingStrategy cachingStrategy)
      : this()
    {
      if (Device.OS != TargetPlatform.Android && Device.OS != TargetPlatform.iOS)
        return;
      this.CachingStrategy = cachingStrategy;
    }
    

    Unfortunately the ParameterAttribute is also internal so we can't use it in our own subclasses of ListView either (if that would be enough to get the Xaml work - I didn't check that).

  • MichaelRumplerMichaelRumpler ✭✭✭✭✭ ATMember ✭✭✭✭✭

    On UWP the app crashes when an Editor has focus and the back button is clicked.
    I created bug 36435.

  • rmarinhormarinho Xamurai PTMember, Insider, Beta Xamurai

    Thanks @MichaelRumpler , already found the problem.

  • AlessandroCaliaroAlessandroCaliaro ✭✭✭✭✭ ITMember ✭✭✭✭✭

    @rmarinho have you never seen a Community better than this? :wink:

  • rmarinhormarinho Xamurai PTMember, Insider, Beta Xamurai

    Hey @AlessandroCaliaro no! This is a fantastic community :)
    @MichaelRumpler we will have that fixed in 2.0.1-pre1

  • KappsKapps CAMember

    I don't think this is a 2.0 bug directly, but within the last couple of versions with the introduction of AppCompat it seems my app will randomly crash due to FormsFragmentPagerAdapter missing a constructor for Handle + Ownership:

    No constructor found for Xamarin.Forms.Platform.Android.AppCompat.FormsFragmentPagerAdapter`1::.ctor(System.IntPtr, Android.Runtime.JniHandleOwnership)
    

    Generally it seems to happens when doing an async operation and the page gets closed, but it's not easy to reproduce. I know at least for my own renderers when creating custom controls, I had to create something like:

    public MyControlRenderer(IntPtr Handle, JniHandleOwnership Resource) : base() {
                this.SetHandle(Handle, Resource);
            }
    
  • MichaelRumplerMichaelRumpler ✭✭✭✭✭ ATMember ✭✭✭✭✭

    Please provide the full version on NuGet in the next Service Release Notes so that we know that Service Release 1 = version 2.0.0.6490.

  • PaulJohnson.0531PaulJohnson.0531 ✭✭ GBMember ✭✭

    Does the service release on droid fix the issue that we use v27 rather than 26?

  • TheRealJasonSmithTheRealJasonSmith Xamurai USXamarin Team Xamurai

    you must use GPS 26.0.0, the next version of Forms will also pin the base package because of bugs in the GooglePlayServices packaging (we shouldn't need to do that).

  • rmarinhormarinho Xamurai PTMember, Insider, Beta Xamurai

    Hi guys please make sure you try out 2.0.1-pre1 on your project and point any issues you have / bugzilla links specific to failures on that version on the respective thread for 2.0.1-pre1 .

  • JOAOSerraJOAOSerra ✭✭ PTMember ✭✭

    2.0.0.6490 lacks a changelog :neutral: suddenly updating xamarin feels like playing Russian roulette

  • FranciscoGGFranciscoGG ✭✭ ESMember ✭✭

    Please guys add the fix of this bug to your next release: https://bugzilla.xamarin.com/show_bug.cgi?id=36566

    Thanks a lot.

  • NMackayNMackay mod GBInsider, University mod

    @StephaneDelcroix

    Are comments supported anymore?

    We sometimes but comments in the Xaml for Header, footer etc

    In the latest forms with XamlC enabled you get this error if you have this in your code

    <!-- Header -->

    No property, bindable property, or event found for 'Children'

    It used to work hence I lost a few hours tracing this down.

  • StephaneDelcroixStephaneDelcroix ✭✭✭✭ USInsider, Beta ✭✭✭✭

    @NMackay : this looks very strange to me, so I tested it. XML comments are correctly skipped with or without XamlC in. And that's to be expected as they are skipped at the XML parsing level.

    Could you please share your smallest sample triggering this issue for you, so we can track what's going on ?

    Thanks

  • NMackayNMackay mod GBInsider, University mod

    @StephaneDelcroix

    Thanks for getting back to me. Typically I can't recreate it :smile:

    It is compiling with comments now.

    I commented all the code out till I only had the ContentPage definition and it was still happening, it was only when I stripped the comments that it compiled, deleting obj & bin and %temp% folders made no difference.

    I'll keep an eye out for it as I know what to expect and if I ever see it I'll send you the Xaml.

    Thanks.

  • FokkeVermeulenOldFokkeVermeulenOld ✭✭ USMember ✭✭

    @TheRealJasonSmith @rmarinho
    Do you know when will be the next pre-release will be available?

    Have the bug here with Xamarin Forms Maps and Android.
    http://forums.xamarin.com/discussion/56281/xamarin-forms-maps-2-0-0-6484-hangs-or-crashes-on-android/p2

    Would be helpful for us

  • MiguelCervantesMiguelCervantes ✭✭✭ MXMember ✭✭✭
    edited December 2015

    I'm having an error doing the following:

    1.- ContentPage is loaded and on screen
    2.- On the constructor It subscribes to the messaging center, the method fires a DisplayAlert message(ok, cancel) if ok it pushesAsync a new ContentPage
    3.- User press ok on the display alert
    4.- OnDisappearing unsubcribes from the messaging center
    5.- When the new ContentPage is loaded and on screen the user taps the back button
    6.- Back to the first ContentPage the user tries to push again the button that fires the method of the messaging center, the method is fired but no displayAlert is shown.

    //First Page
    public FirstConentPage() { MessagingCenter.Subscribe<MyCustomView, string[]>(this, "DisplayAlertCustom", async (sender, values) =>{ bool isOK = await DisplayAlert(values[0], values[1], values[2], values[3]); //At point 6 debug reaches here but no DisplaAlert is shown on screen if(isOK) { await Navigation.PushAsync(new SecondPage()); } }); //ListView is created //Layout is created } private override OnDisappearing() { MessagingCenter.Unsubscribe<MyCustomView, string[]>(this, "DisplayAlertCustom"); base.OnDisappearing(); }

    Am I doing something wrong? Is it a bug? Am I going to have dinner with my family this christmas?

    Another thing I noticed is when the SecondPage is pushed the First Page constructor is fired again, is that normal?

  • DirkWilhelmDirkWilhelm ✭✭✭✭ USMember ✭✭✭✭

    @MiguelCervantes

    when you press the back button, the contructor of the previous page will not be called, since the page is still in the navigation stack.

    You think you have two options now:

    1. subscribe to the messaging center in OnAppearing of your first page

    or

    1. don't unsubscribe in OnDisappearing
  • MiguelCervantesMiguelCervantes ✭✭✭ MXMember ✭✭✭

    @DirkWilhelm I took first option and it worked! Thanks a lot! now let it snow!

  • NetworkappNetworkapp ✭✭ NLMember ✭✭

    Is there a bugzilla ticket for: "IsVisible sometimes not respected", because it still seems to exist on WP8. (Visible items that are set to false e.g. from a bindable property remain visible)

  • JKayJKay ✭✭✭ USMember ✭✭✭

    Is anyone else experiencing problems with Xamarin.Forms.Maps on Android 6 devices?

    I'm not getting a map on my Nexus 9 running Android 6

  • FokkeVermeulenOldFokkeVermeulenOld ✭✭ USMember ✭✭

    @JKay For me I didn't get it working too. I read here in the forum from one Xamarin Developer, that with the new pre release the problem with googleplayservices is solved.
    I hope they will release the new update as fast as possible. The last release was over a month ago and we are waiting with a release due to the maps problem

  • JKayJKay ✭✭✭ USMember ✭✭✭

    @FokkeVermeulen Good to hear its not just me. Would be good for someone from Xamarin to confirm this is an issue they know of.

    I'm not sure what I would even file if I were to file a Bugzilla report

Sign In or Register to comment.