Coder Social home page Coder Social logo

xamarin / xamarin.forms Goto Github PK

View Code? Open in Web Editor NEW
5.6K 417.0 1.9K 108.62 MB

Xamarin.Forms Official Home

Home Page: https://xamarin.com/forms

License: Other

Java 0.02% C# 99.89% Makefile 0.01% Batchfile 0.01% CSS 0.01% HTML 0.03% PowerShell 0.03% Shell 0.01% Smalltalk 0.01%
xamarin xamarin-forms cross-platform user-interface microsoft hacktoberfest

xamarin.forms's Introduction

Xamarin.Forms banner

Xamarin.Forms

Xamarin.Forms provides a way to quickly build native apps for iOS, Android, Windows and macOS, completely in C#.

Read more about the platform at https://www.xamarin.com/forms.

Support

Xamarin.Forms now has a successor which is .NET MAUI as part of .NET 6+ and follows the same support lifecycle as the MAUI Support Lifecycle.

Support for Xamarin.Forms will end on May 1, 2024 as per the Xamarin Support Policy:

Xamarin support will end on May 1, 2024 for all classic Xamarin SDKs.

Build Status

Azure DevOps

Packages

Platform/Feature Package name Stable Prerelease Nightly Feed Azure (main branch)
Core Xamarin.Forms NuGet NuGet
AppLinks Xamarin.Forms.AppLinks NuGet NuGet
Maps Xamarin.Forms.Maps NuGet NuGet
Maps.GTK Xamarin.Forms.Maps.GTK NuGet NuGet
Maps.WPF Xamarin.Forms.Maps.WPF NuGet NuGet
Pages Xamarin.Forms.Pages NuGet NuGet
Pages.Azure Xamarin.Forms.Pages.Azure NuGet NuGet
Platform.GTK Xamarin.Forms.Platform.GTK NuGet NuGet
Platform.WPF Xamarin.Forms.Platform.WPF NuGet NuGet
Visual.Material Xamarin.Forms.Visual.Material NuGet NuGet

If you want to use the latest dev build then you should read this blog post:

  • Add the nightly feed to your NuGet sources or add a NuGet.Config to your app (placing it in the same directory where your solution file is) with the following content:

    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
      <packageSources>
        <clear />
        <add key="xamarin-ci" value="https://aka.ms/xf-nightly/index.json" />
        <add key="NuGet.org" value="https://api.nuget.org/v3/index.json" />
      </packageSources>
    </configuration>

    NOTE: This NuGet.Config should be with your application unless you want nightly packages to potentially start being restored for other apps on the machine.

  • Change your application's dependencies to have a * to get the latest version.

Getting Started

For both methods underneath you will have to add this NuGet feed for the build to succeed. See this documentation page to find out how.

Windows

Install Visual Studio 2019+

VS 2019+ is required for developing Xamarin.Forms. If you do not already have it installed, you can download it here. VS 2019+ Community is completely free. If you are installing VS 2019+ for the first time, select the "Custom" installation type and select the following from the features list to install:

  • .NET desktop development
    • Individual Components > .NET > .NET Framework 4.6.1 SDK, .NET Framework 4.6.1 targeting pack, .NET Framework 4.7.2 SDK, .NET Framework 4.7.2 targeting pack.
  • Universal Windows Platform Development
  • Mobile Development with .NET
    • Individual Components > Development Activities > Xamarin Remoted Simulator
    • If you're not using Hyper-V Individual Components > Emulators > Hyper-V Intel Hardware Accelerated Execution Manager (HAXM)
  • Most current SDK version of .NET Core

The Android 10.0 API 29 SDK and Android 9.0 API 28 SDK are required for developing Xamarin.Forms. They can be installed by using the Xamarin Android SDK Manager.

We also recommend installing Xamarin Android Device Manager. This will use the HAXM tools installed above and allow you to configure Android Virtual Devices (AVDs) that emulate Android devices. If you already have VS 2019+ installed, you can verify that these features are installed by modifying the VS 2019+ installation via the Visual Studio Installer.

Provisioning script

If you are getting errors about missing SDKs, you can run our provisioning script. Note that it can take some time to run the whole script. To better understand how the script works, feel free to check out our build.cake file.

  • On CMD

    build.cmd -Target provision
    
  • On Powershell

    ./build.ps1 -Target provision
    

    NOTE: If you encounter an error saying build.ps1 is not digitally signed, open Powershell as an administrator and resolve by running Set-ExecutionPolicy RemoteSigned first.

  • On CMD/Powershell/sh (New! More info here)

    dotnet tool install Cake.Tool -g
    dotnet cake --target=provision
    

Mac

Install Visual Studio for Mac 2019

If you do not already have it installed, instructions to download and setup can be found here.

Because of current Multi-Targeting limitations with Visual Studio for Mac you will need to manually build/restore some projects before you are able to work on the Xamarin Forms solution.

Here are a few different options we've put together to help make this process easier

  • Branches 3.5+ come with a Cake script target that you can use to build and open VSMac

    ./build.sh --target vsmac

    OR as mentioned above in the Windows section about provisioning, you can also use the new Cake.Tool

    dotnet tool install Cake.Tool -g
    dotnet cake --target=provision
    
  • When working on an earlier branch that does not have the cake scripts, you can use the following build.sh script

  • If you don't want to run any scripts:

    • Open Xamarin.Forms.sln
    • Wait for VSMAC to finish restoring all projects
    • from the command line run:
      • msbuild Xamarin.Forms.Build.Tasks/Xamarin.Forms.Build.Tasks.csproj
    • Now you should be able to run and deploy everything. The only reason you would need to do this process again is if you clean the solution folder or delete the bin/obj folders that are part of the Xamarin.Forms.Build.Tasks.csproj
Solution Configuration

Upon opening the Xamarin.Forms solution, you will find that there are a number of errors and warnings under the Error List pane; you can resolve this by changing the filter of Build + IntelliSense to Build Only. At this point, you should be able to successfully build the solution.

By default, the Xamarin.Forms.Controls project does not have a configuration for various API keys to access certain features on each platform (e.g. maps). When building the solution for the first time, a controlgallery.config file will be generated inside that project, which looks like this:

UWPMapsAuthKey:

If you aren't working with maps, you can ignore this. If you want to work with maps, you will have to obtain your own API keys for each of these services, inserted directly after the identifier (e.g. UWPMapsAuthKey:abcdefghijklmnopqrstuvwxyz). You can find out how to obtain each of these as follows:

Due to the way that Android works, the maps API key cannot be injected at runtime. As a result, you will have to add this key to the MapsKey.cs file under Xamarin.Forms.ControlGallery.Android/Properties:

[assembly: Android.App.MetaData("com.google.android.maps.v2.API_KEY", Value = "INSERT_KEY_HERE")]

You can find out how to obtain a Google Maps API key here.

Build from the Command line

Make sure you have nuget.exe 4.0 or above and the latest .NET Core SDK. On macOS you should specify the platform in the msbuild command (/p:Platform=iPhoneSimulator)

msbuild /restore Xamarin.Forms.sln

UI Tests

Run Android UI Tests

Depending on your environment setup, you might need to configure a few things before being able to debug / run UI tests, especially on Windows.

  • If you receive an error about ANDROID_HOME, please make sure to set your environment variable to the Android SDK directory (e.g. C:\Program Files (x86)\Android\android-sdk).
  • If you receive an error about JAVA_HOME, please install the latest Java JDK and set your environment variable to the JDK directory (e.g. C:\Program Files\Java\jdk-13).
  • If you receive an error about a missing ApkFile, please generate an APK file for Xamarin.Forms.ControlGallery.Android. The easiest way to do this is to right click the project and select "Deploy". Note that if you rebuild the solution, you might lose the APK and will need to generate it again.

After these steps are taken care of, you should be good to go. You can see all UI tests in Test Explorer, search them for your own convenience, and quickly run individual tests.

Run UWP UI Tests

To run the UWP UI Tests:

  1. Install and run the Windows Application Driver.
  2. Launch the Xamarin.Forms.ControlGallery.WindowsUniversal project to install the ControlGallery application onto your system.

You should now be able to run any of the UWP UI Tests.

Coding Style

We follow the style used by the .NET Foundation, with a few exceptions:

  • We do not use the private keyword as it is the default accessibility level in C#.
  • We use hard tabs over spaces. You can change this setting in Visual Studio for Windows via Tools > Options and navigating to Text Editor > C# and selecting the "Keep tabs" radio option. In Visual Studio for Mac it's set via preferences in Source Code > Code Formatting > C# source code and disabling the checkbox for Convert tabs to spaces.
  • Lines should be limited to a max of 120 characters (or as close as possible within reason). This may be set in Visual Studio for Mac via preferences in Source Code > Code Formatting > C# source code and changing the Desired file width to 120.

Contributing

Reporting Bugs

We use GitHub Issues to track issues. If at all possible, please submit a reproduction of your bug along with your bug report.

Stats

xamarin.forms's People

Contributors

adrianknight89 avatar akihikodaki avatar andreimisiukevich avatar andreinitescu avatar bmacombe avatar bradchase2011 avatar davidortinau avatar github-actions[bot] avatar hartez avatar jcmanke avatar jfversluis avatar jimmgarrido avatar jonathanpeppers avatar jsuarezruiz avatar kingces95 avatar kvpt avatar mattleibow avatar michaelnorman avatar mohachouch avatar myroot avatar pauldipietro avatar paymicro avatar pureween avatar ravinderjangra avatar rmarinho avatar rookiejava avatar samhouts avatar shyunmin avatar stephanedelcroix avatar yurkinh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xamarin.forms's Issues

Scrollview does not resize when ContentSize changes when inside a Detail page

Description

When the content inside a scrollview changes size the Scrollview does not resize itself. The effect is that when content gets smaller a gap is left where the content used to be, when content gets bigger it cannot be seen. This only happens when the ScrollView is inside a Page that is the Detail of a MasterDetailPage. If the Detail is a NavigationPage then the Scrollview works correctly.

Steps to Reproduce

  1. Create a MasterDetailPage
  2. Assign a Page to the Detail (not a NavigationPage)
  3. Add a Scrollview to the Page
  4. Add a StackLayout to the Scrollview
  5. Add 2 or more Layouts to the StackLayout with some content
  6. Trigger one of the Layouts to change size, for example set it's content to IsVisible=false

In the reproduction solution mdp.xaml.cs in the PCL is the page that set the Detail, on initial load there will be a NavigationPage. To reproduce in the Reproduction

  1. Run the Reproduction
  2. Hit top Expand/Collapse and the red box will disappear/appear and the layout will adjust correctly
  3. Choose Page 1 in the navigator
  4. Repeat with the top Expand/Collapse the red box will disappear/appear but the layout will not adjust

Note, I can't remember whether the uploaded reproduction is referencing the Xamarin.Forms version that works or the one that doesn't work. Please ensure that the Xamarin.Forms references are set to 2.4.0.91020 or later.

Expected Behavior

Layout is adjusted/redrawn so controls occupy the ScrollView without leaving empty space.

Actual Behavior

Empty space is left where the (now) smaller control used to occupy. The Draw method in the ScrollViewRenderer never gets called, although the ContentSizeProperty does trigger a PropertyChanged event.

Basic Information

  • Version with issue:2.4.0.91020 onwards
  • Last known good version:2.3.4.270
  • IDE:Visual Studio 2015 and 2017.3
  • Platform Target Frameworks:
    • Android:5.1.1, presumably other versions too
  • Android Support Library Version: 25.4.0.2
  • Nuget Packages:Xamarin.Forms
  • Affected Devices:

Reproduction Link

AndroidScrollviewIssue.zip

[Forms] After converting to .NET Standart get error "No Bindable propery or type mistmatch"

Hello!
I have this xaml code:

<ViewCell.View>
      <StackLayout>
            <Label Text="{Binding Source={x:Reference Root},Path=Text}" FontSize="{x:Static modules:FontProvider.InfoUserFontSize}" TextColor="SeaGreen" Margin="5,0"/>
            <Label Text="{Binding Source={x:Reference Root},Path=Detail}" FontSize="{x:Static modules:FontProvider.InfoDetailFontSize}" Margin="5,0"/>
      </StackLayout>
  </ViewCell.View>

In PCL library all fine. But in .NET Standart FontSize display error "No property, bindable property, or event found for 'FontSize', or mismatching type between value and property".

Here is FontProvider.cs:

public static class FontProvider
{
	public static double? InfoUserFontSize { get; set; }
	public static double InfoFontSize => InfoUserFontSize ?? 16;
	public static double InfoDetailFontSize => InfoFontSize - 2;
}

Same with IsVisible property with another element:

<modules:TimePickerNullable IsEnabled="{Binding Source={x:Reference StartSwitch}, Path=IsToggled}" NullableDate="{Binding StartTimeLabel,Mode=TwoWay}" IsVisible="{x:Static modules:UserSettings.NotUseTimeEntry}"></modules:TimePickerNullable>

IsVisible property is from base class TimePicker.

UserSettings.cs:

public static class UserSettings
{
	public static bool UseTimeEntry { get; set; }
	public static bool NotUseTimeEntry => !UseTimeEntry;
}

Basic Information

  • Version with issue: 2.5.0 .NET Standart
  • Last known good version: 2.5.0 PCL
  • IDE: Visual Studio 2017 (15.5.1) Professional

Add support for Android bottom navigation bar in Xamarin.Forms

The latest Material Design guidelines talk about a bottom navigation bar:
https://material.io/guidelines/components/bottom-navigation.html#

This is available within Android as the BottomNavigationView:
https://developer.android.com/reference/android/support/design/widget/BottomNavigationView.html

When can we expect to see this supported in Xamarin.Forms? Ideally, this would be available via the TabbedPage control, as suggested here:
https://forums.xamarin.com/discussion/84565/bottomnavigationview-option-for-tabbedpage-on-android

Picker SelectedItem property does not work in a ViewCell

Description

There is a ListView of properties to select with Picker.
View:

<ViewCell.View>
        <StackLayout>
            <Picker ItemsSource="{Binding Values}" ItemDisplayBinding="{Binding Value}" SelectedItem="{Binding SelectedValue}" Title="{Binding Name}" />

        </StackLayout>
    </ViewCell.View>

ViewModel

        ObservableCollection<VariableValue> _variableValues;
        public ObservableCollection<VariableValue> Values
        {
            get { return _variableValues; }
            set { SetProperty(ref _variableValues, value); }
        }

        private VariableValue _selectedValue;
        public VariableValue SelectedValue
        {
            get { return _selectedValue; }
            set
            {
                SetProperty(ref _selectedValue, value);
            }
        }


        private string _name = "";
        public string Name { get { return _name; } set { SetProperty(ref _name, value); } }

Steps to Reproduce

  1. Try to select an item

Expected Behavior

When select some item, it just changes SelectedValue property

Actual Behavior

Selected item goes to SelectedValue property
Then it comes again,
Then null comes and changes _selectedValue
Then null comes again
So it fires 4 times

Basic Information

  • IDE: Visual Studio 2017
  • Platform Target Frameworks:
    • Android: 7.1

iOS app crashes occasionally with System.ArgumentOutOfRangeException since Xamarin.Forms 2.5

Steps to reproduce

Not found yet.

Expected behavior

No crashes.

Actual behavior

My iOS app occasionally crashes with System.ArgumentOutOfRangeException since the update from Xamarin.Forms 2.4 to 2.5.

Supplemental info (logs, images, videos)

