dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.24k stars 1.76k forks source link

[Android] Effect disappearing when changing tabs on Shell TabBar #17566

Open RandomMauiDev opened 1 year ago

RandomMauiDev commented 1 year ago

Description

I have a simple effect for Entry view called NoBackgroundEffect which on Android removes underline:

editText.SetBackgroundColor(Android.Graphics.Color.Transparent);

App is using AppShell + TabBar with two tabs. Inside one tab there is a button that opens up a new page in the tab. That page contains Entry with effect. When you swap tabs and go back to the page with Entry - effect is no longer there. You can see underline on the entry.

Steps to Reproduce

  1. Create effect for Entry
  2. Create AppShell with 2 or more tabs in TabBar
  3. Create a button to open a new page inside a tab
  4. Add Entry with effect to that page
  5. Swap tabs and see the effect disappear from the Entry

Link to public reproduction project repository

https://github.com/RandomMauiDev/MauiAndroidEffectBug

Version with bug

7.0.92

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

No response

Did you find any workaround?

You can use Handlers and Custom Entry to achieve this, but effect should work.

Relevant log output

No response

ghost commented 1 year ago

Hi @RandomMauiDev. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md

This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

drasticactions commented 1 year ago

I appologize for doing this again, but if you could make a small reproduction project for this issue as well, that would be greatly appreciated.

RandomMauiDev commented 1 year ago

Here is the minimal reproduction project: https://github.com/RandomMauiDev/MauiAndroidEffectBug

ghost commented 1 year ago

We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.

XamlTest commented 11 months ago

Verified this on Visual Studio Enterprise 17.9.0 Preview 1(8.0.3). Repro on Android 14.0-API34, not repro on iOS 17.0 with below Project: MauiAndroidEffectBug.zip EntryEffect