Xamarin.Forms icon indicating copy to clipboard operation
Xamarin.Forms copied to clipboard

[Bug] Shell FlyoutIcon - No back arrow when pushing pages

Open bcaceiro opened this issue 4 years ago • 8 comments

Description

When changing the Hamburguer FlyoutIcon, I thought that it would only change the Hamburguer icon, maintaining the default behaviour in the rest of the application, for instance, when pushing a new page, automatically insert the back arrow icon.

In the latest xamarin forms version this not occurs

Steps to Reproduce

  1. Open the repro solution, navigate to Browse tab
  2. Click on an Item
  3. See the Yellow icon, instead of the back arrow

Expected Behavior

See a black back arrow in the last screen, instead of the FlyoutIcon

Actual Behavior

See the custom flyouticon

Basic Information

  • Version with issue: 5.0.0.1931
  • Last known good version:
  • Platform Target Frameworks:
    • iOS:
    • Android:
    • UWP:
  • Android Support Library / AndroidX Version:
  • NuGet Packages: Xamarin.Forms, Xamarin.Essentials
  • Affected Devices:

Environment

Show/Hide Visual Studio info
=== Visual Studio Community 2019 for Mac ===

Version 8.8.5 (build 18)
Installation UUID: 6dfaaf02-f6b5-4d5b-8410-6f0470c9e7ea
	GTK+ 2.24.23 (Raleigh theme)
	Xamarin.Mac 6.18.0.23 (d16-6 / 088c73638)

	Package version: 612000113

=== Mono Framework MDK ===

Runtime:
	Mono 6.12.0.113 (2020-02/4fdfb5b1fd5) (64-bit)
	Package version: 612000113

=== Roslyn (Language Service) ===

3.8.0-5.20519.18+4c195c3ac1974edcefa76774d7a59a2350ec55fa

=== NuGet ===

Version: 5.8.0.6860

=== .NET Core SDK ===

SDK: /usr/local/share/dotnet/sdk/5.0.102/Sdks
SDK Versions:
	5.0.102
	5.0.101
	5.0.100
	3.1.405
	3.1.404
	3.1.403
MSBuild SDKs: /Applications/Visual Studio.app/Contents/Resources/lib/monodevelop/bin/MSBuild/Current/bin/Sdks

=== .NET Core Runtime ===

Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
	5.0.2
	5.0.1
	5.0.0
	3.1.11
	3.1.10
	3.1.9

=== .NET Core 3.1 SDK ===

SDK: 3.1.405

=== Xamarin.Profiler ===

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

=== Updater ===

Version: 11

=== Xamarin.Android ===

Version: 11.1.0.26 (Visual Studio Community)
Commit: xamarin-android/d16-8/a36ce73
Android SDK: /Users/bcaceiro/Library
	Supported Android versions:
		None installed

SDK Tools Version: 26.1.1
SDK Platform Tools Version: 30.0.5
SDK Build Tools Version: 30.0.3

Build Information: 
Mono: 5e9cb6d
Java.Interop: xamarin/java.interop/d16-8@79d9533
ProGuard: Guardsquare/proguard/proguard6.2.2@ebe9000
SQLite: xamarin/sqlite/3.32.1@1a3276b
Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-8@2fb1cbc

=== Microsoft OpenJDK for Mobile ===

Java SDK: /Users/bcaceiro/Library/Developer/Xamarin/jdk/microsoft_dist_openjdk_1.8.0.25
1.8.0-25
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Android SDK Manager ===

Version: 16.8.0.32
Hash: 01a7774
Branch: remotes/origin/d16-8
Build date: 2020-12-10 00:32:24 UTC

=== Android Device Manager ===

Version: 16.8.0.46
Hash: 0a81419
Branch: remotes/origin/d16-8
Build date: 2020-12-10 00:32:44 UTC

=== Apple Developer Tools ===

Xcode 12.3 (17715)
Build 12C33

=== Xamarin.Mac ===

Xamarin.Mac not installed. Can't find /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/Version.

=== Xamarin.iOS ===

Version: 14.8.0.3 (Visual Studio Community)
Hash: c51fabee8
Branch: xcode12.3
Build date: 2020-12-10 21:05:05-0500

=== Xamarin Designer ===

Version: 16.8.0.510
Hash: 44e3f3ce9
Branch: remotes/origin/d16-8
Build date: 2020-12-10 00:06:14 UTC

=== Build Information ===

Release ID: 808050018
Git revision: e83d51ec050ffcdd573462fc1889b58cfe1a5ad5
Build date: 2021-01-07 14:45:50-05
Build branch: release-8.8
Xamarin extensions: e83d51ec050ffcdd573462fc1889b58cfe1a5ad5

=== Operating System ===

Mac OS X 10.16.0
Darwin 20.1.0 Darwin Kernel Version 20.1.0
    Sat Oct 31 00:07:11 PDT 2020
    root:xnu-7195.50.7~2/RELEASE_X86_64 x86_64

=== Enabled user installed extensions ===

XAML Styler 2.0.1


Build Logs

Screenshots

Screenshot 2021-02-08 at 18 22 58 Screenshot 2021-02-08 at 18 23 29

Reproduction Link

https://we.tl/t-pPh9ZRmSzX

P.S - Ignore the name of the solution x)

Workaround

bcaceiro avatar Feb 08 '21 18:02 bcaceiro

I attach the example on GitHub (in case the WeTransfer link becomes inactive). Issue13699.zip

jsuarezruiz avatar Feb 09 '21 12:02 jsuarezruiz

Seeing this behavior as well. Really bizarre that this wasn't caught ages ago. Do people rarely set FlyoutIcon?

jackbond avatar Feb 17 '21 21:02 jackbond

Any news on this issue?

bcaceiro avatar Mar 01 '21 11:03 bcaceiro

Any news on this ?

FabriBertani avatar May 03 '21 16:05 FabriBertani

At the moment, I have found this workaround: I've added back arrow images on the project and for every page that I need to have the back arrow, I put this line on the page code-behind.

Xamarin.Forms.Shell.Current.FlyoutIcon = DeviceInfo.Platform == DevicePlatform.Android ? "arrow_back_droid.png" : "arrow_back_ios.png";

It's dirty and I don't like it, but it works.

FabriBertani avatar May 03 '21 18:05 FabriBertani

@bcaceiro The example link has expired, could you upload it again?

jsuarezruiz avatar Oct 05 '21 12:10 jsuarezruiz

@jsuarezruiz you already copied the repro in case that would happen :D

https://github.com/xamarin/Xamarin.Forms/issues/13699#issuecomment-775911746

jfversluis avatar Oct 18 '21 18:10 jfversluis

I was about to say that, eheh :D

bcaceiro avatar Oct 18 '21 19:10 bcaceiro