System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) [0x00018] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.4.0.214/src/mono/mcs/class/referencesource/mscorlib/system/throwhelper.cs:93
at System.ThrowHelper.ThrowArgumentOutOfRangeException () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.4.0.214/src/mono/mcs/class/referencesource/mscorlib/system/throwhelper.cs:56
at System.Collections.Generic.List1[T].get_Item (System.Int32 index) [0x00009] in <1f5960abbfdf4434802d3b8a03ded4fa>:0 at System.Collections.ObjectModel.Collection1[T].get_Item (System.Int32 index) [0x00000] in <1f5960abbfdf4434802d3b8a03ded4fa>:0
at System.Collections.ObjectModel.ReadOnlyCollection1[T].get_Item (System.Int32 index) [0x00000] in <1f5960abbfdf4434802d3b8a03ded4fa>:0 at Xamarin.Forms.Platform.iOS.RendererPool.UpdateRenderers (Xamarin.Forms.Element newElement) [0x0004e] in D:\agent\_work\1\s\Xamarin.Forms.Platform.iOS\RendererPool.cs:150 at Xamarin.Forms.Platform.iOS.RendererPool.UpdateNewElement (Xamarin.Forms.VisualElement newElement) [0x00080] in D:\agent\_work\1\s\Xamarin.Forms.Platform.iOS\RendererPool.cs:78 at Xamarin.Forms.Platform.iOS.VisualElementPackager.SetElement (Xamarin.Forms.VisualElement oldElement, Xamarin.Forms.VisualElement newElement) [0x00050] in D:\agent\_work\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:161 at Xamarin.Forms.Platform.iOS.VisualElementPackager.OnRendererElementChanged (System.Object sender, Xamarin.Forms.Platform.iOS.VisualElementChangedEventArgs args) [0x0000f] in D:\agent\_work\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:144 at Xamarin.Forms.Platform.iOS.VisualElementRenderer1[TElement].OnElementChanged (Xamarin.Forms.Platform.iOS.ElementChangedEventArgs1[TElement] e) [0x0002c] in <f321195339234cc7a2f7f1d5fa08167d>:0 at Xamarin.Forms.Platform.iOS.VisualElementRenderer1[TElement].SetElement (TElement element) [0x00118] in :0
at Xamarin.Forms.Platform.iOS.VisualElementRenderer1[TElement].Xamarin.Forms.Platform.iOS.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00000] in <f321195339234cc7a2f7f1d5fa08167d>:0 at Xamarin.Forms.Platform.iOS.RendererPool.UpdateRenderers (Xamarin.Forms.Element newElement) [0x0008c] in D:\agent\_work\1\s\Xamarin.Forms.Platform.iOS\RendererPool.cs:157 at Xamarin.Forms.Platform.iOS.RendererPool.UpdateNewElement (Xamarin.Forms.VisualElement newElement) [0x00080] in D:\agent\_work\1\s\Xamarin.Forms.Platform.iOS\RendererPool.cs:78 at Xamarin.Forms.Platform.iOS.VisualElementPackager.SetElement (Xamarin.Forms.VisualElement oldElement, Xamarin.Forms.VisualElement newElement) [0x00050] in D:\agent\_work\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:161 at Xamarin.Forms.Platform.iOS.VisualElementPackager.OnRendererElementChanged (System.Object sender, Xamarin.Forms.Platform.iOS.VisualElementChangedEventArgs args) [0x0000f] in D:\agent\_work\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:144 at Xamarin.Forms.Platform.iOS.VisualElementRenderer1[TElement].OnElementChanged (Xamarin.Forms.Platform.iOS.ElementChangedEventArgs1[TElement] e) [0x0002c] in <f321195339234cc7a2f7f1d5fa08167d>:0 at Xamarin.Forms.Platform.iOS.VisualElementRenderer1[TElement].SetElement (TElement element) [0x00118] in :0
at Xamarin.Forms.Platform.iOS.VisualElementRenderer1[TElement].Xamarin.Forms.Platform.iOS.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00000] in <f321195339234cc7a2f7f1d5fa08167d>:0 at Xamarin.Forms.Platform.iOS.RendererPool.UpdateRenderers (Xamarin.Forms.Element newElement) [0x0008c] in D:\agent\_work\1\s\Xamarin.Forms.Platform.iOS\RendererPool.cs:157 at Xamarin.Forms.Platform.iOS.RendererPool.UpdateNewElement (Xamarin.Forms.VisualElement newElement) [0x00080] in D:\agent\_work\1\s\Xamarin.Forms.Platform.iOS\RendererPool.cs:78 at Xamarin.Forms.Platform.iOS.VisualElementPackager.SetElement (Xamarin.Forms.VisualElement oldElement, Xamarin.Forms.VisualElement newElement) [0x00050] in D:\agent\_work\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:161 at Xamarin.Forms.Platform.iOS.VisualElementPackager.OnRendererElementChanged (System.Object sender, Xamarin.Forms.Platform.iOS.VisualElementChangedEventArgs args) [0x0000f] in D:\agent\_work\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:144 at Xamarin.Forms.Platform.iOS.VisualElementRenderer1[TElement].OnElementChanged (Xamarin.Forms.Platform.iOS.ElementChangedEventArgs1[TElement] e) [0x0002c] in <f321195339234cc7a2f7f1d5fa08167d>:0 at Xamarin.Forms.Platform.iOS.VisualElementRenderer1[TElement].SetElement (TElement element) [0x00118] in :0
at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].Xamarin.Forms.Platform.iOS.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00000] in :0
at Xamarin.Forms.Platform.iOS.ViewCellRenderer+ViewTableCell.UpdateCell (Xamarin.Forms.ViewCell cell) [0x000d9] in D:\agent_work\1\s\Xamarin.Forms.Platform.iOS\Cells\ViewCellRenderer.cs:173
at Xamarin.Forms.Platform.iOS.ViewCellRenderer+ViewTableCell.set_ViewCell (Xamarin.Forms.ViewCell value) [0x0000a] in D:\agent_work\1\s\Xamarin.Forms.Platform.iOS\Cells\ViewCellRenderer.cs:68
at Xamarin.Forms.Platform.iOS.ViewCellRenderer.GetCell (Xamarin.Forms.Cell item, UIKit.UITableViewCell reusableCell, UIKit.UITableView tv) [0x0004d] in D:\agent_work\1\s\Xamarin.Forms.Platform.iOS\Cells\ViewCellRenderer.cs:22
at Xamarin.Forms.Platform.iOS.CellTableViewCell.GetNativeCell (UIKit.UITableView tableView, Xamarin.Forms.Cell cell, System.Boolean recycleCells, System.String templateId) [0x00081] in D:\agent_work\1\s\Xamarin.Forms.Platform.iOS\Cells\CellTableViewCell.cs:72
at Xamarin.Forms.Platform.iOS.ListViewRenderer+ListViewDataSource.GetCell (UIKit.UITableView tableView, Foundation.NSIndexPath indexPath) [0x00017] in D:\agent_work\1\s\Xamarin.Forms.Platform.iOS\Renderers\ListViewRenderer.cs:863
at (wrapper managed-to-native) ObjCRuntime.Messaging:void_objc_msgSend_IntPtr_Int64 (intptr,intptr,intptr,long)
at UIKit.UITableView.ReloadRows (Foundation.NSIndexPath[] atIndexPaths, UIKit.UITableViewRowAnimation withRowAnimation) [0x00033] in /Users/builder/data/lanes/5489/c4240f3f/source/xamarin-macios/src/build/ios/native/UIKit/UITableView.g.cs:809
at Xamarin.Forms.Platform.iOS.CellRenderer+<>c__DisplayClass5_0.b__0 (System.Object sender, System.EventArgs e) [0x00032] in D:\agent_work\1\s\Xamarin.Forms.Platform.iOS\Cells\CellRenderer.cs:60
at (wrapper delegate-invoke) :invoke_void_object_EventArgs (object,System.EventArgs)
at Xamarin.Forms.Cell+d__39.MoveNext () [0x00086] in D:\agent_work\1\s\Xamarin.Forms.Core\Cells\Cell.cs:189
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.4.0.214/src/mono/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:152
at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.b__6_0 (System.Object state) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.4.0.214/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:1018
at UIKit.UIKitSynchronizationContext+c__AnonStorey0.<>m__0 () [0x00000] in /Users/builder/data/lanes/5489/c4240f3f/source/xamarin-macios/src/UIKit/UIKitSynchronizationContext.cs:24
at Foundation.NSAsyncActionDispatcher.Apply () [0x00000] in /Users/builder/data/lanes/5489/c4240f3f/source/xamarin-macios/src/Foundation/NSAction.cs:163
at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Users/builder/data/lanes/5489/c4240f3f/source/xamarin-macios/src/UIKit/UIApplication.cs:79
at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00038] in /Users/builder/data/lanes/5489/c4240f3f/source/xamarin-macios/src/UIKit/UIApplication.cs:63
at WasteXApp.iOS.Application.Main (System.String[] args) [0x00001] in C:\Apps\WasteXApp\WasteXApp\APM\WasteXApp.iOS\Main.cs:17

Test environment (full version information)

Microsoft Visual Studio Community 2015
Version 14.0.25431.01 Update 3
Microsoft .NET Framework
Version 4.7.02046

Installierte Version: Community

Visual Basic 2015 00322-20000-00000-AA978
Microsoft Visual Basic 2015

Visual C# 2015 00322-20000-00000-AA978
Microsoft Visual C# 2015

Visual C++ 2015 00322-20000-00000-AA978
Microsoft Visual C++ 2015

Windows Phone SDK 8.0 - DEU 00322-20000-00000-AA978
Windows Phone SDK 8.0 - DEU

Allgemeine Azure-Tools 1.8
Bietet allgemeine Dienste fรผr die Verwendung durch Azure Mobile Services und Microsoft Azure-Tools.

Application Insights-Tools fรผr Visual Studio-Paket 7.18.00214.2
Application Insights-Tools fรผr Visual Studio

ASP.NET and Web Tools 2015.1 14.1.21111.0
ASP.NET and Web Tools 2015.1

ASP.NET Web Frameworks and Tools 2012.2 4.1.41102.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013 5.2.40314.0
For additional information, visit http://www.asp.net/

Azure App Service Tools v2.8.1 14.0.11123.0
Azure App Service Tools v2.8.1

JavaScript-Sprachdienst 2.0
JavaScript-Sprachdienst

JavaScript Project System 2.0
JavaScript Project System

JetBrains ReSharper Ultimate 2017.2.2 Build 109.0.20171006.122324
JetBrains ReSharper Ultimate package for Microsoft Visual Studio. For more information about ReSharper Ultimate, visit http://www.jetbrains.com/resharper. Copyright ยฉ 2017 JetBrains, Inc.

Merq 1.1.17-rc (cba4571)
Command Bus, Event Stream and Async Manager for Visual Studio extensions.

Microsoft .NET Core Tools (Preview 2) 14.1.21111.0
Microsoft .NET Core Tools (Preview 2)

Microsoft Azure Mobile Services Tools 1.4
Microsoft Azure Mobile Services Tools

Mono Debugging for Visual Studio 4.8.4-pre (3fe64e3)
Support for debugging Mono processes with Visual Studio.

MySQL for Visual Studio 1.2.6
Data design and management tools for MySQL. Copyright ยฉ 2007-2015 Oracle, Inc.

NuGet-Paket-Manager 3.5.0
NuGet-Paket-Manager in Visual Studio. Weitere Informationen zu NuGet finden Sie unter "http://docs.nuget.org/".

PreEmptive Analytics Visualizer 1.2
Microsoft Visual Studio-Erweiterung zur Visualisierung aggregierter Zusammenfassungen vom PreEmptive Analytics-Produkt.

SQL Server Data Tools 14.0.60519.0
Microsoft SQL Server Data Tools

TypeScript 1.8.36.0
TypeScript-Tools fรผr Visual Studio

Visual Studio Tools fรผr Universelle Windows-Apps 14.0.25527.01
Mit den Visual Studio Tools fรผr Universelle Windows-Apps kรถnnen Sie eine universelle App-Erfahrung erstellen, die auf jedem Gerรคt genutzt werden kann, das Windows 10 ausfรผhrt: Smartphone, Tablet, PC und viele weitere Gerรคte. Das Microsoft Windows 10 SDK ist in den Tools enthalten.

VisualStudio.Mac 1.0
Mac Extension for Visual Studio

Xamarin 4.8.0.752 (4a1f0ea)
Visual Studio-Erweiterung, um Entwicklung fรผr Xamarin.iOS und Xamarin.Android zu ermรถglichen.

Xamarin Designer 4.8.182 (76aa1723e)
Visual Studio extension to enable Xamarin Designer tools in Visual Studio.

Xamarin.Android 8.1.0.13 (f241f51)
Visual Studio-Erweiterung zur Unterstรผtzung von Entwicklung fรผr Xamarin.Android.

Xamarin.Android SDK 8.1.0.23 (HEAD/f65f87747)
Xamarin.Android Reference Assemblies and MSBuild support.

Xamarin.iOS 11.4.0.214 (c4240f3)
Visual Studio-Erweiterung, um Entwicklung fรผr Xamarin.iOS zu ermรถglichen.

Xamarin.iOS and Xamarin.Mac SDK 11.4.0.214 (c4240f3)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.

Windows bug Xamarin forms Listview returns wrong item

Description

I have a master detail page. In the master I have 3 groups with each a ObservableCollection list. The fully menu is connected with a command on "onMenuItemTapped" but when I tap an item it gives the wrong item as parameter. Each group returns the item in the list with the tapped index + 1

  • Version with issue: Xamarin forms version 2.4.X and 2.5.X
  • Last known good version: 2.3
  • IDE:
  • Platform Target Frameworks:
    • UWP: version 10420
  • Nuget Packages: Xamarin Froms
  • Affected Devices: UWP

Reproduction Link

http://www.filedropper.com/bugtest

Edit: Re-uploaded zip (wiped bin/obj/package folders):
BugTest.zip

Android status bar isn't set on start of the application

Description

I have set the color of my status bar into a color.xml file and a style in the style.xml but the application make some seconds to update the status bar color.

I have made a sample with 2 activity separated to see the effect.

Thanks

Steps to Reproduce

  1. Launch the app
  2. The status bar will be black and the mainActivity will be launch
  3. Press back when the MainActivity has been loaded to return on splashScreen Activity
  4. The status bar as changed to blue

Expected Behavior

The status bar is blue on the start of the app and not after some seconds

Actual Behavior

The status bar change is color after some time

Basic Information

  • Version with issue: 2.4.0.280
  • IDE: VS2017
  • Platform Target Frameworks:
    • Android: Android 6 and 7

Reproduction Link

https://github.com/Ychergui/AndroidStatusBar

EntryCell within TableView using wrong keyboard

Description

I have 3 EntryCell's on a screen. The 2nd and 3rd cells are visibly toggled by pressing the first (remove and add section).

If EntryCell 2 has a Numeric keyboard, then EntryCell 3 will also have a numeric keyboard, even though I set it to Plain.

Steps to Reproduce

See sample code in forum:
https://forums.xamarin.com/discussion/112000/tableview-textcell-keyboard-wrongly-set-as-numeric

Expected Behavior

Entry Cell keyboard should reflect the desired keyboard (Numeric, Plain etc..)

Actual Behavior

Entry Cell keyboard seems to fix to Numeric when the sections are added/removed from a table view.

Basic Information

This affects iOS only.

Reproduction Link

See sample code: https://forums.xamarin.com/discussion/112000/tableview-textcell-keyboard-wrongly-set-as-numeric

[Forms] Random native UIImpactFeedbackGenerator crash in Xamarin.iOS

Description

Since updating to Visual Studio 15.5.1 (on Windows 10), Xcode 9.2 and the latest stable channel in Xamarin Studio (on the Mac), I have been receiving random native crashes regarding the UIImpactFeedbackGenerator (which is NOT used by me or any 3rd party library I use).

The app was working perfectly before this update.

Steps to Reproduce

I unfortunately cannot give you steps to reproduce as it happens randomly.

Basic Information

  • Version with issue: 2.5.0.91635 and 2.5.0.121934
  • IDE: Visual Studio 2017 Enterprise 15.5.1
  • Platform Target Frameworks:
    • iOS: 11.6.1.2

Native stack trace

