Forum Xamarin.Forms

Xamarin.Forms 2.2.0

13567

Posts

  • AdamPAdamP AUUniversity ✭✭✭✭✭
    edited April 2016

    @MichaelRidland - there has only been one way I have found (though tedious and not ideal) of removing XF dependencies within components and that is to provide some kind of wire up.

    With Exrin I have: https://github.com/exrin/Tesla-Mobile-App/blob/master/Tesla/Tesla/Tesla/Wire/NavigationContainer.cs

    It wires up the NavigationContainer to a NavigationPage. You have to do the mappings manually but then Exrin never relies on Xamarin Forms. Though the developer has to do that in their project, create a class that implements the interface, then inject it into the DI framework.

    With so many issues on XF dependencies in the past, I will work around however I can to ensure I never created a component with an XF dependency again. Though I realize this can not always be effectively done.

  • Matthew.4307Matthew.4307 USMember ✭✭✭

    @AdamP said:
    @TheRealJasonSmith - CarouselView is awesome, except found a bug when I switch the MainPage.
    https://bugzilla.xamarin.com/show_bug.cgi?id=40502

    Is there any chance you could add switching the MainPage as a common test scenario. My apps rely on it a lot and it frequently breaks XF :)

    I hope that for all bug fixes that are reported via bugzilla either have the original reproduction or re-engineered version added as an automated regression test. I fear this isn't the case though.
    If a Xamarin user raises a bugzill that means their application has been broken but that issue, and it has caused them some level of cost (time and or money) it is not fair on that individual if that isn't added as a regression test by Xamarin.

  • AdamPAdamP AUUniversity ✭✭✭✭✭

    @Matthew.4307 - they do have tests and regression testing from what I know. The problem I described is more that a particular scenario keeps surfacing new bugs. Or something they don't account for when doing their initial tests on the code. But considering how many people I keep recommending that navigation solution to, its going to become more common.

    Also Windows isn't as thoroughly tested as Android and iOS because they don't have UITest for windows hence I know that internally they currently have to manually test for each windows release. Unless they magically release UITest for Windows at Evolve (I can but dream :) )

  • Matthew.4307Matthew.4307 USMember ✭✭✭

    @AdamP said:
    @Matthew.4307 - they do have tests and regression testing from what I know. The problem I described is more that a particular scenario keeps surfacing new bugs. Or something they don't account for when doing their initial tests on the code. But considering how many people I keep recommending that navigation solution to, its going to become more common.

    Also Windows isn't as thoroughly tested as Android and iOS because they don't have UITest for windows hence I know that internally they currently have to manually test for each windows release. Unless they magically release UITest for Windows at Evolve (I can but dream :) )

    UITests for Windows is really needed, we are investing in Xamarin Test for Android and iOS but need to use Test Complete for Windows which means duplication of effort.

  • Matthew.4307Matthew.4307 USMember ✭✭✭

    Is there a reason the tabs have now gone like this instead of spanning the whole width of the screen?

  • BryanHunterXamBryanHunterXam USXamarin Team Xamurai

    @fortinguillaume said:
    Application crash on version 2.2.0.5-pre2 when you resume then back to android application who use Xamarin.Forms.
    Reproduce with Xamarin.Forms sample application (WorkingWithBehaviors application sample).

    Error :
    System.MissingMethodException: Method 'Looper.get_IsCurrentThread' not found.

    Thanks! The team fixed this one last night. It will be in the next release.

  • seanydaseanyda GBMember ✭✭✭✭✭

    @BryanHunterXam said:

    @fortinguillaume said:
    Application crash on version 2.2.0.5-pre2 when you resume then back to android application who use Xamarin.Forms.
    Reproduce with Xamarin.Forms sample application (WorkingWithBehaviors application sample).

    Error :
    System.MissingMethodException: Method 'Looper.get_IsCurrentThread' not found.

    Thanks! The team fixed this one last night. It will be in the next release.

    Hi When is the next release with this fix in?

    Thanks

  • Matthew.4307Matthew.4307 USMember ✭✭✭
    edited April 2016

    @BjornB said:
    @Matthew.4307
    If you want your tabs to take up all avaliable width you can set that in you tabs.axml (or whatever you named it)

    app:tabMaxWidth="0dp" app:tabGravity="fill" app:tabMode="fixed"

    I assume you are not using the maxwidth prop. My personal thoght though would be to keep it the way it is in your screenshot :)

    That's not it, it was working fine in pre2, this seems to be something introduced in pre3. It isn't affecting all devices, just some, and only in Landscape.

    Seems that Jelly Bean devices are affected but Kit Kat+ are fine.

    EDIT:
    My tabs.axml wasn't specifying anything for tabMaxWidth, adding =0 has now fixed my device specific issue, I guess some have default values for tabMaxWidth.

  • BryanHunterXamBryanHunterXam USXamarin Team Xamurai

    @SeanDavies.1435 said:

    @BryanHunterXam said:

    @fortinguillaume said:
    Application crash on version 2.2.0.5-pre2 when you resume then back to android application who use Xamarin.Forms.
    Reproduce with Xamarin.Forms sample application (WorkingWithBehaviors application sample).

    Error :
    System.MissingMethodException: Method 'Looper.get_IsCurrentThread' not found.

    Thanks! The team fixed this one last night. It will be in the next release.

    Hi When is the next release with this fix in?

    Thanks

    I expect pre4 to ship in the next 24 hours.

  • Matthew.4307Matthew.4307 USMember ✭✭✭

    @BryanHunterXam said:

    @SeanDavies.1435 said:

    @BryanHunterXam said:

    @fortinguillaume said:
    Application crash on version 2.2.0.5-pre2 when you resume then back to android application who use Xamarin.Forms.
    Reproduce with Xamarin.Forms sample application (WorkingWithBehaviors application sample).

    Error :
    System.MissingMethodException: Method 'Looper.get_IsCurrentThread' not found.

    Thanks! The team fixed this one last night. It will be in the next release.

    Hi When is the next release with this fix in?

    Thanks

    I expect pre4 to ship in the next 24 hours.

    Is it looking promising that there won't be many more preX and 2.2 will soon be regarded as stable? Is it just fixes going in or is there still functionality going in?

  • BryanHunterXamBryanHunterXam USXamarin Team Xamurai

    @Matthew.4307 said:

    @BryanHunterXam said:

    @SeanDavies.1435 said:

    @BryanHunterXam said:

    @fortinguillaume said:
    Application crash on version 2.2.0.5-pre2 when you resume then back to android application who use Xamarin.Forms.
    Reproduce with Xamarin.Forms sample application (WorkingWithBehaviors application sample).

    Error :
    System.MissingMethodException: Method 'Looper.get_IsCurrentThread' not found.

    Thanks! The team fixed this one last night. It will be in the next release.

    Hi When is the next release with this fix in?

    Thanks

    I expect pre4 to ship in the next 24 hours.

    Is it looking promising that there won't be many more preX and 2.2 will soon be regarded as stable? Is it just fixes going in or is there still functionality going in?

    Yes, should just be fixes from here.

  • BryanHunterXamBryanHunterXam USXamarin Team Xamurai
    edited April 2016

    Thanks for all the feedback on this thread. Without it, some very annoying bugs would have made it to stable.

    We are currently working on a problem (app crashes) related to Android API<23 using AppCompat. The problem is tied to a package update. That will be fixed before stable. </del>

    Not a real problem after all. An issue with a reproduction project instead. :)

  • DavidCASBONNEDavidCASBONNE USMember ✭✭
    edited April 2016

    Hi,

    I've a System.ArgumentOutOfRangeException when trying to set the Position of a CarouselView but only on Android. It works well on iOS.

    xCarouselView.BindingContextChanged += (object sender, EventArgs e) =>   
    {
        var a = (xCarouselView.ItemsSource as IList).Count;
        this.xCarouselView.Position = 3;
    };
    

    I've 6 items in the ItemsSource property.

    Thanks ;)

  • AdamPAdamP AUUniversity ✭✭✭✭✭

    @BryanHunterXam - I mentioned this critical CarouselView bug on WinRT when -pre2 was the latest release.

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

    is there any chance this will be fixed before 2.2.0 hits stable?

  • PawelTktiPawelTkti USMember

    .

    @PawelTkti said:
    I have problem. After installation the newest version (pre2) all properties defined in styles override my properties in the controls. For example:

    Style:

    <Style x:Key="MainButtonStyle" TargetType="custom:MyButton">
        <Setter Property="BackgroundColor" Value="Red"/>
        <Setter Property="TextColor" Value="White"/>
        <Setter Property="BorderRadius" Value="0"/>
        <Setter Property="BorderWidth" Value="0"/>
    </Style>
    

    Button:

     <custom:MyButton Text="Need help" Style="{StaticResource MainButtonStyle}"  BackgroundColor="Black"  />
    

    In app BackgroundColor is Red (as Style), and should be Black.

    Is it bug?
    Or it can be changed in the code?

    @TheRealJasonSmith said:
    Does it happen with every control or just some?

    @PawelTkti said:

    @TheRealJasonSmith said:
    Does it happen with every control or just some?

    Entry - bad
    Label - bad
    StackLayout - good
    BoxView - good

    Button is strange...
    If I'm using Custom Renderer, all properties defined in styles override my properties. If I'm not using CR everything is ok.

    Button is black:

    <Button Text="Need help" Style="{StaticResource MainButtonStyle}"  BackgroundColor="Black"  />
    

    Button is not black (because in styles property is red):

    <custom:MyButton Text="Need help" Style="{StaticResource MainButtonStyle}"  BackgroundColor="Black"  />`
    

    Does it work in the latest version Xamarin Forms?

  • MichaelRumplerMichaelRumpler ATMember ✭✭✭✭✭

    @BryanHunterXam

    Well, as long as bug #40333 is not fixed, you cannot make it stable.
    That was clearly a regression introduced in XF 2.1 and made worse in 2.2. I'm currently locked to 2.1.0.6508-pre3 because of that.

  • MichaelRumplerMichaelRumpler ATMember ✭✭✭✭✭

    I tried to upgrade the repro project from bug #40333 from XF 2.2.0.5-pre2 to 2.2.0.23-pre4, but then I get a "java.lang.OutOfMemoryError" when I try to compile the Android project.

    I set the MSBuild project build output verbosity to Diagnostic. The output is attached. You can see that CompileToDalvik needs 50secs before it fails.

    The Android SDK Manager is up to date. Compiling with 2.2.0.5 still works.

  • JMarcusJMarcus USMember ✭✭✭
    edited April 2016

    Bug 37113 does not appear to be fixed in pre4.

  • GyleIversonGyleIverson USMember ✭✭

    @fortinguillaume said:
    Application crash on version 2.2.0.5-pre2 when you resume then back to android application who use Xamarin.Forms.
    Reproduce with Xamarin.Forms sample application (WorkingWithBehaviors application sample).

    Error :
    System.MissingMethodException: Method 'Looper.get_IsCurrentThread' not found.

    This issue appears fixed with 2.2.0.23-pre4.

  • ChaseFlorellChaseFlorell CAInsider, University mod

    @MichaelRumpler said:
    @BryanHunterXam

    Well, as long as bug #40333 is not fixed, you cannot make it stable.
    That was clearly a regression introduced in XF 2.1 and made worse in 2.2. I'm currently locked to 2.1.0.6508-pre3 because of that.

    I'd say the same thing for 39821

  • MichaelRumplerMichaelRumpler ATMember ✭✭✭✭✭

    @MichaelRumpler just change your Max Heap Size.

    Thanks, that worked. Now Xamarin, please set it as default if it doesn't work without it. This is a repro project with almost no code in it.

    The bug is still there in 2.2.0.23-pre4.

  • TobiasSchulz.9796TobiasSchulz.9796 DEMember ✭✭

    Has it been determined when the code is going to be released? Or which release?

  • Matthew.4307Matthew.4307 USMember ✭✭✭

    Getting some layout issues on Windows RT. When there are Entry fields in a list they are often not resizing the height correctly. No problems on pre1, 2 or 3.

  • AlessandroCaliaroAlessandroCaliaro ITMember ✭✭✭✭✭

    @TravyDale said:
    Is there a way with the new CarouselView to have it "peek" the previous and next item in the list? In other words, show a small part of the previous and next item rather than having the control filling the entire space it is within. I quickly dabbled with the new control but didn't see a way to handle this in my PCL.

    this should be very interesting

  • DH_HA1DH_HA1 USMember ✭✭✭
    edited April 2016
  • ChaseFlorellChaseFlorell CAInsider, University mod

    @BryanHunterXam just a suggestion. When introducing new Views in a Pre-Release, I think it would be super cool if you attached a ScreenShot... similar to what you've done with the views in the official docs.

    https://developer.xamarin.com/guides/xamarin-forms/controls/views/

    This would help us get an idea of what we're getting without having to fully build it out just to see it.

    The reason I'm saying this is that with the new CarouselView, I'm interested in knowing if it has page indicators, and what they look like.

  • DavidCASBONNEDavidCASBONNE USMember ✭✭

    @ChaseFlorell +1, it would be great !
    Quick answer : no it doesn't have page indicators. I've seen somewhere that somebody succeeded in adding them but I don't remember... (I know it doesn't help you very much ^^)

  • DavidCASBONNEDavidCASBONNE USMember ✭✭

    @BryanHunterXam Just for your informations (and to avoid duplicate bugs for people who are following this thread), I've created 5 new bugs in bugzilla :

    40630 CarouselView with ItemsSource null or empty throws Exception (v2.2.0.18-pre3)
    40631 Setting CarouselView.Position throw exception (v2.2.0.18-pre3)
    40632 CarouselView missed a "SelectedItem" property (v2.2.0.18-pre3)
    40634 CarouselView fires (or not) "ItemSelected" or "PositionSelected" in an buggie way (v2.2.0.18-pre3)
    40635 CarouselView needs either a page indicator or show part of the left and right pages (v2.2.0.18-pre3)

    CarouselView is an incredible component which really helps us to build great interfaces ! I hope you would consider these bugs and new features requested for the stable version.

  • AdamPAdamP AUUniversity ✭✭✭✭✭
    edited April 2016

    I am currently out of time this week to provide a full bug report but the WebView in iOS is severely broken in 2.2.0.

    1 - Rotate the webview once and of course due to the never getting out of IN_PROGRESS bug report: https://bugzilla.xamarin.com/show_bug.cgi?id=30047 it doesn't give the correct height. But by doing this you could essentially fix it if you had it full screen (which I did)

       public override void LayoutSubviews()
        {
            base.LayoutSubviews();
    
            CGRect bounds = UIScreen.MainScreen.Bounds;
            bounds.Height = NativeView.Bounds.Height;
    
            NativeView.Bounds = bounds;
    
        }
    

    This now no longer works.

    2 - Do a rotate to landscape, then back to portrait and the width of the WebView is half the screen.

    3 - Go away from the WebView, then go back to the page, then rotate and you get this exception (everytime)

    System.ObjectDisposedException: Cannot access a disposed object.

    Object name: 'WebViewRenderer'.

    Of course if I do this it stops the error

      protected override void Dispose(bool disposing)
            {
               // base.Dispose(disposing);
            }
    

    But it looks like the WebViewRenderer shouldn't be disposed at that point until the actual page or control is disposed of.

    This was all done on an iPhone 4S and 6 simulators on iOS 9.2

  • EZHartEZHart USXamarin Team Xamurai

    @ChaseFlorell Are > @ChaseFlorell said:

    @MichaelRumpler said:
    @BryanHunterXam

    Well, as long as bug #40333 is not fixed, you cannot make it stable.
    That was clearly a regression introduced in XF 2.1 and made worse in 2.2. I'm currently locked to 2.1.0.6508-pre3 because of that.

    I'd say the same thing for 39821

    @ChaseFlorell The fix for 39821 should be in pre4; I think it just got missed in the release notes. Let me know if it's still giving you any trouble.

  • MiguelCervantesMiguelCervantes MXMember ✭✭✭

    @MiguelCervantes said:

    @TheRealJasonSmith said:
    @P3PPP CarouselView doesn't use Cells

    @TheRealJasonSmith I have a ContentView on a CarouselView but no content is displayed, the ContentView has the standard Stacklyaout and a label.

    Am i missing something?

  • AlessandroCaliaroAlessandroCaliaro ITMember ✭✭✭✭✭

    @DavidCASBONNE there is the @ChrisRiesgo CarouselView on GitHub that has indicators. Are you talking about it?

  • AlessandroCaliaroAlessandroCaliaro ITMember ✭✭✭✭✭

    @MiguelCervantes for me it works. Can you post your code?

  • AlessandroCaliaroAlessandroCaliaro ITMember ✭✭✭✭✭
    edited April 2016

    @MiguelCervantes this is my code

    using System;
    using Xamarin.Forms;
    using System.Collections.ObjectModel;
    using SimpleCustomGesureFrame;
    
    namespace TestBth
    {
        public class PageCarousel : ContentPage
        {
    
            public PageCarousel (ObservableCollection<string> lista)
            {
                NavigationPage.SetTitleIcon (this, "icon.png");
                NavigationPage.SetHasNavigationBar (this, true);
                NavigationPage.SetHasBackButton (this, true);
    
                Title = "RIBALTE";
                StackLayout sl = new StackLayout ();
    
                CarouselView cv = new CarouselView ();
                cv.ItemsSource = lista;
                cv.ItemTemplate = new DataTemplate (typeof(BarcodeTemplate));
                sl.Children.Add (cv);
    
                Content = sl;
    
            }
    
            public class BarcodeTemplate : ContentView {
    
                public BarcodeTemplate(){
    
                    TapGestureRecognizer tgr = new TapGestureRecognizer();
                    tgr.NumberOfTapsRequired = 2;
                    tgr.Tapped += async (object sender, EventArgs e) => {
                        await App.MyNavPage.PopAsync ();
                    };
    
                    GestureRecognizers.Add (tgr);
                    Label l = new Label();
                    l.FontSize = 40;
                    l.SetBinding (Label.TextProperty,".");
                    Content = l;
    
                }
            }
        }
    }
    
  • DavidCASBONNEDavidCASBONNE USMember ✭✭

    @AlessandroCaliaro said:
    @DavidCASBONNE there is the @ChrisRiesgo CarouselView on GitHub that has indicators. Are you talking about it?

    Yes and no :) I'm talking about the built-in CarouselView in XF 2.2.0 pre3 but the one from @ChrisRiesgo inspired me for the indicators and I really would see a feature like this built-in in XF :)

  • MommMomm USMember ✭✭✭

    Any chance of creating two properties in the CarouselView to disable vertical and horizontal scroll indicators? I don't like the idea of creating Custom Renderers for simple things like this.

    PS: ScrollView could have these two properties as well.

Sign In or Register to comment.