Bug 35600 - Android resource "Android.Resource.Attribute.SelectableItemBackgroundBorderless" does not render properly
Summary: Android resource "Android.Resource.Attribute.SelectableItemBackgroundBorderle...
Alias: None
Product: Android
Classification: Xamarin
Component: General ()
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Jonathan Pryor
Depends on:
Reported: 2015-11-05 17:32 UTC by Andrew
Modified: 2017-06-28 11:42 UTC (History)
6 users (show)

Tags: BZCU
Is this bug a regression?: ---
Last known good build:

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 Andrew 2015-11-05 17:32:02 UTC
In my custom button renderer for Android, I'm setting the background resource to Android.Resource.Attribute.SelectableItemBackgroundBorderless. I get no compile errors and my app runs fine, but I never see the borderless ripple. I have verified that the bordered ripple works perfectly ("Android.Resource.Attribute.SelectableItemBackground").

However, in my attempts to find out why the borderless resource was not showing up, I made a test build with all other views turned off (I didn't add the other views to my layout). With all the views turned off except for my button, I could see the borderless ripple! After many more builds after this, I turned on each other view in my layout one by one, and I started to notice that certain views block the borderless ripple. Verified views that block the borderless ripple are BoxView and ImageView.

It's hard to tell if this is an Android native problem or a Xamarin rendering problem.

Here is the code I am using to set up my background property for my button:

int[] attrs = new int[]{ Android.Resource.Attribute.SelectableItemBackgroundBorderless };
TypedArray typedArray = Context.ObtainStyledAttributes(attrs);
int backgroundResource = typedArray.GetResourceId(0, 0);
Comment 1 Ashley Gazich [MSFT] 2015-11-11 17:02:36 UTC
Hi Andrew,

Thank you for filing this report! Could you please provide a runnable sample demonstrating this issue for us to see it exactly as you are experiencing it? We’d also like to get your version information, if you don’t mind. Here’s how to find it:

Xamarin Studio Mac: Xamarin Studio > About Xamarin Studio > Show Details > Copy Information [button]
Xamarin Studio Windows: Help > About > Show Details > Copy Information [button]
Visual Studio: Help > About Microsoft Visual Studio > Copy Info [button]

If you are a current Business or Enterprise customer, you can also reach out directly to Xamarin support with this information.

Thank you!
Comment 2 Adam Hartley [MSFT] 2017-06-28 11:42:22 UTC
Because we have not received a reply to our request for more information we are closing this issue. If you are still encountering this issue, please reopen the ticket with the requested information. Thanks!