2017-12-07 16:44:08.489 MyApp.iOS[307:35483] *** Assertion failure in -[UIImpactFeedbackGenerator _forceDeactivationForStyle:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit/UIKit-3698.33.7/UIFeedbackGenerator.m:545
Unhandled Exception:

Foundation.MonoTouchException:

Thread finished: #41
The thread 0x29 has exited with code 0 (0x0).
2017-12-07 16:44:22.874 MyApp.iOS[307:35483]
Unhandled Exception:
Foundation.MonoTouchException: Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: Exception raised while auto-deactivating for style 2: force deactivating with style TurnOn which is not active (activationCount = -1)
configuration: <_UIImpactFeedbackGeneratorConfiguration: 0x1c4aba820: isEnabled=1, activationStyle=2, requiredSupportLevel=2>
activationCount: -1, styleActivationCount: -1
engines: {(
<_UIFeedbackHapticOnlyEngine: 0x1c42c3f70: state=4, numberOfClients=1, prewarmCount=0, _isSuspended=0>
)}
Native stack trace:
0 CoreFoundation 0x000000018608a37c + 148
1 libobjc.A.dylib 0x00000001852d0528 objc_exception_throw + 56
2 CoreFoundation 0x000000018608a2ac + 0
3 UIKit 0x000000018f
0x00000001013881fc MyApp.iOS + 11977212
17 MyApp.iOS 0x00000001008b77a0 MyApp.iOS + 636832
18 MyApp.iOS 0x0000000100df33b4 MyApp.iOS + 6124468
19 MyApp.iOS 0x0000000104463678 mono_pmip + 22124
20 MyApp.iOS 0x00000001044cfd28 mono_pmip + 466204
21 MyApp.iOS 0x00000001044d2a08 mono_pmip + 477692
22 MyApp.iOS 0x000000010444bf30 _ZN7plcrash3BIT5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 281464
23 MyApp.iOS 0x000000010458fe84 xamarin_localized_string_format_9 + 22244
24 MyApp.iOS 0x00000001008b64bc MyApp.iOS + 631996
25 libdyld.dylib 0x0000000185a6c56c + 4

at ObjCRuntime.Runtime.ThrowNSException (System.IntPtr ns_exception) [0x00000] in /Users/builder/data/lanes/5489/c4240f3f/source/xamarin-macios/src/Ob
jCRuntime/Runtime.cs:362
at ObjCRuntime.Runtime.throw_ns_exception (System.IntPtr exc) [0x00000] in /Users/builder/data/lanes/5489/c4240f3f/source/xamarin-macios/runtime/Delegates.generated.cs:130
at (wrapper native-to-managed) ObjCRuntime.Runtime:throw_ns_exception (intptr)
--- End of stack trace from previous location where exception was thrown ---
at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Users/builder/data/lanes/5489/c4240f3f/source/xamarin-macios/src/UIKit/UIApplication.cs:79
at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00038] in /Users/builder/data/lanes/5489/c4240f3f/source/xamarin-macios/src/UIKit/UIApplication.cs:63
at MyApp.iOS.Application.Main (System.String[] args) [0x00001] in E:-\Mobile\src\Shared\iOS\Main.cs:9 0 CoreFoundation
0x000000018608a37c + 148
1 libobjc.A.dylib 0x00000001852d0528 objc_exception_throw + 56
2 CoreFoundation 0x000000018608a2ac + 0
3 UIKit 0x000000018ffb0198 + 224
4 UIKit 0x000000018ffafec8 + 116
5 libdispatch.dylib 0x0000000185a06a14 + 16
6 libdispatch.dylib 0x0000000185a0ef08 + 428
7 libdispatch.dylib 0x0000000185a18848 + 1588
8 libdispatch.dylib 0x0000000185a13570 + 720
9 CoreFoundation 0x0000000186032544 + 12
10 CoreFoundation 0x0000000186030120 + 2012
11 CoreFoundation 0x0000000185f4fe58 CFRunLoopRunSpecific + 436
12 GraphicsServices 0x0000000187dfcf84 GSEventRunModal + 100
13 UIKit
0x000000018f5cf67c UIApplicationMain + 236
14 MyApp.iOS 0x0000000101ab32c0 MyApp.iOS + 19493568
15 MyApp.iOS 0x000000010138833c MyApp.iOS + 11977532
16 MyApp.iOS 0x00000001013881fc MyApp.iOS + 11977212
17 MyApp.iOS 0x00000001008b77a0 MyApp.iOS + 636832
18 MyApp.iOS 0x0000000100df33b4 MyApp.iOS + 6124468
19 MyApp.iOS 0x0000000104463678 mono_pmip + 22124
20 MyApp.iOS 0x00000001044cfd28 mono_pmip + 466204
21 MyApp.iOS 0x00000001044d2a08 mono_pmip + 477692
22 MyApp.iOS 0x000000010444bf30 _ZN7plcrash3BIT5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 281464
23 MyApp.iOS 0x000000010458fe84 xamarin_localized_string_format_9 + 22244
24 MyApp.iOS 0
fb0198 + 224
4 UIKit 0x000000018ffafec8 + 116
5 libdispatch.dylib 0x0000000185a06a14 + 16
6 libdispatch.dylib 0x0000000185a0ef08 + 428
7 libdispatch.dylib 0x0000000185a18848 + 1588
8 libdispatch.dylib 0x0000000185a13570 + 720
9 CoreFoundation 0x0000000186032544 + 12
10 CoreFoundation 0x0000000186030120 + 2012
11 CoreFoundation 0x0000000185f4fe58 CFRunLoopRunSpecific + 436
12 GraphicsServices 0x0000000187dfcf84 GSEventRunModal + 100
13 UIKit 0x000000018f5cf67c UIApplicationMain + 236
14 MyApp.iOS 0x0000000101ab32c0 MyApp.iOS + 19493568
15 MyApp.iOS 0x000000010138833c MyApp.iOS + 11977532
16 MyApp.iOS
x00000001008b64bc MyApp.iOS + 631996
25 libdyld.dylib 0x0000000185a6c56c + 4
2017-12-07 16:44:22.880 MyApp.iOS[307:35483] Unhandled managed exception:
Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: Exception raised while auto-deactivating for style 2: force deactivating with style TurnOn which is not active (activationCount = -1)
configuration: <_UIImpactFeedbackGeneratorConfiguration: 0x1c4aba820: isEnabled=1, activationStyle=2, requiredSupportLevel=2>
activationCount: -1, styleActivationCount: -1
engines: {(
<_UIFeedbackHapticOnlyEngine: 0x1c42c3f70: state=4, numberOfClients=1, prewarmCount=0, _isSuspended=0>
)}
Native stack trace:
0 CoreFoundation 0x000000018608a37c + 148
1 libobjc.A.dylib 0x00000001852d0528 objc_exception_throw + 56
2 CoreFoundation 0x000000018608a2ac + 0
3 UIKit 0x000000018ffb0198 + 224
4 UIKit 0x000000018ffafec8 + 116
5 libdispatch.dylib 0x0000000185a06a14 + 16
6 libdispatch.dylib 0x0000000185a0ef08 + 428
7 libdispatch.dylib 0x0000000185a18848 + 1588
8 libdispatch.dylib 0x0000000185a13570 + 720
9 CoreFoundation 0x0000000186032544 + 12
10 CoreFoundation 0x0000000186030120 + 2012
11 CoreFoundation 0x0000000185f4fe58 CFRunLoopRunSpecific + 436
12 GraphicsServices 0x0000000187dfcf84 GSEventRunModal + 100
13 UIKit 0x000000018f5cf67c UIApplicationMain + 236
14 MyApp.iOS 0x0000000101ab32c0 MyApp.iOS + 19493568
15 MyApp.iOS 0x000000010138833c MyApp.iOS + 11977532
16 MyApp.iOS 0x00000001013881fc Bate
leur.iOS + 11977212
17 MyApp.iOS 0x00000001008b77a0 MyApp.iOS + 636832
18 MyApp.iOS 0x0000000100df33b4 MyApp.iOS + 6124468
19 MyApp.iOS 0x0000000104463678 mono_pmip + 22124
20 MyApp.iOS 0x00000001044cfd28 mono_pmip + 466204
21 MyApp.iOS 0x00000001044d2a08 mono_pmip + 477692
22 MyApp.iOS 0x000000010444bf30 _ZN7plcrash3BIT5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 281464
23 MyApp.iOS 0x000000010458fe84 xamarin_localized_string_format_9 + 22244
24 MyApp.iOS 0x00000001008b64bc MyApp.iOS + 631996
25 libdyld.dylib 0x0000000185a6c56c + 4
(Foundation.MonoTouchException)
at ObjCRuntime.Runtime.ThrowNSException (System.IntPtr ns_exception) [0x00000] in /Users/builder/data/lanes/5489/c4240f3f/source/xamarin-macio
s/src/ObjCRuntime/Runtime.cs:362
at ObjCRuntime.Runtime.throw_ns_exception (System.IntPtr exc) [0x00000] in /Users/builder/data/lanes/5489/c4240f3f/source/xamarin-macios/runtime/Delegates.generated.cs:130
at (wrapper native-to-managed) ObjCRuntime.Runtime:throw_ns_exception (intptr)
--- End of stack trace from previous location where exception was thrown ---
at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Users/builder/data/lanes/5489/c4240f3f/source/xamarin-macios/src/UIKit/UIApplication.cs:79
at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00038] in /Users/builder/data/lanes/5489/c4240f3f/source/xamarin-macios/src/UIKit/UIApplication.cs:63
at MyApp.iOS.Application.Main (System.String[] args) [0x00001] in E:-\Mobile\src\Shared\iOS\Main.cs:9
2017-12-07 16:
44:22.881 MyApp.iOS[307:35483] critical: Stacktrace:

2017-12-07 16:44:22.882 MyApp.iOS[307:35483] critical:
Native stacktrace:
2017-12-07 16:44:22.885 MyApp.iOS[307:35483] critical: 0 MyApp.iOS 0x0000000104455560 _ZN7plcrash3BIT5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 319912
2017-12-07 16:44:22.885 MyApp.iOS[307:35483] critical: 1 libsystem_platform.dylib 0x0000000185cabb50 _sigtramp + 52
2017-12-07 16:44:22.886 MyApp.iOS[307:35483] critical: 2 libsystem_pthread.dylib 0x0000000185cb12f8 + 396
2017-12-07 16:44:22.887 MyApp.iOS[307:35483] critical: 3 libsystem_c.dylib 0x0000000185b0afbc abort + 140
2017-12-07 16:44:22.888 MyApp.iOS[307:35483] critical: 4 MyApp.iOS 0x0000000104581944 xamarin_get_block_descriptor + 8532
2017-12-07 16:44:22.888 MyApp.iOS[307:35483] critical: 5 MyApp.iOS 0x0000000104494114 mono_pmip + 221448
2017-12-07 16:44:22.889 MyApp.iOS[307:35483] critical: 6 MyApp.iOS 0x000000010445535c _ZN7plcrash3BIT5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 319396
2017-12-07 16:44:22.890 MyApp.iOS[307:35483] critical: 7 MyApp.iOS 0x000000010445416c _ZN7plcrash3BIT5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 314804
2017-12-07 16:44:22.890 MyApp.iOS[307:35483] critical: 8 MyApp.iOS 0x000000010444c750 _ZN7plcrash3BIT5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 283544
2017-12-07 16:44:22.891 MyApp.iOS[307:35483] critical: 9 MyApp.iOS 0x0000000100e48908 MyApp.iOS + 6473992
2017-12-07 16:44:22.891 MyApp.iOS[307:35483] critical: 10 MyApp.iOS 0x0000000104581698 xamarin_get_block_descriptor + 7848
2017-12-07 16:44:22.892 MyApp.iOS[307:35483] critical: 11 MyApp.iOS 0x0000000104581518 xamarin_get_block_descriptor + 7464
2017-12-07 16:44:22.893 MyApp.iOS[307:35483] critical: 12 MyApp.iOS 0x00000001045814d4 xamarin_get_block_descriptor + 7396
2017-12-07 16:44:22.893 MyApp.iOS[307:35483] critical: 13 MyApp.iOS 0x0000000101b8efd4 MyApp.iOS + 20393940
2017-12-07 16:44:22.894 MyApp.iOS[307:35483] critical: 14 MyApp.iOS 0x000000010457fa60 xamarin_get_block_descriptor + 624
2017-12-07 16:44:22.894 MyApp.iOS[307:35483] critical: 15 MyApp.iOS 0x0000000104581f1c xamarin_get_block_descriptor + 10028
2017-12-07 16:44:22.895 MyApp.iOS[307:35483] critical: 16 CoreFoundation 0x000000018608a6d8 + 628
2017-12-07 16:44:22.896 MyApp.iOS[307:35483] critical: 17 libobjc.A.dylib 0x00000001852d0804 + 112
2017-12-07 16:44:22.896 MyApp.iOS[307:35483] critical: 18 libc++abi.dylib 0x00000001852c054c + 16
2017-12-07 16:44:22.897 MyApp.iOS[307:35483] critical: 19 libc++abi.dylib 0x00000001852c05b8 _ZSt9terminatev + 60
2017-12-07 16:44:22.898 MyApp.iOS[307:35483] critical: 20 libdispatch.dylib 0x0000000185a06a28 + 36
2017-12-07 16:44:22.898 MyApp.iOS[307:35483] critical: 21 libdispatch.dylib 0x0000000185a0ef08 + 428
2017-12-07 16:44:22.899 MyApp.iOS[307:35483] critical: 22 libdispatch.dylib 0x0000000185a18848 + 1588
2017-12-07 16:44:22.899 MyApp.iOS[307:35483] critical: 23 libdispatch.dylib 0x0000000185a13570 + 720
2017-12-07 16:44:22.900 MyApp.iOS[307:35483] critical: 24 CoreFoundation 0x0000000186032544 + 12
2017-12-07 16:44:22.900 MyApp.iOS[307:35483] critical: 25 CoreFoundation 0x0000000186030120 + 2012
2017-12-07 16:44:22.900 MyApp.iOS[307:35483] critical: 26 CoreFoundation 0x0000000185f4fe58 CFRunLoopRunSpecific + 436
2017-12-07 16:44:22.901 MyApp.iOS[307:35483] critical: 27 GraphicsServices 0x0000000187dfcf84 GSEventRunModal + 100
2017-12-07 16:44:22.901 MyApp.iOS[307:35483] critical: 28 UIKit 0x000000018f5cf67c UIApplicationMain + 236
2017-12-07 16:44:22.902 MyApp.iOS[307:35483] critical: 29 MyApp.iOS 0x0000000101ab32c0 MyApp.iOS + 19493568
2017-12-07 16:44:22.902 MyApp.iOS[307:35483] critical: 30 MyApp.iOS 0x000000010138833c MyApp.iOS + 11977532
2017-12-07 16:44:22.902 MyApp.iOS[307:35483] critical: 31 MyApp.iOS 0x00000001013881fc MyApp.iOS + 11977212
2017-12-07 16:44:22.903 MyApp.iOS[307:35483] critical: 32 MyApp.iOS 0x00000001008b77a0 MyApp.iOS + 636832
2017-12-07 16:44:22.903 MyApp.iOS[307:35483] critical: 33 MyApp.iOS 0x0000000100df33b4 MyApp.iOS + 6124468
2017-12-07 16:44:22.903 MyApp.iOS[307:35483] critical: 34 MyApp.iOS 0x0000000104463678 mono_pmip + 22124
2017-12-07 16:44:22.904 MyApp.iOS[307:35483] critical: 35 MyApp.iOS 0x00000001044cfd28 mono_pmip + 466204
2017-12-07 16:44:22.904 MyApp.iOS[307:35483] critical: 36 MyApp.iOS 0x00000001044d2a08 mono_pmip + 477692
2017-12-07 16:44:22.905 MyApp.iOS[307:35483] critical: 37 MyApp.iOS 0x000000010444bf30 _ZN7plcrash3BIT5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 281464
2017-12-07 16:44:22.905 MyApp.iOS[307:35483] critical: 38 MyApp.iOS 0x000000010458fe84 xamarin_localized_string_format_9 + 22244
2017-12-07 16:44:22.906 MyApp.iOS[307:35483] critical: 39 MyApp.iOS 0x00000001008b64bc MyApp.iOS + 631996
2017-12-07 16:44:22.906 MyApp.iOS[307:35483] critical: 40 libdyld.dylib 0x0000000185a6c56c + 4
2017-12-07 16:44:22.906 MyApp.iOS[307:35483] critical:

Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.

The app has been terminated.
Failed to Stop app: An error occured on client IDB480752 while executing a reply for topic xvs/idb/4.8.0.752/stop-app
The app has been terminated.

Setting Main Page in quick succession causes crash on Android

Description

When setting the main page of an application twice in quick succession, the app crashes with an IllegalArgumentException on Android.

Steps to Reproduce

  1. Set the main page of an application to a NavigationPage
  2. A short time after, set the main page again

Expected Behavior

The application navigates to the first page, then the second.

Actual Behavior

The application crashes.

Basic Information

  • Version with issue: 2.5

  • Visual Studio Version: VS for Mac 7.3

  • Platform Target Frameworks:

    • Android: 7.1
  • Android Support Library Version: 25.4.0.2

Below is a stack trace from the attached sample application:
--- End of managed Java.Lang.IllegalArgumentException stack trace ---
java.lang.IllegalArgumentException: No view found for id 0x3 (unknown) for fragment FragmentContainer{eabbdaa #0 id=0x3}
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1334)
at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1569)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1636)
at android.support.v4.app.BackStackRecord.executeOps(BackStackRecord.java:758)
at android.support.v4.app.FragmentManagerImpl.executeOps(FragmentManager.java:2415)
at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2201)
at android.support.v4.app.FragmentManagerImpl.optimizeAndExecuteOps(FragmentManager.java:2155)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2064)
at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:718)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6682)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)

Here is another stacktrace from our application in development, which seems to point to the disposal of the NavigationPageRenderer.

