Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to set multiple different colours for unselected tabs on TabbedPage - Android #26522

Closed
Croppo opened this issue Dec 11, 2024 · 3 comments
Labels
area-controls-tabbedpage TabbedPage platform/android 🤖 s/needs-attention Issue has more information and needs another look t/bug Something isn't working

Comments

@Croppo
Copy link

Croppo commented Dec 11, 2024

Description

When using tabbedPage I have 3 tabs in my tabbed page view.

When given the option to set selected and unselected colours of tabs I cannot find a way to have multiple unselected tabs of varying colours. i.e. an unselected tab thats grey but then another that has a default unselected as red.

Using the screenshots as an example below: When "title 1" is selected it will be blue, then "title 2" should have the default unselected colour of grey, HOWEVER I can not find a way to have "title3" always have a dangerous colour. It should be red when unselected.

It is only on android that this is an issue.

Steps to Reproduce

  1. Access the attached repository below to replicate behavior

Link to public reproduction project repository

https://github.com/Croppo/MauiTabbedApp/tree/main

Version with bug

8.0.82 SR8.2

Is this a regression from previous behavior?

Not sure, did not test other versions

Affected platforms

Android

Did you find any workaround?

No workaround found

@Croppo Croppo added the t/bug Something isn't working label Dec 11, 2024
@jfversluis
Copy link
Member

It is only on android that this is an issue.

I don't understand this comment. It does work on iOS?
Because the way I read and understand this, this is more a feature request. We don't support setting the selected/unselected color per tab at this point. We only have functionality for the states of selected and unselected.

You might be able to achieve this, but you will have to write custom platform-specific code for it.

@jfversluis jfversluis added platform/android 🤖 s/needs-info Issue needs more info from the author area-controls-tabbedpage TabbedPage labels Dec 11, 2024
@Croppo
Copy link
Author

Croppo commented Dec 11, 2024

Apologies perhaps i have placed this under the wrong tag. You are indeed correct that this is a feature that is currently unsupported.

Regarding writing platform specific code to resolve this are you able to provide any guidance at all on the best way to achieve this?

@dotnet-policy-service dotnet-policy-service bot added s/needs-attention Issue has more information and needs another look and removed s/needs-info Issue needs more info from the author labels Dec 11, 2024
@jfversluis
Copy link
Member

It might be better to switch to a third-party control for that that already has it like the Syncfusion Toolkit: https://github.com/syncfusion/maui-toolkit they seem to have it.

Otherwise, you're going to have to look into how to write custom handlers/mappers and maybe take some inspiration from our code here. But I'm afraid it is a bit more advanced at this point.

Maybe with a little help of your favorite Copilot you'll be able to!

Good luck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-controls-tabbedpage TabbedPage platform/android 🤖 s/needs-attention Issue has more information and needs another look t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants