Xamarin.Forms 1.3.4 Released

TheRealJasonSmithTheRealJasonSmith USXamarin Team Xamurai

Happy Mon... TUESDAY! Monday was a holiday here in the states, hence the release being on a Tuesday (if I dont work holidays how can I expect my team not to blah blah). Fresh off the pressed 1.3.4.

The only difference between this and 1.3.4-pre4 is a small fix to MasterDetailRenderer on Android to fix the unhooking of the back button event. Cheers!

Important Notes

This release contains an updated StackLayout layout engine. While this update passes all internal tests and deviated very little from the original layout logic, it is significant enough it is being called out. If you find new issues with your stack layouts please file a bug.

Enhancements

  • Reduce memory transactions when scrolling ListViews
  • Navigation push/pops will now auto-queue if done before the last one completes. This helps handle some race conditions.
  • iOS Dynamic cell sizing support

Bug Fixes

  • Bug 26809 - ToolbarItem not refreshing its name.
  • Bug 25897 - Java.Lang.IllegalStateException when using a ScrollView in a StackLayout of a ViewCell
  • Bug 26573 - AbsoluteLayout.LowerChild(view) not working on Windows Phone
  • Bug 26616 - iOS 1.3.2: NavigationPage.RemovePage not working correctly
  • Bug 25897 - Java.Lang.IllegalStateException when using a ScrollView in a StackLayout of a ViewCell
  • Bug 20738 - "Out of memory" error when implementing a button, building to device and rotating screen multiple times
  • Bug 25694 - Xaml binding on ToolbarItem.Text fails
  • Bug 21478 - Slider in ScrollView is not draggable
  • Bug 25787 - [Windows ] Date Picker is not working properly on windows phone.
  • Bug 25935 - Android WebView height incorrect using CSS 100 percent
  • Bug 22673 - Initially hidden BoxView when made visible does not render (but does take up space in the UI)
  • Bug 26614 - [Android] Image within custom renderer fails to display
  • Bug 26757 - StackLayout not handling children height correctly causing overlapped views.
  • Bug 25932 - WebView height returned by JQuery incorrect on Android API 19 and up
  • Bug 25328 - [Android] WebView Renderer does not render a

<

div> with fixed position

  • Bug 21862 - Software keyboard does not show up when we set Focus for Entry in Android

Other Fixes

  • Fix regression from 1.3.3 where Unfocus did not work on Android.
  • No longer crash if UINavigationBar.Appearance is used when NavigationPage.BarTextColor is set.
  • SearchBar.CancelButtonColor now works on Android
  • Picker.Focus now works on Windows Phone
  • Xaml now supports setting multiple triggers into a style.
  • x:Type markup syntax now works correctly for DataTrigger
  • Stack overflow when re-ordering tabs on iOS (tab re-ordering disabled by default)
  • iOS ViewCell re-use can fail if re-used to view with a different hierarchy