java.lang.IllegalArgumentException: No view found for id 0x2 (unknown) for fragment FragmentContainer{1b3651a #0 id=0x2}
android.support.v4.app.FragmentManagerImpl.moveToState()FragmentManager.java:1293
android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState()FragmentManager.java:1528
android.support.v4.app.FragmentManagerImpl.moveToState()FragmentManager.java:1595
android.support.v4.app.BackStackRecord.executeOps()BackStackRecord.java:758
android.support.v4.app.FragmentManagerImpl.executeOps()FragmentManager.java:2363
android.support.v4.app.FragmentManagerImpl.executeOpsTogether()FragmentManager.java:2149
android.support.v4.app.FragmentManagerImpl.optimizeAndExecuteOps()FragmentManager.java:2103
android.support.v4.app.FragmentManagerImpl.execPendingActions()FragmentManager.java:2013
android.support.v4.app.FragmentManagerImpl.executePendingTransactions()FragmentManager.java:763
mono.java.lang.RunnableImplementor.n_run(Native Method)
mono.java.lang.RunnableImplementor.run()RunnableImplementor.java:30
android.os.Handler.handleCallback()Handler.java:751
android.os.Handler.dispatchMessage()Handler.java:95
android.os.Looper.loop()Looper.java:154
android.app.ActivityThread.main()ActivityThread.java:6077
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run()ZygoteInit.java:865
com.android.internal.os.ZygoteInit.main()ZygoteInit.java:755
caused.RuntimeException(unknown)
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()<01e1b59e4261433ba399257491230b03>:0
Java.Interop.JniEnvironment.InstanceMethods.CallBooleanMethod(JniObjectReference instance, JniMethodInfo method)<02d99c7710584bb18b40b9052f4c0bab>:0
Android.Runtime.JNIEnv.CallBooleanMethod(IntPtr jobject, IntPtr jmethod)<27f5f7ad675348b8b88d2eb52bf5ff31>:0
Android.Support.V4.App.FragmentManagerInvoker.ExecutePendingTransactions()<7e083afc7c9045f59e01d9c14931060d>:0
Xamarin.Forms.Platform.Android.AppCompat.NavigationPageRenderer.Dispose(bool disposing)<1481f85a917c4f2b882ea161e9bc082f>:0
Java.Lang.Object.Dispose()<27f5f7ad675348b8b88d2eb52bf5ff31>:0
Xamarin.Forms.Platform.Android.AppCompat.Platform.SetPage(Page newRoot)<1481f85a917c4f2b882ea161e9bc082f>:0
Xamarin.Forms.Platform.Android.FormsAppCompatActivity.InternalSetPage(Page page)<1481f85a917c4f2b882ea161e9bc082f>:0
Xamarin.Forms.Platform.Android.FormsAppCompatActivity.AppOnPropertyChanged(object sender, PropertyChangedEventArgs args)<1481f85a917c4f2b882ea161e9bc082f>:0
Xamarin.Forms.BindableObject.OnPropertyChanged(string propertyName)<0f1ce60dbc6b4e24af01294c7acf41c6>:0
Xamarin.Forms.Element.OnPropertyChanged(string propertyName)<0f1ce60dbc6b4e24af01294c7acf41c6>:0
Xamarin.Forms.Application.set_MainPage(Page value)<0f1ce60dbc6b4e24af01294c7acf41c6>:0
Company.Forms.Services.NavigationService.<>c__DisplayClass11_0.<b__0>d.MoveNext()<093836f8b263470cbe4aa7ecb3e2d09b>:0
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()<01e1b59e4261433ba399257491230b03>:0
System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.b__6_0(object state)<01e1b59e4261433ba399257491230b03>:0
Android.App.SyncContext.<>c__DisplayClass2_0.b__0()<27f5f7ad675348b8b88d2eb52bf5ff31>:0
Java.Lang.Thread.RunnableImplementor.Run()<27f5f7ad675348b8b88d2eb52bf5ff31>:0
Java.Lang.IRunnableInvoker.n_Run(IntPtr jnienv, IntPtr native__this)<27f5f7ad675348b8b88d2eb52bf5ff31>:0
at (wrapper dynamic-method) System.Object:f04862c3-b38a-42d2-895a-840077e201b6 (intptr,intptr)
--- End of managed Java.Lang.RuntimeException stack trace ---
java.lang.IllegalArgumentException: No view found for id 0x2 (unknown) for fragment FragmentContainer{1b3651a #0 id=0x2}
android.support.v4.app.FragmentManagerImpl.moveToState()FragmentManager.java:1293
android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState()FragmentManager.java:1528
android.support.v4.app.FragmentManagerImpl.moveToState()FragmentManager.java:1595
android.support.v4.app.BackStackRecord.executeOps()BackStackRecord.java:758
android.support.v4.app.FragmentManagerImpl.executeOps()FragmentManager.java:2363
android.support.v4.app.FragmentManagerImpl.executeOpsTogether()FragmentManager.java:2149
android.support.v4.app.FragmentManagerImpl.optimizeAndExecuteOps()FragmentManager.java:2103
android.support.v4.app.FragmentManagerImpl.execPendingActions()FragmentManager.java:2013
android.support.v4.app.FragmentManagerImpl.executePendingTransactions()FragmentManager.java:763
mono.java.lang.RunnableImplementor.n_run(Native Method)
mono.java.lang.RunnableImplementor.run()RunnableImplementor.java:30
android.os.Handler.handleCallback()Handler.java:751
android.os.Handler.dispatchMessage()Handler.java:95
android.os.Looper.loop()Looper.java:154
android.app.ActivityThread.main()ActivityThread.java:6077
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run()ZygoteInit.java:865
com.android.internal.os.ZygoteInit.main()ZygoteInit.java:755

Reproduction Link

navigationcrash.zip

[Enhancement] Bindable Span

Summary

The Span class should have Bindable properties and the addition of a Style property.

API Changes

Make Span Inherit from BindableObject and support bindings on the properties. Also add a Style property so that Spans can be individually styled in the same way as a Label.

eg:

<Label>
    <Label.FormattedText>
        <FormattedString>
            <FormattedString.Spans>
                <Span Text="My Label" Style="{StaticResource title-style}" />
                <Span Text="{Binding Info}" Style="{StaticResource text-style}" />
                <Span Text="{Binding Sum}" Style="{StaticResource number-style}" />
            </FormattedString.Spans>
        </FormattedString>
    </Label.FormattedText>
</Label>

Intended Use Case

Bindable spans make for much simpler FormattedText. This is not the first time this has been requested.
https://xamarin.uservoice.com/forums/258559-xamarin-forms-suggestions/suggestions/6256703-extend-span-with-bindable-text-and-tapgesture
https://xamarin.uservoice.com/forums/258559-xamarin-forms-suggestions/suggestions/6622199-unseal-span-or-make-it-bindable

Also nice to have the ability to nicely format labels as follows.

SPANS-FTW

Migrated from Evlolution

Backwards Compatibility

Bindable span should not present any major backwards compatibility issues at first blush. Changing the base class of Span on its own should not provide any breaks provided the same interfaces remain properly implemented.

Difficulty : Easy

XAML components should begin working automatically once the base class is updated.

[Forms][iOS] Error CS1703 Multiple assemblies with equivalent identity Net standard 2.0 Automapper

Description

Cross post from Automapper AutoMapper/AutoMapper#2455

When adding AutoMapper >= 6.2.0, the forms iOS project fails to build and outputs a CS1703 error.

The exact error is

Error CS1703

Multiple assemblies with equivalent identity have been imported: 
'C:\Users\plebm\.nuget\packages\system.reflection.emit\4.3.0\ref\netstandard1.1\System.Reflection.Emit.dll' 
and 
'C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\Xamarin.iOS\v1.0\Facades\System.Reflection.Emit.dll'.
Remove one of the duplicate references.

It seems to be caused by AutoMapper adding an additional dependency of System.Runtime.Serialization.Primitives.4.3.0 in 6.2.0

Steps to Reproduce

using VS 15.5.1

  1. Create Xamarin Cross-Plat App (Xam.Forms)
  2. Select iOS and .net standard from the create options
  3. Add Automapper (6.2.2) to the .net standard project
  4. Build the iOS project

Expected Behavior

Build was successful

Actual Behavior

Build failed

tabbed page BarTextColor is not pervasive and can't be applied after instantiation

Description

The barcode text setting for Tabbed Pages does not "stick" after instantiating. So if you add/remove children from the tabbed page, that text colour won't apply to the new children, and attempts to reapply that setting are in vain.

Steps to Reproduce

  1. Create Tabbed Page with multiple children
  2. Set BarTextColor to White
  3. Remove child in code, add a new one.
  4. Observe new children will not have white bartextcolor.

XAML would look like :

   <TabbedPage.BarBackgroundColor>
       <Color x:Uid="colorPrimary">#61a60e</Color>
   </TabbedPage.BarBackgroundColor>

   <TabbedPage.BarTextColor>
       <Color x:Uid="colorPrimary">#ffffff</Color>
   </TabbedPage.BarTextColor>

   <TabbedPage.BackgroundColor>
       <Color x:Uid="colorPrimary">#61a60e</Color>
   </TabbedPage.BackgroundColor>

   <TabbedPage.Children>
       <local:HomePageSavings Title="Savings" x:Name="btnSavings" Icon="Home.png" IsVisible="True"/>
       <local:LoyaltyCard Title="Loyalty" x:Name="btnLoyalty" Icon="Loyalty.png"  IsVisible="True"/>
       <local:eFlyer Title="eFlyer" x:Name="btneFlyer" Icon="eFlyer.png"  IsVisible="True"/>
       <local:GiftCard Title="Giftcard" x:Name="btnGift" Icon="Gift.png"  IsVisible="True"/>
   </TabbedPage.Children>

Now in C# code, try swapping out some pages with (MainPage and LinkLoyalty being content view pages):

           this.Children.RemoveAt(0);
           this.Children.Insert(0, new MainPage { Title = "Home", Icon = "Home.png" });

           this.Children.RemoveAt(1);
           this.Children.Insert(1, new LinkLoyalty { Title = "Loyalty", Icon = "Loyalty.png" });

Try applying the setting again with something like this.BarBackgroundColor = Color.White.

Expected Behavior

White should be the text color of all the child tabs. Alternatively, c# code to set the text color after adding a child should change the text color... but it doesn't.

Actual Behavior

You'll see that it won't apply. The untouched tab still has white text, but any children added do not.

Basic Information

Xamarin Forms v. 2.5

Reproduction Link

https://github.com/xamarin/Xamarin.Forms/files/1535251/Bug1323.zip

Adding .resx and designer files as links causes MissingManifestResourceException at runtime

Description

Using the master-detail solution template from Visual Studio 2017 15.5, a MissingManifestResourceException can occur at runtime if you add an existing .resx file to the Xamarin forms project as a link. The issue does not occur if you add an existing .resx file normally (ie make a copy).

Steps to Reproduce

(This is simplified to illustrate the problem)

  1. Create a new project in Visual Studio -> Cross platform app
  2. In the Wizard, select the following settings:
    Master Detail
    Platform: Android, iOS, Windows (UWP)
    UI Technology: Xamarin.Forms
    Code Sharing Strategy: .NET Standard
  3. Right click on the solution -> Add -> New project
  4. Create a default WPF project
  5. Right click on the WPF project -> Add -> New item
  6. Add a .resx file to the WPF project and add a new string value to the file
  7. In the Solution Explorer, right click on the Xamarin.Forms project (not the platform-specific projects) and click Add -> Existing item...
  8. Navigate to the resource and designer files you created and Add As Link
  9. In the Xamarin.Forms project, open Views/NewItemPage.xaml.cs
  10. In the NewItemPage constructor, change one of the new Item properties from the hard coded string to the resource string you defined in the .resx file
  11. Run the UWP project and click the Add button in the top right

Expected Behavior

The New Item page opens up with the resource string value displayed

Actual Behavior

A MissingManifestResourceException is thrown, crashing the application

The issue does not occur if you add the .resx and designer files to the Xamarin.Forms project normally, instead of as links.

A sample project is attached.

App3.zip

App startup crash in ios 11 and above

Bug report best practices: https://github.com/xamarin/Xamarin.Forms/wiki/Submitting-Issues

Description

App startup crash in ios 11 and above during review in Apple Store, but working fine on developer's physical phone (running ios 11.2).

Steps to Reproduce

  1. Upload app binary through iTunes Connect.
  2. Wait for app reviewed by Apple Store.
  3. App startup crash in ios 11 and above.

Expected Behavior

Run without problem in all iPhone OS.

Actual Behavior

Startup crash on iOS 11 and above in Apple Store side

Basic Information

  • IDE: Visual Studio 7.3 (build 799)
  • Platform Target Frameworks:
    • iOS: iOS SDK 10.2
    • Android: Android SDK Platform-Tools 27.0.0, Compiling against Android 8.0 (API 26)
  • Android Support Library Version: 26.1.0
  • Nuget Packages:
    • Json.NET 7.0.1
    • ModernHttpClient 2.4.2
    • Xamarin Mobile 0.7.5
  • Affected Devices: iPhone running OS 11 and above

UWP no longer triggers XAML build step in .NET Standard world

Description

Pretty much what the tittle says. Oddly still works with design time builds so intellisense picks up the InitializeComponent calls.

Steps to Reproduce

  1. Try to build reproduction project

Expected Behavior

Build works

Actual Behavior

Build fails

Basic Information

  • Version with issue: 2.6.0 nightly
  • Last known good version: 2.5.0
  • IDE: VS 2017
  • Platform Target Frameworks:
    • iOS: N/A
    • Android: N/A
    • UWP: Fall Creators Update
  • Android Support Library Version: N/A
  • Nuget Packages: N/A
  • Affected Devices: N/A

Screenshots

N/A

Reproduction Link

App3.zip

TabbedPage.CurrentPage is null for "More" group tabs on iOS

Description

When switching tabs within the "more" group of a TabbedPage on iOS, the CurrentPageChanged event does not fire and the CurrentPage property is not properly set and will return null.

That means there is no way to get the current selected tab if it exists in the โ€œmoreโ€ group.

Steps to Reproduce

  1. Create a TabbedPage with 7+ tabs (see repo link)
  2. Handle the CurrentPageChanged event and set a break point
  3. Run the app on iOS
  4. Selected various tabs in the "more" group and observe the event never fires and the CurrentPage property is consistently null until you switch to a tab that is not located in the "more" group. Click on the "CurrentPage" button on any of the tabs within the "more" group and notice that no Alert is displayed as the CurrentPage is null. However, select a tab not in the "more" group and click the "CurrentPage" button and the Alert is displayed with the CurrentPage value.

Expected Behavior

The CurrentPageChange event should fire and the CurrentPage property should be set on each tab change regardless of if it exists in the "more" group or not.

Actual Behavior

The CurrentPageChange event does not fire and the CurrentPage is null when selecting tabs in the "more" group on iOS.

Basic Information

  • Version with issue: 2.5.0.77107
  • Last known good version: none
  • IDE: VS2017 15.5
  • Platform Target Frameworks:
    • iOS: 11.1

Reproduction Link

https://github.com/brianlagunas/TabbedPageCurrentPageIssue

[UWP] The SelectedItem in a ListView is not highlighted when set while constructing a page

Description

Setting a SelectedItem on a ListView when constructing a page doesn't select the item in the list on UWP.

Steps to Reproduce

This should simply require unzipping and running the reproduction -- the MainPage has a ListView which already does the work of setting the SelcetedItem.

Expected Behavior

The selected item is visually highlighted in the list.

Actual Behavior

The selected item is not visually highlighted on UWP. It is on Android and iOS.

Basic Information

  • Version with issue: 2.5.0.191934
  • Last known good version: Uncertain. This may have worked at some point, or maybe not.
  • IDE: VS2017
  • Platform Target Frameworks:
    • iOS: 11.2
    • Android: 8.0
    • UWP: 16299
  • Android Support Library Version: (Not applicable)
  • Nuget Packages: (Not Applicable -- baseline Forms project/updated packages)
  • Affected Devices: Devices/machines running Windows 10

Screenshots

Reproduction Link

App1.zip

[Forms] Label inside ViewCell is cut off vertically when LineBreakMode is WrapWords (default)

Description

We have a pretty complex layout for our ViewCells, consisting of Grids and StackLayouts inside ContentViews. The whole thing looks as follows:

+-+-----------------------+---+---+---+-+
| |      <title>          |<i>|<i>|<i>| | (a)
| +-----------------------+---+---+---+ |
| |                       |   |   |   | |
| |                                   | |
| |   <actual content (colspan=4)>    | | (*)
| |                                   | |
| |                       |   |   |   | |
+-+-----------------------+---+---+---+-+
(a)         (*)            (a) (a) (a) (a)

(a) ..... auto-sizing
(*) ..... star-sizing

Steps to Reproduce

  1. Start the repro UWP project
  2. The silly long text will be cut off at the end, so you cannot see the grumpy ._. smiley
  3. Resize the window and it will show

Expected Behavior

The cell should resize and show the full text

Actual Behavior

The text is cut off

Workaround

  1. Go to MainPage.xaml (in the PCL) and uncomment the RowDefinitions
  2. Start again
  3. The cell is resizing correctly

Basic Information

  • Version with issue: 2.3.5.256-pre6, 2.5.0.121934
  • Last known good version: N/A
  • IDE: VS15 Windows

Reproduction Link

FormsLabelInListViewCutOff.zip

The solution is called UWPLabelInListViewCutOff, but this issue is occurring on all platforms. UWP is just the simplest and fastest (for me) to test.

Use of custom NavigationPage class in Xamarin.Forms crashes in iOS build with System.MissingMethodException: Method 'UIKit.UINavigationBar.set_LargeTitleTextAttributes' not found.

Description

Migrated from https://bugzilla.xamarin.com/show_bug.cgi?id=61019
Use of custom NavigationPage class in Xamarin.Forms crashes in iOS build with following error only in latest XF version :-

Unhandled Exception:
System.MissingMethodException: Method 'UIKit.UINavigationBar.set_LargeTitleTextAttributes' not found.

Steps to Reproduce

  1. Create sample Xamarin.Forms app with XF v2.5.0.91635 OR with XF v2.5.0.121934
  2. Create custom NavigationPage class by extending NavigationPage.
  3. Use this custom class to add ContentPages of app in Navigation. On launch app crashes only in iOS with System.MissingMethodException: Method 'UIKit.UINavigationBar.set_LargeTitleTextAttributes'
    error.

iOS app is working fine with XF v2.3.3.193.

Expected Behavior

iOS app should run normal.

Actual Behavior

iOS app crashes.

Basic Information

  • Version with issue: v2.5.0.121934 and v2.5.0.91635
  • Last known good version: XF v2.3.3.193.
  • IDE: Visual Studio 2015 update 3
  • Platform Target Frameworks:
    • iOS: iOS SDK 10.3
    • Android: 7.1
    • UWP: NA
  • Android Support Library Version: 25.4.0.2
  • Nuget Packages:
  1. Xamarin.Forms.2.5.0.121934
  2. Xamarin Support libs 25.4.0.2
  • Affected Devices:

Environment details as below :-

Microsoft Visual Studio Professional 2015
Version 14.0.25420.01 Update 3
Microsoft .NET Framework
Version 4.6.01055

Installed Version: Professional

LightSwitch for Visual Studio 2015 00322-50050-34434-AA417
Microsoft LightSwitch for Visual Studio 2015

Visual Basic 2015 00322-50050-34434-AA417
Microsoft Visual Basic 2015

Visual C# 2015 00322-50050-34434-AA417
Microsoft Visual C# 2015

Visual C++ 2015 00322-50050-34434-AA417
Microsoft Visual C++ 2015

Visual F# 2015 00322-50050-34434-AA417
Microsoft Visual F# 2015

ASP.NET and Web Tools 2015.1 (Beta8) 14.1.11107.0
ASP.NET and Web Tools 2015.1 (Beta8)

ASP.NET Web Frameworks and Tools 2012.2 4.1.41102.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013 5.2.40314.0
For additional information, visit http://www.asp.net/

Common Azure Tools 1.8
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

GitHub.VisualStudio 2.2.0.11
A Visual Studio Extension that brings the GitHub Flow into Visual Studio.

JavaScript Language Service 2.0
JavaScript Language Service

JavaScript Project System 2.0
JavaScript Project System

Merq 1.1.17-rc (cba4571)
Command Bus, Event Stream and Async Manager for Visual Studio extensions.

Microsoft Azure Mobile Services Tools 1.4
Microsoft Azure Mobile Services Tools

Mono Debugging for Visual Studio Mono.Debugging.VisualStudio
Support for debugging Mono processes with Visual Studio.

NuGet Package Manager 3.4.4
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

Office Developer Tools for Visual Studio 2015 ENU 14.0.23025
Microsoft Office Developer Tools for Visual Studio 2015 ENU

PreEmptive Analytics Visualizer 1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

SQL Server Data Tools 14.0.60519.0
Microsoft SQL Server Data Tools

TypeScript 1.8.34.0
TypeScript tools for Visual Studio

Workflow Manager Tools 1.0 1.0
This package contains the necessary Visual Studio integration components for Workflow Manager.

Xamarin 4.5.0.486 (fec6f88)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android 7.3.1.2 (9dbc4c5)
Visual Studio extension to enable development for Xamarin.Android.

Xamarin.iOS 10.10.0.37 (ad35de4)
Visual Studio extension to enable development for Xamarin.iOS.

Screenshots

Reproduction Link

[Forms] Style Setter using x:Static stopped working

Description

When using a Style to set an object property with x:Static, the property is never set.

Steps to Reproduce

  1. Create a Style with a Setter using x:Static
  2. Apply the Style to the desired control

Expected Behavior

The property is set to the static value specified in the Style

Actual Behavior

The property is never set and remains null

Basic Information

  • Version with issue: 2.5.0.121934
  • Last known good version: 2.3.4.270
  • IDE: Visual Studio 2017 15.5.0
  • Platform Target Frameworks:
    • iOS: 11.1
    • Android: 8
    • UWP: 16299
  • Android Support Library Version: 25.4.0.2
  • Nuget Packages:
  • Affected Devices: All

Reproduction Link

XamarinStyleSetStaticBug.zip

Additional Information

This was working fine in previous versions of Xamarin Forms. I have included a working example using 2.3.4.270 with roughly the same code as the reproduction.

Java.Lang.IllegalStateException: Can not perform this action after onSaveInstanceState

Description

I'm filing this on behalf of a customer. Please contact me directly for customer specific details which I can't share here.

Q: Describe the issue including as much detail as possible
A: We upgraded our mobile app on 11/16. After that we have seen a huge increase in crashes as reported by Google Play console (see picture). The HockeyApp reporting did not see a similar increase.

Here is the little info that Google Play has on the crash:
java.lang.RuntimeException:
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1410)
Caused by: java.lang.reflect.InvocationTargetException:
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1520)

