Bug 40775 - [Xamarin Forms][Android] [Material] Xamarin.Form.Button did not show any selector when running on Pre-Lollipop
Summary: [Xamarin Forms][Android] [Material] Xamarin.Form.Button did not show any sele...
Alias: None
Product: Forms
Classification: Xamarin
Component: Android ()
Version: 2.2.0
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2016-04-29 10:19 UTC by Shahman Teh
Modified: 2016-10-26 03:29 UTC (History)
3 users (show)

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

Xamarin.Forms.Button no longer have Selected/Pressed State when applying the AppCompat Material in JellyBean (7.30 MB, application/x-7z-compressed)
2016-04-29 10:19 UTC, Shahman Teh

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 Shahman Teh 2016-04-29 10:19:06 UTC
Created attachment 15870 [details]
Xamarin.Forms.Button no longer have Selected/Pressed State when applying the AppCompat Material in JellyBean

After setting the Xamarin.Forms for android to get the Material Design to work together, setting the Xamarin.Forms.Button BackgroundColor will cause the ButtonRenderer no longer to have any selector indicator (pressed state/selected state etc).

(Steps to reproduce)
• Create a Blank App Xamarin.Forms Portable Project
• Update Xamarin.Forms from nuget to latest version
• Apply Material Styling based on Xamarin's Documentation: http://bit.ly/1WWp8G5
• Run Project on Lollipop device or newer. Click on Default Button and Colored Button. Both Ripple Effect Shown
• Run Project on Pre-Lollipop device. Click on Default Button and Colored Button. No Ripple, No Selector on the Colored Button. 

• ScreenCast • 

Only tested in Android 4.2.2 and 5.1.1

Attached here is the Sample Project inside a 7zip file format.
Comment 2 Paul DiPietro [MSFT] 2016-07-12 18:12:49 UTC
This appears to be standard behavior. Creating an app targeted for API 23 in Android Studio shows no rippling effect when the button is clicked on a KitKat emulator, either.
Comment 3 Shahman Teh 2016-10-26 02:19:52 UTC
Paul DiPietro, Is this standard behavior also applies to Selector effect aswell? it is not the rippling effect being the issue on pre API 23, the selector indicator (the dim effect) in pre API 23 has disappeared when Background Color is applied where else . The expected results here is that it will still have a selector indicator.

Tested in recent version of Xamarin.Forms v2.3.2.127, and this behavior still persists. This may be a standard behavior, but I would like to suggest revisiting the said issue again. We have a difficulty finding out if a colored button is selected or pressed down or not in pre 23 devices.
Comment 4 Shahman Teh 2016-10-26 03:29:52 UTC

tested on Xamarin.Android. issue is reproduced. maybe it is standard behavior after all, but it should not be in my humble opinion.