Posts

  • SteeveLeDreauSteeveLeDreau FRMember ✭✭

    Still no fix for the listview with webview bug https://bugzilla.xamarin.com/show_bug.cgi?id=26993

    That's a pain because i have to maintain 2 solutions : 1 for Android in 1.2.3 and one in 1.3.3 (1.3.4 asap :smile: ) for iOs. It's really boring as the navigation, the way i display alert aren't the same at all.

    So i loose interest about using xamarin forms because my code can't be shared anymore. I 've lost a lot of time trying to figure out why it was working on 1.2.3 and not in 1.3.x.

    What are the solutions to display a listview of html in Android except by using a ListView that display some WebView ?

    I hope the release where you 'll change the StackLayout won't crash all my apps since i use a lot of them.

    Thank you

  • DH_HA1DH_HA1 USMember ✭✭✭

    @SteeveLeDreau it is not really a good practice to use WebViews in ListViews. WebViews are heavy controls and are meant to take up the whole screen. If you have just web text to display consider using the Label Formatted Text

  • SteeveLeDreauSteeveLeDreau FRMember ✭✭
    edited February 2015

    @DH_HA i know. If it was only about me i would get rid off them. But the fact is that the content that I display in a webview came from our CMS where all our users can add some news etc inside a HTML editor. We can't change all our software because that would means to change our website too that used also this content.
    We can't neither use a parser to change the content of our custumers database to remove all the content they wrote.

    Our software is used since 10 years and we have hundreds customers (and database). You can imagine the amount of work required to get rid of the HTML editor and so the webview inside the listview. Plus, our customers won't understand why they can't integrate an image or put some string in red (even it's awefull) because they paid this features :neutral:

    Btw, when i said "So i loose interest" you may read "my boss is loosing interest". Even if Xamarin is an amazing product and i never enjoyed developping so much, for my boss, paying 3k $ / year is way too expensive if we can't be sure it has strong release, no regression etc.

    Else, as he said, we would have used Titanium instead which is awesome too.

    And if you tell me that I can't do it in Xamarin Forms whereas i can in Titanium and even more : Phonegapp. I'll start watching Xamarin a different way ^_^

  • DH_HA1DH_HA1 USMember ✭✭✭

    @SteeveLeDreau understood. I have used Titanium for years and you would run into the same issue. At least with Xamarin.Forms you have the ability to easily write your own custom web view to handle this. It is much harder to write custom Titanium modules to extend their platform.

  • SteeveLeDreauSteeveLeDreau FRMember ✭✭

    @DH_HA yes you are right. That's one of the reseaon why i beg my boss to pick Xamarin instead of Titanium. The main one was because i'm an old Silverlight Developper and i loved all the stuff Miguel de Icaza done with MoonLight :smiley:

  • Great release!

  • EricGroverEricGrover USMember ✭✭
    edited February 2015

    When I try and update the Xamarin.Forms.Maps Nuget (after upgrading Xamarin.Forms to 1.3.4), I get:

    Could not install package 'Xamarin.Android.Support.v7.AppCompat 21.0.3.0'. You are trying to install this package into a project that targets 'MonoAndroid,Version=v2.2', but the package does not contain any assembly references or content
    files that are compatible with that framework. For more information, contact the package author.

    My Android project is targeting 4.0.3 (15).

  • TheRealJasonSmithTheRealJasonSmith USXamarin Team Xamurai

    @EricGrover, this can happen on VS if your API version for anything is set to latest. Is that the case?

  • 2BitNerd2BitNerd USMember ✭✭

    Since the update, I'm unable to build my Android project in Release mode. The following error appears during the build:

    Error 149 The "LinkAssemblies" task failed unexpectedly.
    Xamarin.Android.XamarinAndroidException: error XA2006: Reference to metadata item 'System.Void Android.Widget.AbsListView::SetSelectionFromTop(System.Int32,System.Int32)' (defined in 'Xamarin.Forms.Platform.Android, Version=1.3.4.0, Culture=neutral, PublicKeyToken=null') from 'Xamarin.Forms.Platform.Android, Version=1.3.4.0, Culture=neutral, PublicKeyToken=null' could not be resolved. ---> Mono.Cecil.ResolutionException: Failed to resolve System.Void Android.Widget.AbsListView::SetSelectionFromTop(System.Int32,System.Int32)
    at Mono.Linker.Steps.MarkStep.MarkMethod(MethodReference reference)
    at Mono.Linker.Steps.MarkStep.MarkInstruction(Instruction instruction)
    at Mono.Linker.Steps.MarkStep.MarkMethodBody(MethodBody body)
    at Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method)
    at Mono.Linker.Steps.MarkStep.ProcessQueue()
    at Mono.Linker.Steps.MarkStep.Process()
    at Mono.Linker.Steps.MarkStep.Process(LinkContext context)
    at Mono.Linker.Pipeline.Process(LinkContext context)
    at MonoDroid.Tuner.Linker.Process(LinkerOptions options, LinkContext& context)
    at Xamarin.Android.Tasks.LinkAssemblies.Execute()
    --- End of inner exception stack trace ---
    at Xamarin.Android.Diagnostic.Error(Int32 code, Exception innerException, String message, Object[] args)
    at Xamarin.Android.Tasks.LinkAssemblies.Execute()
    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
    at Microsoft.Build.BackEnd.TaskBuilder.d__20.MoveNext() Mobile.Platform.Droid

  • EricGroverEricGrover USMember ✭✭

    @TheRealJasonSmith That was it. Thanks!

  • AndrewMcCormackAndrewMcCormack USUniversity ✭✭

    Thanks for the iOS autoheight. spent the day working around it and now it is supported :smile:

  • MikeEEEMikeEEE USMember ✭✭✭
    edited February 2015

    Like WHOAAAAAAAA!!! Peeping through the internal changes here... And I have to give you super massive props on the eventArgs.Task pattern!!! That is a very clever way of handling tasks that keeps the async zombies away. Awesome idea. Wish it was used everywhere. :)

    Great work as always!

    Edit: Although looking closer I do see that the zombies have further spread this release in the Platform implementation for Windows Phone ewwww.... Oh well... one can dream. :)

  • TheRealJasonSmithTheRealJasonSmith USXamarin Team Xamurai

    @2BitNerd please make sure your api levels are set to 21 and the minimum is set to 14 or 15. Then make sure you have the latest Android SDK installed.

  • EricGroverEricGrover USMember ✭✭

    So Xamarin.Forms.Maps now seems to require the latest version of the Google Play Services Nuget package. Unfortunately, my app was using the LocationClient from the Froyo Google Play Services package that no longer exists in the new package. I know that the LocationClient api has been deprecated, but I can't find any examples of how to do Geofencing using the new API.

    Any advice?

  • TheRealJasonSmithTheRealJasonSmith USXamarin Team Xamurai

    We had to update the GPS requirement because people cant easily downgrade their Google SDK really. So we were forced to make a choice to update due to the API break in the Xamarin GooglePlayServices binding or to try to help people downgrade. We opted to update. I don't have a good answer for you beyond that.

  • MichaelStonisMichaelStonis USInsider, Beta, University, Developer Group Leader
    edited February 2015

    @TheRealJasonSmith is there any particular configuration that needs to be in place for the "iOS Dynamic cell sizing support" besides HasUnevenRows?

  • EricGroverEricGrover USMember ✭✭

    @TheRealJasonSmith If you guys could post a recipe on doing Geofencing in Android like the one you have for iOS, it would be greatly appreciated.

  • TheRealJasonSmithTheRealJasonSmith USXamarin Team Xamurai

    @EricGrover I am not familiar with the new APIs for doing that on Android unfortunately (though adding Forms support for it is on my todo list)

    @MichaelStonis just set HasUnevenRows = true, make sure the RowHeight == -1 and the Cell.Height == -1 (which is the default), and make sure you are running on device for testing. Sim seems to be broken for about half of people for some reason we dont know yet.

  • MichaelStonisMichaelStonis USInsider, Beta, University, Developer Group Leader

    @TheRealJasonSmith this seems to be working great. Two quick questions. 1. is this iOS8 only? 2. If the data in a cell is updated after the original height calculation, is there any way to trigger it to reload/refresh to calculate a new height?

  • ShantimohanElchuriShantimohanElchuri USMember ✭✭✭✭✭

    Ever since 1.3.4 update, my app not deploying to Android Player on Mac. XS either aborts deployment with error 'not built for x86' or XS itself crashes. No issue deploying to WP (either device or emulator) on a Windows machine.

  • TheRealJasonSmithTheRealJasonSmith USXamarin Team Xamurai

    @MichaelStonis we are still working on a method of auto-updating the height when your content changes. Its coming.

    @ShantimohanElchuri this is a configuration problem with your project unfortunately.

  • ShantimohanElchuriShantimohanElchuri USMember ✭✭✭✭✭

    @TheRealJasonSmith With previous releases you said we have to set Target to API 21 which was the latest. So I have set it to 'Latest...'. It was OK with 1.3.3. Which other config would have gone bad?

    One more suggestion: This NuGet way of getting updates is a pain as if I am just want to check an old sample, I have to update the packages for all. Why don't you take the path of installers like for XS, X.Android, X.iOS...?

  • @TheRealJasonSmith There is an important regression using ListView x GestureRecognizers x Binding CommandParameter "." from version 1.3.1 to this one (Actually, I think the regression starts on 1.3.2), I attached a project that simulates the issue, how to reproduce: Starts the attached project on IOS simulator, click in few itens than scroll down, click in some item, scroll up, click, then, you'll see that the alert shows the wrong binded item.
    Visual Studio 2013
    Xamarin IOS 8.6.1.0
    XCode 6.1.1

  • TheRealJasonSmithTheRealJasonSmith USXamarin Team Xamurai

    @Alexandrem will look into it!

  • ShantimohanElchuriShantimohanElchuri USMember ✭✭✭✭✭

    @TheRealJasonSmith Just FYI, for me, I was able to deploy to my GN4 but still it doesn't work on Android Player running Nexus5 (KitKat) image.

  • TheRealJasonSmithTheRealJasonSmith USXamarin Team Xamurai

    @ShantimohanElchuri if you continue to have problems with Android Player please contact support :)

  • ChaseChase USMember

    After upgrading to 1.3.4, I cannot navigate to pages that have ToolbarItems where order is set to ToolbarItemOrder.Secondary. The app just hangs. If I remove the secondary ToolbarItems, it works. Is this a known issue?

  • TheRealJasonSmithTheRealJasonSmith USXamarin Team Xamurai

    Nope can you provide a reproduction case? Sounds like you have an exception being swallowed (turn on break on throw in your debugger).

  • JeppeAndersenJeppeAndersen DKMember
    edited February 2015

    After update to 1.3.4 we are experiencing unhandled exception on a page where we have two listviews going with a custom viewcell. The underlying exception being thrown is "System.Windows.LayoutCycleException: Layout cycle detected. Layout could not complete".

    The two listviews uses the a data template that contains a stacklayout with a label and switch control inside (we cannot use the standard switchcell view due to the font size rendering on Windows Phone). If we remove the Switch control on the second list the problem goes away.

  • RaphaelSchindlerRaphaelSchindler USMember ✭✭✭

    @TheRealJasonSmith I have a question about the memory handling with forms. I have implemented Insights in my app where I track all possible exceptions and in the crash reports I can see the memory usage of my app. Which has gigantic differences between Android and iOS.

    Android: App Memory Use 80 kB
    iOS: App Memory Use 51 MB

    It crashed on the same element so they have the same amount of information stored.
    So to my questions:

    1. Why is there such a huge difference between platforms?
    2. What can I do to reduce the memory usage on iOS?
  • @TheRealJasonSmith Actually, it doesn't work with any binding type, not just for self, any news about? There is a BUG assigned https://bugzilla.xamarin.com/show_bug.cgi?id=27254

  • MihaMarkicMihaMarkic SI ✭✭✭✭

    There has to be a bug with image disposing on Android. let's say I create a content in code (some layouts, some images, some labels, some buttons - nothing special). But if I recreate it several times it will throw out of memory.

    Now, if I insert a GC.Collect(1) in between then everything works fine. I didn't yet dig into this though.

  • 1.3.4 Stacklayout changes appear to break dynamic adding of content.

    The following XAML

    ...

        <StackLayout x:Name="middle"  
             Grid.Column="0" Grid.Row="4" Grid.RowSpan="2">
        </StackLayout>
    
        <StackLayout x:Name="bottom" 
             Grid.Column="0" Grid.Row="6" Grid.RowSpan="4"/>
    </Grid></code>
    

    and Code

    middle.Children.Add(new ContentView() { Content = new NewsItem().Content });

    works fine on 1.3.3, but when updating to 1.3.4 the objects on NewsItem are all null or 0 sized, it appears that the layout is not being done on the contentview being added to the stacklayout

  • FredyWengerFredyWenger CHInsider ✭✭✭✭✭

    @TheRealJasonSmith:
    Set the color of labels multiple-times on Android don't work anymore (while it works on iOS and WP).
    Example:
    Set color to a Label to white and size e.g. to 14 (by creation).
    Then set the color of the label to red and the size to 18 (e.g. by tap on a button).
    => This works

    Then set the size back to 14 and the color back to white (e.g. by tap on another button).
    => The re-size works, but the color don't work (remains red)

    Filled in a bug: https://bugzilla.xamarin.com/show_bug.cgi?id=27409

  • TheRealJasonSmithTheRealJasonSmith USXamarin Team Xamurai

    @FredyWenger thank you

  • FredyWengerFredyWenger CHInsider ✭✭✭✭✭

    @TheRealJasonSmith:

    You are welcome.
    But my bug-description has a bug :blush:
    As bugzilla was not able to comprehend the bug, I have investigated in deep...
    The real bug, is, that color.default in Android don't seems to work
    In my app, I user global variables for the colors (e.g. standard, blue, red).
    I set the colors at startup, depending on the platform.
    For the standard-color, I overtake the color from Color.Default (standard = Color.Default).
    I then set the color to the labels with this variables (e.g. label.color = standard).
    For WP (white) and iOS (black) this works, for android the returned value is not correct.
    As this don't generate an exception and the "real" color.default (white) to the label is (pre-)set automatically by creation, I don't have seen the bug before:

    • Label is white at creation
    • then set to standard (what don't works but also don't generate an error, so the label is shown white).
    • if the label then is set to another (valid) color-variable, it works
    • if the label then is ("re-"set) to standard (white), this don't work and the earlier set color remains

    Fortunately the bug was easy to fix for me (once found!).
    I now set explicit the color to Standard (white for WP and Android, and black for iOS).
    I have updated the bug in bugzilla with this information's.

  • ApurvaGoyalApurvaGoyal USMember ✭✭

    @TheRealJasonSmith I am using Minimum Android Version as 15 and Target Android version as 21 but I still get following exception when trying to build apk with sdk link option . I am using 1.3.2 for Xamarin Forms and 1.2.1 pre-2 for Xamarin Forms Labs. Any help will be really appreciated!

    C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(5,5): Error MSB4018: The "LinkAssemblies" task failed unexpectedly.
    Xamarin.Android.XamarinAndroidException: error XA2006: Reference to metadata item 'System.Void Android.Widget.AbsListView::SetSelectionFromTop(System.Int32,System.Int32)' (defined in 'Xamarin.Forms.Platform.Android, Version=1.3.2.0, Culture=neutral, PublicKeyToken=null') from 'Xamarin.Forms.Platform.Android, Version=1.3.2.0, Culture=neutral, PublicKeyToken=null' could not be resolved. ---> Mono.Cecil.ResolutionException: Failed to resolve System.Void Android.Widget.AbsListView::SetSelectionFromTop(System.Int32,System.Int32)
    at Mono.Linker.Steps.MarkStep.MarkMethod(MethodReference reference)
    at Mono.Linker.Steps.MarkStep.MarkInstruction(Instruction instruction)
    at Mono.Linker.Steps.MarkStep.MarkMethodBody(MethodBody body)
    at Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method)
    at Mono.Linker.Steps.MarkStep.ProcessQueue()
    at Mono.Linker.Steps.MarkStep.Process()
    at Mono.Linker.Steps.MarkStep.Process(LinkContext context)
    at Mono.Linker.Pipeline.Process(LinkContext context)
    at MonoDroid.Tuner.Linker.Process(LinkerOptions options, LinkContext& context)
    at Xamarin.Android.Tasks.LinkAssemblies.Execute()
    --- End of inner exception stack trace ---
    at Xamarin.Android.Diagnostic.Error(Int32 code, Exception innerException, String message, Object[] args)
    at Xamarin.Android.Tasks.LinkAssemblies.Execute()
    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
    at Microsoft.Build.BackEnd.TaskBuilder.d__20.MoveNext() (MSB4018) (wpMobile.Android)

  • RendyDelRosarioRendyDelRosario DOUniversity ✭✭✭

    You can try this plugin: https://www.nuget.org/packages/Xam.Plugin.Geofence/ I just released. Let me know if helps.

  • MitchMilamMitchMilam USMember ✭✭✭

    @RendyDelRosario why don't you start a new thread with your announcement. That is a really cool plugin and I'm afraid no one will see it stuck at the bottom of a thread that is month's old.

  • RendyDelRosarioRendyDelRosario DOUniversity ✭✭✭
Sign In or Register to comment.