We believe it is also the most frequent bug we have in HockeyApp, which has more info:
FragmentManagerImpl.checkStateLoss
Java.Lang.IllegalStateException: Can not perform this action after onSaveInstanceState
java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
android.support.v4.app.FragmentManagerImpl.checkStateLoss()FragmentManager.java:1842
android.support.v4.app.FragmentManagerImpl.enqueueAction()FragmentManager.java:1860
android.support.v4.app.BackStackRecord.commitInternal()BackStackRecord.java:650
android.support.v4.app.BackStackRecord.commit()BackStackRecord.java:609
android.support.v4.app.DialogFragment.show()DialogFragment.java:143
mono.java.lang.RunnableImplementor.n_run(Native Method)
mono.java.lang.RunnableImplementor.run()RunnableImplementor.java:30
android.app.Activity.runOnUiThread()Activity.java:6082
md5a9f9c2b68bba3aa8be56a056e4cd456a.MainActivity.n_onActivityResult(Native Method)
md5a9f9c2b68bba3aa8be56a056e4cd456a.MainActivity.onActivityResult()MainActivity.java:66
epic.mychart.android.library.prelogin.a.b()AuthenticationService.java:758
epic.mychart.android.library.prelogin.a.a()AuthenticationService.java:55
epic.mychart.android.library.prelogin.a$4.a()AuthenticationService.java:605
epic.mychart.android.library.prelogin.a$5.a()AuthenticationService.java:628
epic.mychart.android.library.e.f.onPostExecute()CustomAsyncTask.java:608
android.os.AsyncTask.finish()AsyncTask.java:667
at android.os.AsyncTask.-wrap1(AsyncTask.java)
android.os.AsyncTask$InternalHandler.handleMessage()AsyncTask.java:684
android.os.Handler.dispatchMessage()Handler.java:102
android.os.Looper.loop()Looper.java:154
android.app.ActivityThread.main()ActivityThread.java:6823
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run()ZygoteInit.java:1557
com.android.internal.os.ZygoteInit.main()ZygoteInit.java:1445
Xamarin caused by: Java.Lang.IllegalStateException: Can not perform this action after onSaveInstanceState
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()<9d0e62014b6e4697a3a27c36abf42d32>:0
Java.Interop.JniEnvironment.InstanceMethods.CallNonvirtualVoidMethod(JniObjectReference instance, JniObjectReference type, JniMethodInfo method, JniArgumentValue* args)<788eebdbf0814bff8f927caa5d06e5bb>:0
Android.Runtime.JNIEnv.CallNonvirtualVoidMethod(IntPtr jobject, IntPtr jclass, IntPtr jmethod, JValue* parms):0
Android.Support.V4.App.DialogFragment.Show(FragmentManager manager, string tag)<7e083afc7c9045f59e01d9c14931060d>:0
Acr.UserDialogs.UserDialogsImpl.<>c__DisplayClass26_0<TFragment, TConfig>.b__0():0
Java.Lang.Thread.RunnableImplementor.Run():0
Java.Lang.IRunnableInvoker.n_Run(IntPtr jnienv, IntPtr native__this):0
at (wrapper dynamic-method) System.Object:e9b9f417-abc6-4c6f-91e1-cb97882c1fe4 (intptr,intptr)
--- End of managed Java.Lang.IllegalStateException stack trace ---
java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
android.support.v4.app.FragmentManagerImpl.checkStateLoss()FragmentManager.java:1842
android.support.v4.app.FragmentManagerImpl.enqueueAction()FragmentManager.java:1860
android.support.v4.app.BackStackRecord.commitInternal()BackStackRecord.java:650
android.support.v4.app.BackStackRecord.c

Steps to Reproduce

Are you able to reproduce the issue? Is it consistent? Or intermittent?
-We donโ€™t know how to reproduce, but it happens a lot to our customers. See picture of crashes.
ย 
Do you have related code to whatโ€™s shown in the stack trace? Is that something you can share?
-None of our code is referenced in the Google Play crash report.

Expected Behavior

Application should not crash with this error

Actual Behavior

This crash is reported in Google Play crash reports

Basic Information

  • Version with issue: 2.3.4.267

  • Last known good version: Xamarin.Forms 2.3.2.127

  • IDE: Visual Studio 2017 Enterprise 15.4.4

  • Platform Target Frameworks:
    Android - all versions

  • Nuget Packages: see attached screenshot for Nuget packages before and after the change that introduced the issue.

  • Affected Devices: No specific device type stands out. All devices.

XamarinWorkItemDetails.zip

Please contact me directly for customer specific details - david.hollowell @ alias

Xamarin.Forms Grid Measure and Layout bug

Description

I attached a simple xaml to reproduce the problem and screenshots. There are four labels "Begin t0 t1 t2 t3 t4 t5 t6 t7 t8 t9 end" which I am not able to show in the correct way without clipping.

Basic Information

  • Version with issue: 2.5.0.121934
  • IDE: Visual Studio 2017
  • Platform Target Frameworks:
    • UWP: 16299

Screenshots

During windows resize

  • b1

  • b2

  • b3

When I removed the row with Height="*" from the main grid

  • bx1

Reproduction Link

TestPage2.zip

[Android] TapGestureRecognizer do not respond consistently to taps

Bug report best practices: https://github.com/xamarin/Xamarin.Forms/wiki/Submitting-Issues

Description

On Android the TapGestureRegenisor do not consistently fire the tapped event.

Steps to Reproduce

Tap on any xamarin forms control (except button)

Expected Behavior

gesture event should be fired

Actual Behavior

most of times the gesture is not fired

Basic Information

This is a known bug, but with importance normal.
https://bugzilla.xamarin.com/show_bug.cgi?id=60893#c1

We have an application that is about to get to production next month and we must solve this.

Thanks,

Ady.

iOS Remote USB still not available

Bug report best practices: https://github.com/xamarin/Xamarin.Forms/wiki/Submitting-Issues

Description

This feature got a standing ovation at Evolve 2016. It was around for about a week, then pulled.
There was a survey on Twitter that MANY people didn't know about. Then ... well .... hello ... nothing.

The thread for it on Xamarin Forums still has people wanting to know when this will be available again.
https://forums.xamarin.com/discussion/comment/311153#Comment_311153

Please bring this back - when it was there it worked great.

[UWP] StackLayouts / NavigationPage leaks memory

Description

Migrated from https://bugzilla.xamarin.com/show_bug.cgi?id=61027.

On UWP with Xamarin.Forms pushing and then popping a page with StackLayouts on it to the navigation stack several times will cause the memory consumption grow infinitely.

Steps to Reproduce

Either take the sample project attached, or create a simple one with the following setup:

  • The main app should have a NavigationPage with the main page wrapped inside
  • That main page should have a ListView of elements
  • Clicking on any of those elements should take the user to another page (call it details page), by pushing it to the stack
  • Details page should have a back button that will pop the top of the navigation stack and taking it back to the main page

This navigation back-and-forth has to be done several times to see the memory usage increase. The problem is that the memory will never be released, GC will not collect it, even by forcing from either code or from Visual Studio's performance profiler set to monitor memory usage.

You can take a snapshot in the profiler when the app starts and then navigate to a page and then back maybe 20, 30 times. Take another snapshot again, and then let VS analyse the difference. See attached screenshot for the results.

Over longer periods of time this leads to crashes in every single UWP app with Xamarin.Forms that has this navigation capability.

Expected Behavior

Going back from a page should release the memory used by it, or at least the garbage collector should be able to clean it up at a certain point.

Actual Behavior

Memory usage increases indefinitely, eventually crashing the app.

Basic Information

  • Version with issue: 2.5.0.121934
  • Last known good version: I went back as far as 2.2, none of the versions I've tried worked
  • IDE: VS 2017 Community Edition on Windows 10
  • Platform Target Frameworks:
    • UWP: 15063
  • Nuget Packages: Xamarin.Forms

Screenshots

The issue is not visual, but using visual studio's performance profiler, you can get the following proof of the memory increase:
image

Reproduction Link

UWPMemoryLeakXamarinBugzilla.zip

ListView word wrap in Label causing ViewCells to overlap

Description

For certain values, (but not all), when a Label in a ViewCell word wraps, it's partially superimposed on the next ViewCell in the ListView.

Visual Studio 2015, 14.0.25425.01 Update 3 (on Windows 10)
Xamarin 4.7.10.38
Xamarin.iOS 11.3.0.47

Steps to Reproduce

  1. Run demo project

Expected Behavior

List should display correctly

Actual Behavior

CellView contents overlap

Basic Information

  • Version with issue:
  • Last known good version:
  • IDE:
  • Platform Target Frameworks:
    • iOS: Broken on iOS for the past 6 or so months on all the versions of Xamarin that I've used during that time.
    • Android: Works OK on android
    • UWP: I've never tried
  • Android Support Library Version: N/A
  • Affected Devices: Broken on iPhone6/7/8/X simulators and iPhone6 phone. Was broken on iOS 10.* and is still broken on iOS 11.1.

Reproduction Link

ListViewWrapBug.zip
simulator screen shot - iphone x - 2017-12-05 at 17 26 57

Xamarin Live Player wont' work with Prism

Bug report best practices: https://github.com/xamarin/Xamarin.Forms/wiki/Submitting-Issues

Description

https://twitter.com/brianlagunas/status/933006012415598592

Xamarin Live Player wont' work with Prism

Steps to Reproduce

  1. Create a basic Xamarin Forms with Prism template
  2. Try opening it in Live Player
  3. It shows blank screen

Expected Behavior

Should work seamlessly

Actual Behavior

It does not support

Basic Information

  • Version with issue: 2.5
  • Last known good version:
  • IDE: VS 2017
  • Platform Target Frameworks:
    • iOS: latest
    • Android: latest

Migrate to .NET Standard - Can't compile XAML

I have included a Repro.

I converted a working PCL app (X.Forms 2.5) to .NET Standard (Runs on X.Forms 2.5 as well)

On only 1 XAML I get the error:
"No property, bindable property, or event found for 'FontSize', or mismatching type between value and property"

To reproduce the error.

Create a .NET Standard 2 project with XForms 2.4 or 2.5, fails on both. Add this "Login.xaml" page. Attempt to compile.

If you Comment out the Labels and it compiles.


<?xml version="1.0" encoding="utf-8"?>

<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"

         x:Class="CoApp.Views.Test.LoginPageD"
         Title="Login">



<Grid>
    <!---BACKGROUND IMAGE-->
    

    <!-- TIP: We use a scrollview so that if the password is too low, when the keyboard appears, Forms will automatically scroll it into view -->
    <ScrollView
         >
        <!-- MAIN CONTAINER -->
        <Grid
            ColumnSpacing="0"
            RowSpacing="0"
            HorizontalOptions="Fill"
            VerticalOptions="FillAndExpand">

            <Grid.RowDefinitions>
                <RowDefinition Height="120" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>

            <!-- LOGO -->
            <Grid
                Grid.Row="0"
                WidthRequest="60"
                HeightRequest="60"
                Margin="20"
                VerticalOptions="End"
                HorizontalOptions="Start">

                <Image HorizontalOptions="Start" VerticalOptions="Center" WidthRequest="95" HeightRequest="95"
                       Source="icon.png" Aspect="AspectFill" />
            </Grid>


            <!--CLAIM TEXT-->
            <StackLayout
                Grid.Row="1"
                Spacing="10"
                Padding="20,10"
                Orientation="Vertical"
                VerticalOptions="Center">
                <Label 
                    LineBreakMode="WordWrap"

                    VerticalTextAlignment="Center"
                    FontAttributes="Bold">
                    <Label.FontSize>
                        <OnIdiom x:TypeArguments="x:Double" Phone="26" Tablet="36" />
                    </Label.FontSize>
                </Label>

                <Label
                    LineBreakMode="WordWrap"
                    Text="Login using your email and password."
                
                    VerticalTextAlignment="Center">
                    <Label.FontSize>
                        <OnIdiom x:TypeArguments="x:Double"
                                 Phone="17"
                                 Tablet="27" />
                    </Label.FontSize>
                </Label>

                <BoxView
         
                    />

            </StackLayout>


            <!---FIELDS CONTAINER-->
            <Grid
                Grid.Row="2"
                Padding="20,0"
                ColumnSpacing="0"
                RowSpacing="0"
                VerticalOptions="CenterAndExpand"
                HeightRequest="180">


                <StackLayout
                    Grid.Row="0"
                    VerticalOptions="StartAndExpand">
                    <StackLayout.Spacing>
                        <OnPlatform x:TypeArguments="x:Double">
                            <On Platform="Android">20</On>
                            <On Platform="iOS">40</On>
                        </OnPlatform>
                    </StackLayout.Spacing>
                    <!---EMAIL FIELD-->
                    <Entry
                        AutomationId="txtEmail"
                        Placeholder="E-mail"
                        >
                  
      

                    </Entry>

                    <!---PASSWORD FIELD-->
                    <Entry
                        AutomationId="txtPassword"
                        Placeholder="Password"
                    
                        IsPassword="true"
                     
                        VerticalOptions="StartAndExpand" >

                    </Entry>

              
                </StackLayout>


            </Grid>


        </Grid>
    </ScrollView>

</Grid>

Long time to layout ListView causing stutter in Master drawer closing animation

Description

When switching to a detail page that has a ListView with a non-trivial, though not very complex, ViewCell, the layout of the ListView takes long enough to cause a "stutter" in the drawer closing animation. This is only apparent on older devices runnning Android JellyBean. Was tested on:

https://www.gsmarena.com/samsung_galaxy_tab_2_7_0_p3100-4543.php ( by me)
http://www.wepoy.com/product_view_24.html ( by reporting customer)

Steps to reproduce

  1. Open the attached test project

  2. Deploy to device similar to those noted above.

  3. Open the Menu drawer and select the EmptyPage. Note that drawer closes with smooth animation.

  4. Open the Menu drawer and select the ContactsCS Page.

expected result: Menu drawer will close with smooth animation.

actual result: menu drawer stays open until ListView is loaded and then closes with no animation.

Notes

