Bug 53222 - TableSection title not visible on Samsung devices with API 19 or below
Summary: TableSection title not visible on Samsung devices with API 19 or below
Alias: None
Product: Forms
Classification: Xamarin
Component: Android ()
Version: 2.3.4
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Jimmy [MSFT]
Depends on:
Reported: 2017-03-10 14:25 UTC by diego
Modified: 2017-08-18 16:47 UTC (History)
5 users (show)

Tags: ac, android, samsung, tablesection, accentcolor
Is this bug a regression?: ---
Last known good build:

repro project (47.70 KB, application/zip)
2017-03-20 18:09 UTC, Jimmy [MSFT]

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description diego 2017-03-10 14:25:37 UTC

Color.Accent is not working correctly on some platforms.


static Color GetAccentColor()
            Color rc;
            using (var value = new TypedValue())
                if (Context.Theme.ResolveAttribute(global::Android.Resource.Attribute.ColorAccent, value, true))    // Android 5.0+
                    rc = Color.FromUint((uint)value.Data);
                if (Context.Theme.ResolveAttribute(Context.Resources.GetIdentifier("colorAccent", "attr", Context.PackageName), value, true))   // < Android 5.0
                    rc = Color.FromUint((uint)value.Data);
                else                    // fallback to old code if nothing works (don't know if that ever happens)
                    // Detect if legacy device and use appropriate accent color
                    // Hardcoded because could not get color from the theme drawable
                    var sdkVersion = (int)Build.VERSION.SdkInt;
                    if (sdkVersion <= 10)
                        // legacy theme button pressed color
                        rc = Color.FromHex("#fffeaa0c");
                        // Holo dark light blue
                        rc = Color.FromHex("#ff33b5e5");
            return rc;

if (Context.Theme.ResolveAttribute(global::Android.Resource.Attribute.ColorAccent, value, true))    // Android 5.0+
                    rc = Color.FromUint((uint)value.Data);

returns TRUE on some Samsung API 19 Tablets with the wrong color. Specially when using AppCompat.

I suggest using a sdkVersion test.


Comment 1 Jimmy [MSFT] 2017-03-20 18:09:28 UTC
Created attachment 20470 [details]
repro project

Thank you for filing this report! I was able to reproduce this issue on Samsung devices not running Lollipop with the repro project I am attaching. I am confirming this report so the team can investigate further.

As mentioned in the forum thread, this seems to be affecting Samsung devices with API 19 and below. I ran the project with Test Cloud on Samsung devices that had both an Android 5.0 and older version available. I the tests, the 5.0 devices had the expected green section titles while the older devices had no section title at all. 

### Steps to reproduce
1. Run the attached project on a Samsung device running Android 4.4 or below

### Expected Results
The section titles should be green. Run the project on a non-Samsung or a Samsung Android 5.0+ device to see the expected result.

### Actual Results
No section title is visible
Comment 3 Hakan 2017-05-12 06:31:42 UTC
Is there a roadmap for this bug fix?
It seems to be around since 2016 (https://forums.xamarin.com/discussion/80407/tablesection-title-not-shown) affecting all who use the TableView. Could you raise the importance of this bug please?
Comment 4 Jimmy [MSFT] 2017-06-28 21:37:10 UTC
Comment 5 Alastair 2017-07-11 08:55:45 UTC
Hello, I see the fix for this has been approved and merged, is it possible this can be included in the Xamarin Forms 2.3.5 release which I presume is imminent, as if I can get this fix in the next few weeks it would be a great help! Thanks
Comment 6 Jimmy [MSFT] 2017-08-17 00:25:36 UTC
Hi  Alastair, sorry for the delay. Due to the scope and volume of changes, the 2.3.5 release has been renamed to 2.4.0 and this issue should be fixed in the 2.4.0 pre-release now available on NuGet.
Comment 7 Alastair 2017-08-18 16:47:07 UTC
Hi Jimmy, thanks for the update. Though it appears the 2.4.0-pre1 release doesn't work at all on API 19 devices due to https://bugzilla.xamarin.com/show_bug.cgi?id=58868
So I'll watch out for the next build of 2.4.0 with that bug addressed!