The issue ultimately seems to be the amount of time it is taking to layout the page with the ListView. Seeing that there was some issue with bindings generator being fired multiple times ( bug #60699), even though that was only reported for Android API 24+, I changed all of the bindings in the ViewCell to use static text instead. This did not change the page loading time that I could notice, IOW the issue persisted.

I tried simplifying the ViewCell layout so there was only one Label, and though this improved the issue there was still a "stutter" during the menu close animation.

Also in the OnItemSelected event handler in MainPageCS, the reporting customer was changing the detail page with this code:

Detail.Navigation.InsertPageBefore(page, Detail.Navigation.NavigationStack[0]);
await Detail.Navigation.PopToRootAsync(false);

Changing the above to:
Detail = new NavigationPage(page);

did seem to mitigate the issue as well, but a "stutter" is still experienced.

the reporting customer is caching all of the detail pages and tying to re-use them in order to try to workaround this issue, but I believe this won't help as the page will still get laid out when it appears, and it does seem that the layout is what is taking a while. The test project is using this caching mechanism. Not using the cached pages did not make a noticeable difference.

I also believe that the page loading is causing the animation for the drawer closing to stutter since all of that work needs to be done on the UI thread. I was able to avoid the stutter by delaying the page load by doing something like the following in OnItemSelected:

masterPage.ListView.SelectedItem = null; // Original project called this at the end of the OnItemSelected handler.
IsPresented = false; // Moved it to before the page change so the animation could start before the page change

await Task.Run( async () => {
await Task.Delay(150);
Device.BeginInvokeOnMainThread(() =>{
Detail = new NavigationPage(page);
});
});

The above allows the drawer close animation to complete smoothly, but then the detail page is blank until the page is laid out. so all this effectively does is allow the animation to complete before the page layout interrupts the UI thread.

I did not note this issue on any simulator or newer devices

Environment

Test project using Forms 2.4.0.38779 but I tested on 2.5.0 and did not see any difference.

=== Visual Studio Community 2017 for Mac ===

Version 7.2.2 (build 11)
Installation UUID: f86726f2-bd5d-4610-867e-44e82f306ca2
Runtime:
Mono 5.4.1.6 (2017-06/1f4613aa1ac) (64-bit)
GTK+ 2.24.23 (Raleigh theme)

Package version: 504010006

=== NuGet ===

Version: 4.3.1.4445

=== .NET Core ===

Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
2.0.0
1.1.1
1.0.4
1.0.0
SDK: /usr/local/share/dotnet/sdk/2.0.0/Sdks
SDK Versions:
2.0.0
1.0.1
1.0.0-preview2-003121
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.4.1/lib/mono/msbuild/15.0/bin/Sdks

=== Xamarin.Profiler ===

Version: 1.5.6
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Apple Developer Tools ===

Xcode 9.1 (13532)
Build 9B55

=== Xamarin.iOS ===

Version: 11.3.0.47 (Visual Studio Community)
Hash: 51128b8c
Branch: xcode9.1
Build date: 2017-10-31 22:42:13-0400

=== Xamarin.Android ===

Version: 8.0.2.1 (Visual Studio Community)
Android SDK: /Users/jongoldberger/Library/Developer/Xamarin/android-sdk-macosx
Supported Android versions:
4.0.3 (API level 15)
4.1 (API level 16)
4.2 (API level 17)
4.3 (API level 18)
4.4 (API level 19)
5.0 (API level 21)
5.1 (API level 22)
6.0 (API level 23)
7.0 (API level 24)
7.1 (API level 25)
8.0 (API level 26)

SDK Tools Version: 25.2.5
SDK Platform Tools Version: 26.0.2
SDK Build Tools Version: 26.0.2

Java SDK: /usr
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Xamarin.Mac ===

Version: 3.8.1.0 (Visual Studio Community)

=== Xamarin Inspector ===

Version: 1.3.2
Hash: 461f09a
Branch: 1.3-release
Build date: Tue, 03 Oct 2017 18:26:57 GMT
Client compatibility: 1

=== Build Information ===

Release ID: 702020011
Git revision: b604c37c5a4a2f0919b45ffbe2aaad9fe040af31
Build date: 2017-11-01 08:31:43-04
Xamarin addins: d57dc14cbd4eb166ee62bab585965ab78d3650bc
Build lane: monodevelop-lion-d15-4

=== Operating System ===

Mac OS X 10.13.1
Darwin 17.2.0 Darwin Kernel Version 17.2.0
Fri Sep 29 18:27:05 PDT 2017
root:xnu-4570.20.62~3/RELEASE_X86_64 x86_64

=== Enabled user installed addins ===

Internet of Things (IoT) development (Preview) 7.1

Test Project

MasterDetailPage-Modified.zip

Label HorizontalTextAlignment (Center or End) is not kept when navigating back to a page

Description

The horizontal text alignment of a label is lost on Android when navigating to another page and coming back. It's not updated until the text is updated (via binding). It's the same erroneous behavior whether the Label is in a Grid or a StackLayout. It works as expected on iOS and I haven't tested other platforms.

Steps to Reproduce

  1. Have a label with HorizontalTextAlignment = Center or End
  2. Navigate to another page
  3. Come back

Expected Behavior

The text is aligned center or right as configured.

Actual Behavior

The text is aligned left until the text is updated (via binding).

Basic Information

  • Version with issue: 2.5.0.121934
  • IDE: Rider
  • Platform Target Frameworks:
    • Android: 7.1.1
  • Android Support Library Version: 26.1.01
  • Affected Devices: Android simulator

Related

It seems to be the same bug as described here : https://stackoverflow.com/questions/43147929/xamarin-label-losing-text-alignment-when-page-returned-to. Sadly, I can't use the proposed workaround which is to set HorizontalOptions=EndAndExpand or End because the Label flicker when its size changes because of text changes.

Android Picker handling null

Hi all! Within my app, I have extended the Picker class and added an IsRequired property. If this is false, it does ItemsSource.Insert(0, null). This is all working as intended on UWP and iOS, however Android throws an exception:
java.lang.IllegalArgumentException: text cannot be null
when trying to select something.

Steps to Reproduce:

  1. Add a picker to a page
  2. Set the ItemsSource = new List { null, new object() }
  3. Run the app in Android
  4. Tap the Picker

Expected Behavior:
Picker renders with a blank value selected within the modal

Actual Behavior:
java.lang.IllegalArgumentException: text cannot be null
thrown

Basic Information:

  • Version with issue: 2.5.0.91635
  • Last known good version: -
  • IDE: Visual Studio 2017 Enterprise
  • Platform Target Frameworks:
    • iOS: 11.2
    • Android: 8.0
    • UWP: 10.0; Buid 15063

LogCat trace:
.
.
.
12-14 15:49:37.316 3837 4064 D ConnectivityService: sending notification for NetworkRequest [ id=1085, legacyType=-1, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED] ]
12-14 15:49:37.316 3837 4064 D ConnectivityService: sending notification CAP_CHANGED for NetworkRequest [ id=1085, legacyType=-1, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED] ]
12-14 15:49:37.317 3837 4064 D ConnectivityService: sending notification for NetworkRequest [ id=1086, legacyType=-1, [ Transports: WIFI Capabilities: NOT_RESTRICTED&TRUSTED&NOT_VPN] ]
12-14 15:49:37.317 3837 4064 D ConnectivityService: sending notification CAP_CHANGED for NetworkRequest [ id=1086, legacyType=-1, [ Transports: WIFI Capabilities: NOT_RESTRICTED&TRUSTED&NOT_VPN] ]
12-14 15:49:37.317 3837 4064 D ConnectivityService: sending notification for NetworkRequest [ id=1087, legacyType=-1, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED] ]
12-14 15:49:37.317 3837 4064 D ConnectivityService: sending notification CAP_CHANGED for NetworkRequest [ id=1087, legacyType=-1, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED] ]
12-14 15:49:37.317 3837 4064 D ConnectivityService: sending notification for NetworkRequest [ id=1088, legacyType=-1, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED] ]
12-14 15:49:37.318 3837 4064 D ConnectivityService: sending notification CAP_CHANGED for NetworkRequest [ id=1088, legacyType=-1, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED] ]
12-14 15:49:37.323 3837 6926 D SamsungAlarmManager: Cancel Alarm calling from uid:10026 pid :5349 / op:PendingIntent{c5c768a: PendingIntentRecord{bb4ebc8 com.google.android.gms broadcastIntent}}
12-14 15:49:37.327 3837 6926 I SamsungAlarmManager: setLocked to kernel - T:2 / 20171214T154945, SetElapsed=238188637, nowELAPSED=238180543
12-14 15:49:37.344 3837 3862 D DevicePolicyManagerService: PfW getPlayForWorkProxy() 0
12-14 15:49:37.347 3837 3862 D DevicePolicyManagerService: PfW getPlayForWorkProxy() flags & FLAG_ALLOW_PROXY_FOR_PFW 0
12-14 15:49:37.347 3837 3862 D DevicePolicyManagerService: PfW getPlayForWorkProxy() flag 0 does not allow PfW
12-14 15:49:37.348 12054 12143 I : Saving WTK articles in database. Count: 18
12-14 15:49:37.363 3837 5475 D SamsungAlarmManager: setInexact Intent (T:2/F:0/AC:false) 20171214T155002 - CU:10026/CP:5349
12-14 15:49:37.369 3837 5473 D DevicePolicyManagerService: PfW getPlayForWorkProxy() 0
12-14 15:49:37.372 3837 5473 D DevicePolicyManagerService: PfW getPlayForWorkProxy() flags & FLAG_ALLOW_PROXY_FOR_PFW 0
12-14 15:49:37.372 3837 5473 D DevicePolicyManagerService: PfW getPlayForWorkProxy() flag 0 does not allow PfW
12-14 15:49:37.376 3837 5512 D SamsungAlarmManager: Cancel Alarm calling from uid:10026 pid :5349 / op:PendingIntent{a937156: PendingIntentRecord{bb4ebc8 com.google.android.gms broadcastIntent}}
12-14 15:49:37.397 3837 4022 D CompatibilityInfo: mCompatibilityFlags - 0
12-14 15:49:37.397 3837 4022 D CompatibilityInfo: applicationDensity - 420
12-14 15:49:37.397 3837 4022 D CompatibilityInfo: applicationScale - 1.0
12-14 15:49:37.447 3837 4677 D SamsungAlarmManager: setInexact Intent (T:2/F:0/AC:false) 20171214T155002 - CU:10026/CP:5349
12-14 15:49:37.593 3837 4706 D MountService: MountService getExternalStorageMountMode : 3
12-14 15:49:37.593 3837 4706 D MountService: MountService getExternalStorageMountMode : 3
12-14 15:49:37.593 3837 4706 D MountService: MountService getExternalStorageMountMode : final mountMode=3, uid : 10149, packageName : com.android.chrome
12-14 15:49:37.611 12263 12263 E Zygote : v2
12-14 15:49:37.611 12263 12263 I libpersona: KNOX_SDCARD checking this for 10149
12-14 15:49:37.611 12263 12263 I libpersona: KNOX_SDCARD not a persona
12-14 15:49:37.612 3837 4706 I ActivityManager: Start proc 12263:com.android.chrome:privileged_process0/u0a149 for service com.android.chrome/org.chromium.content.app.PrivilegedProcessService0
12-14 15:49:37.613 12263 12263 E Zygote : accessInfo : 0
12-14 15:49:37.614 12263 12263 W SELinux : SELinux selinux_android_compute_policy_index : Policy Index[2], Con:u:r:zygote:s0 RAM:SEPF_SECMOBILE_7.0_0009, [-1 -1 -1 -1 0 1]
12-14 15:49:37.616 12263 12263 I SELinux : SELinux: seapp_context_lookup: seinfo=chrome, level=s0:c512,c768, pkgname=com.android.chrome:privileged_process0
12-14 15:49:37.663 12263 12263 D TimaKeyStoreProvider: TimaKeyStore is not enabled: cannot add TimaSignature Service and generateKeyPair Service
12-14 15:49:37.666 3837 5475 D CompatibilityInfo: mCompatibilityFlags - 0
12-14 15:49:37.667 3837 5475 D CompatibilityInfo: applicationDensity - 420
12-14 15:49:37.667 3837 5475 D CompatibilityInfo: applicationScale - 1.0
12-14 15:49:37.667 3837 5475 I ActivityManager: DSS on for com.android.chrome and scale is 1.0
12-14 15:49:37.669 3837 5475 D CompatibilityInfo: mCompatibilityFlags - 0
12-14 15:49:37.669 3837 5475 D CompatibilityInfo: applicationDensity - 420
12-14 15:49:37.669 3837 5475 D CompatibilityInfo: applicationScale - 1.0
12-14 15:49:37.676 3837 5475 D CompatibilityInfo: mCompatibilityFlags - 0
12-14 15:49:37.676 3837 5475 D CompatibilityInfo: applicationDensity - 420
12-14 15:49:37.676 3837 5475 D CompatibilityInfo: applicationScale - 1.0
12-14 15:49:37.700 12263 12263 I ResourcesManager: updateResourcesForOpenThemeChange for Desktop mode
12-14 15:49:37.733 12263 12263 I cr_ChildProcessService: Creating new ChildProcessService pid=12263
12-14 15:49:37.890 12263 12276 I cr_LibraryLoader: Time to load native libraries: 128 ms (timestamps 7630-7758)
12-14 15:49:37.890 12263 12276 I cr_LibraryLoader: Using linker: org.chromium.base.library_loader.ModernLinker
12-14 15:49:37.892 12263 12276 I chromium: [INFO:library_loader_hooks.cc(46)] Chromium logging enabled: level = 0, default verbosity = 0
12-14 15:49:37.892 12263 12276 I cr_LibraryLoader: Expected native library version number "62.0.3202.84", actual native library version number "62.0.3202.84"
12-14 15:49:37.902 10961 10961 D Mono : DllImport attempting to load: '/system/lib/liblog.so'.
12-14 15:49:37.904 10961 10961 D Mono : DllImport loaded library '/system/lib/liblog.so'.
12-14 15:49:37.904 10961 10961 D Mono : DllImport searching in: '/system/lib/liblog.so' ('/system/lib/liblog.so').
12-14 15:49:37.904 10961 10961 D Mono : Searching for '__android_log_print'.
12-14 15:49:37.904 10961 10961 D Mono : Probing '__android_log_print'.
12-14 15:49:37.904 10961 10961 D Mono : Found as '_android_log_print'.
12-14 15:49:37.916 10961 10961 I MonoDroid: UNHANDLED EXCEPTION:
12-14 15:49:37.937 10961 10961 I MonoDroid: Java.Lang.RuntimeException: text cannot be null
12-14 15:49:37.937 10961 10961 I MonoDroid: at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <912e68ad383941889349a57c19f9bba0>:0
12-14 15:49:37.937 10961 10961 I MonoDroid: at Java.Interop.JniEnvironment+InstanceMethods.CallVoidMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) [0x00069] in :0
12-14 15:49:37.937 10961 10961 I MonoDroid: at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualVoidMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x0002a] in :0
12-14 15:49:37.937 10961 10961 I MonoDroid: at Android.Widget.NumberPicker.SetDisplayedValues (System.String[] displayedValues) [0x00029] in <96d947b3b8134b57948bf39422274389>:0
12-14 15:49:37.937 10961 10961 I MonoDroid: at Xamarin.Forms.Platform.Android.PickerRenderer.OnClick () [0x00075] in D:\agent_work\2\s\Xamarin.Forms.Platform.Android\Renderers\PickerRenderer.cs:110
12-14 15:49:37.937 10961 10961 I MonoDroid: at Xamarin.Forms.Platform.Android.PickerRenderer+PickerListener.OnClick (Android.Views.View v) [0x00010] in D:\agent_work\2\s\Xamarin.Forms.Platform.Android\Renderers\PickerRenderer.cs:192
12-14 15:49:37.938 10961 10961 I MonoDroid: at Android.Views.View+IOnClickListenerInvoker.n_OnClick_Landroid_view_View
(System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_v) [0x0000f] in <96d947b3b8134b57948bf39422274389>:0
12-14 15:49:37.938 10961 10961 I MonoDroid: at (wrapper dynamic-method) System.Object:7369e5d1-8007-4ac2-95b1-15d88f84f186 (intptr,intptr,intptr)
12-14 15:49:37.938 10961 10961 I MonoDroid: --- End of managed Java.Lang.RuntimeException stack trace ---
12-14 15:49:37.938 10961 10961 I MonoDroid: java.lang.IllegalArgumentException: text cannot be null
12-14 15:49:37.938 10961 10961 I MonoDroid: at android.graphics.Paint.measureText(Paint.java:2191)
12-14 15:49:37.938 10961 10961 I MonoDroid: at android.widget.NumberPicker.tryComputeMaxWidth(NumberPicker.java:1314)
12-14 15:49:37.938 10961 10961 I MonoDroid: at android.widget.NumberPicker.setDisplayedValues(NumberPicker.java:1507)
12-14 15:49:37.938 10961 10961 I MonoDroid: at md5b60ffeb829f638581ab2bb9b1a7f4f3f.PickerRenderer_PickerListener.n_onClick(Native Method)
12-14 15:49:37.938 10961 10961 I MonoDroid: at md5b60ffeb829f638581ab2bb9b1a7f4f3f.PickerRenderer_PickerListener.onClick(PickerRenderer_PickerListener.java:30)
12-14 15:49:37.938 10961 10961 I MonoDroid: at android.view.View.performClick(View.java:6261)
12-14 15:49:37.938 10961 10961 I MonoDroid: at android.widget.TextView.performClick(TextView.java:11180)
12-14 15:49:37.938 10961 10961 I MonoDroid: at android.view.View$PerformClick.run(View.java:23748)
12-14 15:49:37.938 10961 10961 I MonoDroid: at android.os.Handler.handleCallback(Handler.java:751)
12-14 15:49:37.938 10961 10961 I MonoDroid: at android.os.Handler.dispatchMessage(Handler.java:95)
12-14 15:49:37.938 10961 10961 I MonoDroid: at android.os.Looper.loop(Looper.java:154)
12-14 15:49:37.938 10961 10961 I MonoDroid: at android.app.ActivityThread.main(ActivityThread.java:6776)
12-14 15:49:37.938 10961 10961 I MonoDroid: at java.lang.reflect.Method.invoke(Native Method)
12-14 15:49:37.938 10961 10961 I MonoDroid: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520)
12-14 15:49:37.938 10961 10961 I MonoDroid: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)
12-14 15:49:37.938 10961 10961 I MonoDroid:
.
.
.

ListView pulltorefresh activityindicator is freezing when app is toggled between background and foreground

Bug report best practices: https://github.com/xamarin/Xamarin.Forms/wiki/Submitting-Issues

Description

Whenever the list is pulled activity indicator starts animating and I start a background Task. Now when the app is sent to the background by pressing the home button and brought back to the foreground by clicking app icon on homepage or task menu, activity indicator freezes.

Steps to Reproduce

  1. launch the application
    2.pull to refresh on list page
  2. start doing background task
  3. press home button and go to background
  4. comes to foreground
  5. activity indicator stuck

Expected Behavior

Actual Behavior

Basic Information

  • Version with issue: latest
  • Last known good version:
  • IDE:Xamarin Studio 6.3
  • Platform Target Frameworks:
    iOS

Screenshots

unadjustednonraw_thumb_4

Reproduction Link

[Android] Frame outline color not rendering

Description

Migrated from https://bugzilla.xamarin.com/show_bug.cgi?id=27460

The original issue was that the color wouldn't appear unless padding was set. In my sample I don't see the color on Android at all. iOS renders as I'd expect.

screenshot 2017-12-07 08 14 26

Steps to Reproduce

  1. Create a Frame with an outline color.
  2. Run and observe on Android the outline doesn't show the color.

Expected Behavior

The outline should be the color I've chosen, regardless of padding.

Actual Behavior

iOS renders as expected. Android outline isn't the chosen color, red.

Basic Information

  • Version with issue: 2.5.0.121934
  • IDE: VS Mac
  • Platform Target Frameworks:
    • iOS: 11.1
    • Android: 7.1 running on 8.0 using FormsAppCompatActivity
  • Android Support Library Version: 25.4.0.2

Reproduction Link

Archive.zip

Keep on getting this "System.ObjectDisposedException: Cannot access a disposed object"... GC related...

Description

The problem is that the App crashes on the Android emulator with the following exception, it is related to a Mono8 issue I was lead to believe, how do I fix it please ?

See stack trace below...

People are talking about this solution, can you please explain exactly what I need to do with the latest Garbage Collector from Mono, where do I set it up so it uses the old/new GC so the problems goes away until they fix it:
MONO_GC_PARAMS=bridge-implementation=new

Steps to Reproduce

  1. Just run the app for long enough and eventually it crashes, nothing to do with our code we don't believe...

Expected Behavior

Actual Behavior

Basic Information

  • Version with issue: Xamarin.Forms 2.5.0.91635

  • Last known good version: ?

  • IDE: VS2017

  • Platform Target Frameworks: Android, iOS

    • iOS: xamarinios10
    • Android: Monodroid80
    • UWP: Not used
  • Android Support Library Version: Xamarin.Android.Support.Compat 25.4.0.2

  • Nuget Packages:
    Packages for PCL project:

  <package id="Com.Airbnb.Xamarin.Forms.Lottie" version="1.0.0.7" targetFramework="portable45-net45+win8+wp8" />
  <package id="HtmlAgilityPack" version="1.6.5" targetFramework="portable45-net45+win8+wp8" />
  <package id="Microsoft.Bcl" version="1.1.10" targetFramework="portable45-net45+win8+wp8" />
  <package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="portable45-net45+win8+wp8" />
  <package id="Microsoft.Net.Http" version="2.2.29" targetFramework="portable45-net45+win8+wp8" />
  <package id="Newtonsoft.Json" version="10.0.1" targetFramework="portable45-net45+win8+wp8" />
  <package id="PCLStorage" version="1.0.2" targetFramework="portable45-net45+win8+wp8" />
  <package id="UXDivers.Artina.Shared" version="2.5.14-RC3" targetFramework="portable45-net45+win8+wp8" />
  <package id="UXDivers.Artina.Shared.Base" version="2.5.14-RC3" targetFramework="portable45-net45+win8+wp8" />
  <package id="UXDivers.Effects" version="0.6.1" targetFramework="portable45-net45+win8+wp8" />
  <package id="Xam.Plugin.Connectivity" version="3.0.3" targetFramework="portable45-net45+win8+wp8" />
  <package id="Xam.Plugins.Notifier" version="2.1.0" targetFramework="portable45-net45+win8+wp8" />
  <package id="Xam.Plugins.Settings" version="3.1.1" targetFramework="portable45-net45+win8+wp8" />
  <package id="Xamarin.FFImageLoading" version="2.2.25" targetFramework="portable45-net45+win8+wp8" />
  <package id="Xamarin.FFImageLoading.Forms" version="2.2.25" targetFramework="portable45-net45+win8+wp8" />
  <package id="Xamarin.FFImageLoading.Transformations" version="2.2.25" targetFramework="portable45-net45+win8+wp8" />
  <package id="Xamarin.Forms" version="2.5.0.91635" targetFramework="portable45-net45+win8+wp8" />

Packages for Droid Project:
`  <package id="Com.Airbnb.Android.Lottie" version="1.0.0.7" targetFramework="monoandroid70" />
  <package id="Com.Airbnb.Xamarin.Forms.Lottie" version="1.0.0.7" targetFramework="monoandroid70" />
  <package id="Microsoft.Bcl" version="1.1.10" targetFramework="monoandroid80" />
  <package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="monoandroid80" />
  <package id="Microsoft.CSharp" version="4.3.0" targetFramework="monoandroid80" />
  <package id="Microsoft.Net.Http" version="2.2.29" targetFramework="monoandroid80" />
  <package id="Newtonsoft.Json" version="10.0.1" targetFramework="monoandroid80" />
  <package id="System.Collections" version="4.3.0" targetFramework="monoandroid80" />
  <package id="System.ComponentModel.TypeConverter" version="4.3.0" targetFramework="monoandroid80" />
  <package id="System.Diagnostics.Debug" version="4.3.0" targetFramework="monoandroid80" />
  <package id="System.Dynamic.Runtime" version="4.3.0" targetFramework="monoandroid80" />
  <package id="System.Globalization" version="4.3.0" targetFramework="monoandroid80" />
  <package id="System.IO" version="4.3.0" targetFramework="monoandroid80" />
  <package id="System.Linq" version="4.3.0" targetFramework="monoandroid80" />
  <package id="System.Linq.Expressions" version="4.3.0" targetFramework="monoandroid80" />
  <package id="System.ObjectModel" version="4.3.0" targetFramework="monoandroid80" />
  <package id="System.Reflection" version="4.3.0" targetFramework="monoandroid80" />
  <package id="System.Reflection.Extensions" version="4.3.0" targetFramework="monoandroid80" />
  <package id="System.Resources.ResourceManager" version="4.3.0" targetFramework="monoandroid80" />
  <package id="System.Runtime" version="4.3.0" targetFramework="monoandroid80" />
  <package id="System.Runtime.Extensions" version="4.3.0" targetFramework="monoandroid80" />
  <package id="System.Runtime.Numerics" version="4.3.0" targetFramework="monoandroid80" />
  <package id="System.Runtime.Serialization.Formatters" version="4.3.0" targetFramework="monoandroid80" />
  <package id="System.Runtime.Serialization.Primitives" version="4.3.0" targetFramework="monoandroid80" />
  <package id="System.Text.Encoding" version="4.3.0" targetFramework="monoandroid80" />
  <package id="System.Text.Encoding.Extensions" version="4.3.0" targetFramework="monoandroid80" />
  <package id="System.Text.RegularExpressions" version="4.3.0" targetFramework="monoandroid80" />
  <package id="System.Threading" version="4.3.0" targetFramework="monoandroid80" />
  <package id="System.Threading.Tasks" version="4.3.0" targetFramework="monoandroid80" />
  <package id="System.Xml.ReaderWriter" version="4.3.0" targetFramework="monoandroid80" />
  <package id="System.Xml.XDocument" version="4.3.0" targetFramework="monoandroid80" />
  <package id="System.Xml.XmlDocument" version="4.3.0" targetFramework="monoandroid80" />
  <package id="UXDivers.Artina.Shared" version="2.5.14-RC3" targetFramework="monoandroid80" />
  <package id="UXDivers.Artina.Shared.Base" version="2.5.14-RC3" targetFramework="monoandroid80" />
  <package id="UXDivers.Effects" version="0.6.1" targetFramework="monoandroid80" />
  <package id="Xam.Plugin.Connectivity" version="3.0.3" targetFramework="monoandroid71" />
  <package id="Xam.Plugins.Notifier" version="2.1.0" targetFramework="monoandroid71" />
  <package id="Xam.Plugins.Settings" version="3.1.1" targetFramework="monoandroid80" />
  <package id="Xamarin.Android.Support.Animated.Vector.Drawable" version="25.4.0.2" targetFramework="monoandroid80" />
  <package id="Xamarin.Android.Support.Annotations" version="25.4.0.2" targetFramework="monoandroid80" />
  <package id="Xamarin.Android.Support.Compat" version="25.4.0.2" targetFramework="monoandroid80" />
  <package id="Xamarin.Android.Support.Core.UI" version="25.4.0.2" targetFramework="monoandroid80" />
  <package id="Xamarin.Android.Support.Core.Utils" version="25.4.0.2" targetFramework="monoandroid80" />
  <package id="Xamarin.Android.Support.Design" version="25.4.0.2" targetFramework="monoandroid80" />
  <package id="Xamarin.Android.Support.Fragment" version="25.4.0.2" targetFramework="monoandroid80" />
  <package id="Xamarin.Android.Support.Media.Compat" version="25.4.0.2" targetFramework="monoandroid80" />
  <package id="Xamarin.Android.Support.Transition" version="25.4.0.2" targetFramework="monoandroid80" />
  <package id="Xamarin.Android.Support.v4" version="25.4.0.2" targetFramework="monoandroid80" />
  <package id="Xamarin.Android.Support.v7.AppCompat" version="25.4.0.2" targetFramework="monoandroid80" />
  <package id="Xamarin.Android.Support.v7.CardView" version="25.4.0.2" targetFramework="monoandroid80" />
  <package id="Xamarin.Android.Support.v7.MediaRouter" version="25.4.0.2" targetFramework="monoandroid80" />
  <package id="Xamarin.Android.Support.v7.Palette" version="25.4.0.2" targetFramework="monoandroid80" />
  <package id="Xamarin.Android.Support.v7.RecyclerView" version="25.4.0.2" targetFramework="monoandroid80" />
  <package id="Xamarin.Android.Support.Vector.Drawable" version="25.4.0.2" targetFramework="monoandroid80" />
  <package id="Xamarin.FFImageLoading" version="2.2.25" targetFramework="monoandroid80" />
  <package id="Xamarin.FFImageLoading.Forms" version="2.2.25" targetFramework="monoandroid80" />
  <package id="Xamarin.FFImageLoading.Transformations" version="2.2.25" targetFramework="monoandroid80" />
  <package id="Xamarin.Forms" version="2.5.0.91635" targetFramework="monoandroid80" />
`

- Affected Devices: Android device + Android emulator

### Reproduction Link

<!-- Please upload or provide a link to a reproduction case -->

STACK TRACE:See comment further below... Other stack trace that is more relevant...

ActivityIndicator width is autosize in absolutelayout is -1/0 on windows

Description

When I create an ActivityIndicator in my absolute layout it doesn't show with the function " SetLayoutBounds(activityIndicator, new Rectangle(dActivityIndicatorX, dActivityIndicatorY,
AutoSize, AutoSize));"
the autosize width is -1 or 0 and must be set in widthrequest or fixed size to show.

conform on xamarin forms 2.4.38799 and 2.5.121934

Steps to Reproduce

  1. Create an Xamarin PCL application with an UWP platform application.
  2. In the portable classes create an C# page and link the app init page to the new page.
  3. Create a new class that inherits AbsoluteLayout.
  4. In this class create an ActivityIndicator.
  5. Use SetLayoutBounds with autosize as width and height.

Expected Behavior

The ActivityIndicator shows up and uses the intire screen.

Actual Behavior

The ActivityIndicator doesn't show.
if the Width is more than 0 it does show.
This code runs oke in Android.

Basic Information

  • Version with issue: confirmed in 2.4.38799 and 2.5.121934
  • Last known good version: -
  • IDE: Visual Studio
  • Platform Target Frameworks:
    • UWP: 10240
  • Nuget Packages: Xamarin forms.
  • Affected Devices: UWP

Reproduction Link

http://www.filedropper.com/bugtestactivitiyindicator_2

When no default namespace is provided at the project level, the .g.cs files get compiled with a namespace of " ."

Description

If you change the project files so there is no default namespace, then the .g.cs files will compile the code with a space for the namespace, so you end up with a " ." leading the namespace declaration.

I can wipe out the default namespace which requires me to manually specify a namespace for my class files, i.e. TestNamespace. The .g.cs would then have " .TestNamespace" as the namespace declaration.

Steps to Reproduce

  1. Edit the .csproj files and clear the default namespace value manually.
  2. Create a class that will create a .g.cs file and give it a namespace declaration.
  3. Build will fail b/c the .g.cs file will list the incorrect namespace.

Expected Behavior

Namespace should be what is specified in the class file.

Actual Behavior

An empty space and period are added before the namespace declared in the class file.

Basic Information

  • Version with issue: Latest stable release.
  • Last known good version: Recurring issue.
  • IDE:
  • Platform Target Frameworks:
    • iOS: Any
    • Android: Any
    • UWP: Any

Upgrade XForms PCL to .Net Standard - Loss of AssemblyGlobal

VS 15.5 PC, .Net Standard 2.01, Xamarin Forms 2.5.0.121934, Resharper

I migrated a PCL universal app to .NETStandard. Can't compile.

The iOS Project AssemblyInfo.cs complains that "The Name 'AssemblyGlobal' does not exist in the current Context"

2017-12-05_8-56-07

Flicker in Master Detail Navigation

Bug report best practices: https://github.com/xamarin/Xamarin.Forms/wiki/Submitting-Issues

Description

White screen flickers within the transition from page to page in the PushAsync when navigating (as if a whole white screen is painted between the transitions). Previous versions were smooth.

Was ok in 2.3.4.270 can confirm present in 2.5.0.121934 (but may be since 2.4.x as reported by others)

Steps to Reproduce

To recreate=> Create a simple master detail app and add a few pages to switch between (can be the same page)
Navigate between the pages and notice a very quick white screen flicker between them.

Revert XF back to 2.3.4.270 and try again. No white screen

Problem becomes more exaserbated when page content is more complex (white screen is shown longer).

Expected Behavior

Clean transition

Actual Behavior

Flicker's background mid transition

Basic Information

  • Version with issue:2.5.x
  • Last known good version:2.3.4.270
  • IDE:
  • Platform Target Frameworks:
    • Android: Any
  • Android Support Library Version: Any
  • Nuget Packages:
  • Affected Devices:

Screenshots

Reproduction Link

This GitHub example will demonstrate the issue https://github.com/MTWSM/Flickering_Issue_Demo

Removing Last Item from ObeservableCollection for ListView.ItemsSource throws exception on Windows 8.1 (Desktop)

The issue https://bugzilla.xamarin.com/show_bug.cgi?id=59650 is still present on Windows RT (8.1 Desktop). As this is merely a re-open of an already known issue please refer to the original bugzilla for exact details.

Removing the last item from an Observable Collection bound to a ListView will throw an ArgumentOutOfRangeException when running on Windows 8.1, present in version 2.5.0.91635 of Xamarin.Forms.

   at System.Linq.Enumerable.ElementAt[TSource](IEnumerable`1 source, Int32 index)
   at Xamarin.Forms.ListView.NotifyRowTapped(Int32 groupIndex, Int32 inGroupIndex, Cell cell)
   at Xamarin.Forms.ListView.NotifyRowTapped(Int32 index, Cell cell)
   at Xamarin.Forms.Platform.WinRT.ListViewRenderer.OnListItemClicked(Int32 index)
   at Xamarin.Forms.Platform.WinRT.ListViewRenderer.OnControlSelectionChanged(Object sender, SelectionChangedEventArgs e)
   at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1.RemoveItem(Int32 index)
   at System.Collections.ObjectModel.Collection`1.Remove(T item)
   at RFA.Views.ClientViewModel.<>c__DisplayClass91_0.<RemoveNote>b__0()

[Feature Request] App Shortcuts akin to AppLinks

Summary

Similar to how AppLinks works, I'd like to have AppShortcuts so that we can implement UIApplicationShortcutItem (iOS 9) or Dynamic Shortcuts via the ShortcutManager (API 25). Apologies in advance, I know there's something in UWP, but I'm not sure what it's called.

iOS Sample
Android Sample

API Changes

public interface IAppShortcutEntry {
    string Label { get; set; }
    Uri AppLink { get; set; }
    ImageSource Thumbnail { get; set; }
}

public class AppShortcutEntry : IAppShortcutEntry { /* implement interface*/ }

Application.Current.AppShortcuts.RegisterShortcut(IAppShortcutEntry entry);
Application.Current.AppShortcuts.DeregisterShortcut(IAppShortcutEntry entry);

implementation

var url = $"http://app.mycompany.com/special-link/{someObject.Id.ToString()}";
var entry = new AppShortcutEntry
{
    Label = session.Title,
    AppLinkUri = new Uri(url, UriKind.RelativeOrAbsolute),
    Thumbnail = ImageSource.FromFile("Icon.png")
};
Application.Current.AppShortcuts.RegisterShortcut(entry);

Intended Use Case

The use case is pretty obvious. I'd like to see Forms add support for some of the nice features found in the newer platform APIs. This is a step in that direction, and this feature would really bolster app that are using frameworks like Prism.

Migrated from Evolution

[Android] ViewCell shows ContextActions on tap instead of long press

Description

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

A ViewCell containing a View with a TapRecognizer will show its ContextActions on every tap, instead of the long-press that is specific for android. Removing the TapRecognizer from the View resolves the behavior.

The context actions on Android should only be shown when there was a long press, hence this is a bug.

Steps to Reproduce

The attached solution contains a single Android project with X.F backend. Running the project will display a page with a ListView.

  1. Tap any item
  2. Context menu will appear on top of navigation bar

Expected Behavior

Nothing

Actual Behavior

The context menu is shown, although there was no long press.

Basic Information

  • Version with issue: 2.5.0.91635
  • Last known good version: 2.4.0.282
  • IDE: Visual Studio 15.5
  • Platform Target Frameworks:
    • iOS: NO
    • Android: YES
    • UWP: NO
  • Android Support Library Version: 25.4.0.2
  • Affected Devices: Wileyfox Swift 2 running Android 7.1.2

Reproduction Link

ContextAction.zip

Use of custom NavigationPage class in Xamarin.Forms crashes in iOS build with System.MissingMethodException: Method 'UIKit.UINavigationBar.set_LargeTitleTextAttributes' not found.

Use of custom NavigationPage class in Xamarin.Forms crashes in iOS build with following error only in latest XF version :-

Unhandled Exception:
System.MissingMethodException: Method 'UIKit.UINavigationBar.set_LargeTitleTextAttributes' not found.

Steps to reproduce :-

  1. Create sample Xamarin.Forms app with XF v2.5.0.91635 OR with XF v2.5.0.121934
  2. Create custom NavigationPage class by extending NavigationPage.
  3. Use this custom class to add ContentPages of app in Navigation. On launch app crashes only in iOS with System.MissingMethodException: Method 'UIKit.UINavigationBar.set_LargeTitleTextAttributes'
    error.

iOS app is working fine with XF v2.3.3.193.

Environment details as below :-

Microsoft Visual Studio Professional 2015
Version 14.0.25420.01 Update 3
Microsoft .NET Framework
Version 4.6.01055

Installed Version: Professional

LightSwitch for Visual Studio 2015 00322-50050-34434-AA417
Microsoft LightSwitch for Visual Studio 2015

Visual Basic 2015 00322-50050-34434-AA417
Microsoft Visual Basic 2015

Visual C# 2015 00322-50050-34434-AA417
Microsoft Visual C# 2015

Visual C++ 2015 00322-50050-34434-AA417
Microsoft Visual C++ 2015

Visual F# 2015 00322-50050-34434-AA417
Microsoft Visual F# 2015

ASP.NET and Web Tools 2015.1 (Beta8) 14.1.11107.0
ASP.NET and Web Tools 2015.1 (Beta8)

ASP.NET Web Frameworks and Tools 2012.2 4.1.41102.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013 5.2.40314.0
For additional information, visit http://www.asp.net/

Common Azure Tools 1.8
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

GitHub.VisualStudio 2.2.0.11
A Visual Studio Extension that brings the GitHub Flow into Visual Studio.

JavaScript Language Service 2.0
JavaScript Language Service

JavaScript Project System 2.0
JavaScript Project System

Merq 1.1.17-rc (cba4571)
Command Bus, Event Stream and Async Manager for Visual Studio extensions.

Microsoft Azure Mobile Services Tools 1.4
Microsoft Azure Mobile Services Tools

Mono Debugging for Visual Studio Mono.Debugging.VisualStudio
Support for debugging Mono processes with Visual Studio.

NuGet Package Manager 3.4.4
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

Office Developer Tools for Visual Studio 2015 ENU 14.0.23025
Microsoft Office Developer Tools for Visual Studio 2015 ENU

PreEmptive Analytics Visualizer 1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

SQL Server Data Tools 14.0.60519.0
Microsoft SQL Server Data Tools

TypeScript 1.8.34.0
TypeScript tools for Visual Studio

Workflow Manager Tools 1.0 1.0
This package contains the necessary Visual Studio integration components for Workflow Manager.

Xamarin 4.5.0.486 (fec6f88)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android 7.3.1.2 (9dbc4c5)
Visual Studio extension to enable development for Xamarin.Android.

Xamarin.iOS 10.10.0.37 (ad35de4)
Visual Studio extension to enable development for Xamarin.iOS.

[iOS] NRE in LabelRenderer.OnElementPropertyChanged()

Description

We have an ObservableCollection which we bind to the ListView.
As soon as we add/remove items from the ObservableCollection and change the items properties, we get a NRE in LabelRenderer.OnElementPropertyChanged().
ListItem Template contains only Labels whose text is bound to the ListItem.

Test project is attached.

Steps to Reproduce

  1. Open the test project
  2. Run the project on iOS Simulator (iOS 11.2)

Expected Behavior

App doesn't crash.

Actual Behavior

App crashes (NRE).

Basic Information

  • IDE:
    Visual Studio 2017 (Windows 10)

  • Platform Target Frameworks:
    iOS: 11.2

  • Affected Devices:
    Simulator, iPhone 8

  • Version:
    Xamarin.Forms 2.4.0.280

OCApp.zip

Stack Trace

stack_trace.txt

Live Player does not work with Azure App Service

Bug report best practices: https://github.com/xamarin/Xamarin.Forms/wiki/Submitting-Issues

Description

Live Player does not work with either QuickStart apps created in Azure Mobile App Service or from the Visual Studio Cross Platform Xamarin Forms template when a Azure App Service Backend is selected. The repro is for the Visual Studio Template. If the Azure App Backend is NOT selected, Live Player works correctly.

Steps to Reproduce

  1. Create New Project in Visual Studio 2017
  2. Choose "Cross Platform App (Xamarin Forms)"
  3. Choose Template = "Master Detail", Platform = "Android", UI Technology = "Xamarin.Forms", Code Sharing Technology = ".NET Standard"
  4. Check the "Include Azure Mobile Apps backend project"
  5. Click OK
  6. Window will appear to Create App Service, accept defaults. Click Create.

Expected Behavior

App should build without errors.
App should launch on Android Device that was configured as a Live Player device

Actual Behavior

App builds without error but when launched on Android Device that is configured as a Live Player device, there are 35 error messages displayed. Here is a sample.

Error CS0246 The type or namespace name 'App' could not be found (are you missing a using directive or an assembly reference?) App6.Android C:\WIP\App6\App6\App6.Android\MainActivity.cs 24 Active

Error Failed to load assembly from stream: System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> System.IO.DirectoryNotFoundException: Could not find a part of the path "/data/user/0/com.xamarin.live/files/.nuget/packages/system.xml.readerwriter/4.0.11/ref/netstandard1.3/System.Xml.ReaderWriter.dll".
Error Failed to load assembly from stream: System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> System.IO.DirectoryNotFoundException: Could not find a part of the path "/data/user/0/com.xamarin.live/files/.nuget/packages/system.xml.xdocument/4.0.11/ref/netstandard1.3/System.Xml.XDocument.dll".
Error Failed to load assembly from stream: System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> System.IO.DirectoryNotFoundException: Could not find a part of the path "/data/user/0/com.xamarin.live/files/.nuget/packages/system.xml.xdocument/4.0.11/ref/netstandard1.3/System.Xml.XDocument.dll".
Error Failed to load assembly from stream: System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> System.IO.DirectoryNotFoundException: Could not find a part of the path "/data/user/0/com.xamarin.live/files/.nuget/packages/system.threading/4.3.0/ref/netstandard1.3/System.Threading.dll".
Error Failed to load assembly from stream: System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> System.IO.DirectoryNotFoundException: Could not find a part of the path "/data/user/0/com.xamarin.live/files/.nuget/packages/system.threading.tasks/4.3.0/ref/netstandard1.3/System.Threading.Tasks.dll".
Error Failed to load assembly from stream: System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> System.IO.DirectoryNotFoundException: Could not find a part of the path "/data/user/0/com.xamarin.live/files/.nuget/packages/system.text.regularexpressions/4.1.0/ref/netstandard1.6/System.Text.RegularExpressions.dll".
Error Failed to load assembly from stream: System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> System.IO.DirectoryNotFoundException: Could not find a part of the path "/data/user/0/com.xamarin.live/files/.nuget/packages/system.text.encoding/4.3.0/ref/netstandard1.3/System.Text.Encoding.dll".
Error Failed to load assembly from stream: System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> System.IO.DirectoryNotFoundException: Could not find a part of the path "/data/user/0/com.xamarin.live/files/.nuget/packages/system.text.encoding.extensions/4.0.11/ref/netstandard1.3/System.Text.Encoding.Extensions.dll".

Basic Information

  • Version with issue:

  • Last known good version:

  • IDE: Visual Studio 2017 ver 15.5

  • Platform Target Frameworks: .NetStandard 2.0

    • Android:
  • Android Support Library Version: Xamarin.Android.Support. v4, Xamarin.Android.Support.v7.AppCompat, Xamarin.Android.Support.v7.Cardview, Xamarin.Android.Support.v7.MediaRouter

  • Nuget Packages:
    Microsoft.AspNet.WebApi.Client
    Microsoft.AspNet.WebApi.Core
    Microsoft.AspNet.WebApi.OData
    Microsoft.AspNet.WebApi.Owin
    Microsoft.AspNet.WebApi.Tracing
    Microsoft.Azure.Mobile.Client
    Microsoft.Azure.Mobile.Client.SQLiteStore
    Microsoft.Azure.Mobile.Server
    Microsoft.Azure.Mobile.Server.Authentication
    Microsoft.Azure.Mobile.Server.Entity
    Microsoft.Azure.Mobile.Server.Home
    Microsoft.Azure.Mobile.Server.Notifications
    Microsoft.Azure.Mobile.Server.Quickstart
    Microsoft.Bcl
    Microsoft.Bcl.Build
    Microsoft.Data.Edm
    Microsoft.Data.OData
    Microsoft.IdentityModel.Logging
    Microsoft.IdentityModel.Tokens
    Microsoft.Net.Http
    Microsoft.Owin
    Microsoft.Owin.Host.SystemWeb
    Microsoft.Owin.Security
    NETStandard.Library
    Owin
    Swashbuckle.Core
    System.IdentityModel.Tokens.Jwt
    System.Spatial
    System.ValueTuple
    Xamarin.Android.Support.Design
    Xamarin.Android.Support.v4
    Xamarin.Android.Support.v7.AppCompat
    Xamarin.Android.Support.v7.CardView
    Xamarin.Android.Support.v7.MediaRouter
    Xamarin.Forms

  • Affected Devices:
    Samsung Galaxy S8+

Screenshots

image

Reproduction Link

[(https://github.com/leemorris/LivePlayerBug/tree/master/App6)]

[iOS] ListView throws Exception on ObservableCollection.Add/Remove

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

Description

When a ListView is in a Page that is not activated (e.g. not active tab inside a TabbedPage) and its ItemsSource is updated it throws an error.

Steps to Reproduce

  1. The attached sample shows a TabbedPage with each tab containing a ListView
  2. Tap "Add1" MenuAction
  3. Item is added to the ListView
  4. Tap "Add2" MenuAction
  5. Crash

Alternative steps

  1. Navigate to 2nd tab
  2. Navigate back to 1st tab
  3. Tap "Add2" MenuAction
  4. Item is added to the 2nd ListVIew
  5. Conclusion: Doesn't crash when navigated first

Expected Behavior

The ListViews should receive an item for each tap on the MenuActions

Actual Behavior

When the ListView was not navigated first, it throws an Exception

Basic Information

  • Version with issue: 2.4.280, 2.5.0.91635
  • Last known good version: N/A
  • IDE: VS15 Windows
  • Platform Target Frameworks:
    • iOS: 9
  • Affected Devices: Simulator and iPad Mini 3 both running iOS 11.1

Reproduction Link

FormsIOSListViewCrash.zip

Workaround

Currently you have to somehow programmatically make the ListView appear before adding an item. If the ListView is inside a tab that is not visible, show it by setting the CurrentPage Property.
If it is in a MasterDetailPage, you could try showing it by toggling the IsPresented Property.

Proposal: Keyboard (tab) navigation

Summary

Add support for navigating to and from controls (mainly input controls in practice, but any control can be supported in theory) using the Tab key on the keyboard. This would be done using the platform-specific tab-navigation functionality (e.g. nextKeyView on Cocoa). This would only be applicable for desktop platforms (WPF/GTK/MacOS).

API Changes

I would suggest the following additions:

public class View {
    // I'm not sure if these should be bindable properties or not.
    public int TabIndex { get; set; }
    public bool TabVisible { get; set; }
}

If TabVisible == false, then the control should be ignored by the tab-navigation infrastructure (and the TabIndex value is also ignored). The controls should be tabbed through in ascending order of TabIndex, wrapping around to the beginning once the end of the list is reached.

If a Layout or subclass thereof has TabVisible == true, then the behavior changes slightly. The layout itself is not placed into the tab order; rather, the platform subsystem makes it so that the direct child of the layout that has the lowest TabIndex (and TabVisible == true) is placed after the previous sibling of the Layout in tab-order; and the direct child of the layout with the highest TabIndex (and TabVisible == true) would be placed before the next sibling of the Layout in tab-order. The intent is that tab navigation can go "into" and "out of" the layout container without any impact to the user.

If a control has IsVisible == false, then it should be skipped by the tabbing mechanism (although I'm pretty sure that the platforms already do that for us).

On mobile platforms (where tab navigation generally makes no sense), the existence and values of these two properties should be silently ignored.

Intended Use Case

To enable programmer-controllable tabbing back and forth between input controls (and possibly others as well) on desktop platforms.

Notes

This is my first time proposing a change to the Xamarin.Forms core. In addition, I'm pretty sure that there is no way to accomplish this without modifying the core itself. (I could in theory vendor the platform libraries into my solution and modify them, making them reference an additional assembly containing the XAML-visible code, but then the common code might as well go into the core anyway.) If there is a way to accomplish this without modifying the core, please let me know; I have not been able to find any. Thanks!

android:targetSdkVersion="26" causes JSBridge from HybridWebView control to no longer work

Description

I recently updated my Xamarin.Forms project to Android SDK 26 (Oreo) and noticed that the JSBridge for my HybridWebView control stopped working properly. The invokeCSharpAction JavaScript function injected into the loaded webpage already returns undefined.

After messing around with various things for a while I discovered that simply removing android:targetSdkVersion="26" from my AndroidManifest.xml file causes the HybridWebView to start properly working again (invokeCSharpAction is now not undefined).

Steps to Reproduce

  1. Download attached test project.
  2. Debug/run android app.
  3. Inspect rendered WebView with chrome://inspect in Chrome.
  4. Invoke invokeCSharpAction('Hello!') from the dev tools console.
  5. Observe it works correctly.
  6. Stop android app.
  7. Edit the Properties/AndroidManifest.xml file and uncomment the line for <uses-sdk android:minSdkVersion="15" android:targetSdkVersion="26" />. Comment out/remove the existing <uses-sdk android:minSdkVersion="15" /> line.
  8. Repeat steps 2-3.
  9. Observe invokeCSharpAction is now undefined.

Expected Behavior

invokeCSharpAction to work regardless of setting android:targetSdkVersion="26" on <uses-sdk> node in AndroidManifest.xml.

Actual Behavior

invokeCSharpAction is undefined when setting android:targetSdkVersion="26" on <uses-sdk> node in AndroidManifest.xml.

Also worth noting that I downgraded my app back down to SDK 23 and the invokeCSharpAction works correctly no matter if I target android:targetSdkVersion="23" in the manifest or not.

Basic Information

  • Version with issue: Xamarin forms 2.3.4-2.5 (latest), Android SDK 26
  • Last known good version: Android SDK 23
  • IDE: VS 2017
  • Platform Target Frameworks:
    • Android: 8.0
  • Android Support Library Version: 23 or 25
  • Nuget Packages: n/a
  • Affected Devices: All, but testing on Nexus 5X

Screenshots

n/a

Reproduction Link

WebViewTesting.zip

ImageSource.FromResource fails when running on .NET Core 2.0

Description

The implementation of FromResource uses reflection and tries to call a method that doesn't exist on .NET Core 2.0.

With .NET Standard 2.0 this code can be fixed to not use reflection.

https://github.com/xamarin/Xamarin.Forms/blob/master/Xamarin.Forms.Core/ImageSource.cs#L73

Steps to Reproduce

  1. Call ImageSource.FromResource("BugSweeper.Images.Xamarin120.png")

Expected Behavior

An ImageSource is created.

Actual Behavior

TargetException: Exception of type 'System.Reflection.TargetException' was thrown.
  System.Reflection.RuntimeMethodInfo.ThrowNoInvokeException()
  System.Reflection.RuntimeMethodInfo.InvokeArgumentsCheck(object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
  System.Reflection.RuntimeMethodInfo.Invoke(object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
  Xamarin.Forms.ImageSource.FromResource(string resource, Assembly sourceAssembly)
  BugSweeper.Tile..cctor() in Tile.cs

Basic Information

  • Version with issue: 2.4
  • IDE: VSM
  • Platform Target Frameworks:
    • .NET Core: 2.0.2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.