Bug 44176 - InputTransparent fails if BackgroundColor not explicitly set on Android
Summary: InputTransparent fails if BackgroundColor not explicitly set on Android
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.3.2
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2016-09-12 02:53 UTC by adrianknight89
Modified: 2017-07-14 16:50 UTC (History)
10 users (show)

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

repro (211.65 KB, application/zip)
2016-09-12 02:53 UTC, adrianknight89

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 adrianknight89 2016-09-12 02:53:09 UTC
Created attachment 17412 [details]

Setting InputTransparent="False" does not work on Android if the background color is not set or if it is set to Transparent. The color must be set to a **non-transparent** color in order for taps not to propagate down.

On iOS, all is fine.

Please see repro.

XF / Samsung S6.
Comment 1 Gabor Nemeth 2016-09-16 09:16:48 UTC
I confirm this issue. I have experienced in one of my apps. I had to set InputTransparent to false and IsEnabled to true on a ListView to be able to disable user interaction.

In this example if the BackgroundColor is set to non-transparent, but Opacity is also set - for example - to 0.5, the ContentView let tap events across. Even if IsEnabled is set to false on it.

Comment 2 adrianknight89 2016-09-16 14:31:30 UTC
Please see my PR: https://github.com/xamarin/Xamarin.Forms/pull/344
Comment 3 Samantha Houts [MSFT] 2016-09-30 23:18:03 UTC
Should be fixed in 2.3.4-pre1. Thank you!
Comment 4 Parmendra Kumar 2016-11-28 15:20:33 UTC
I have checked this issue with Xamarin.Forms 2.3.4-pre1 and I am still getting same issue with Android and on iOS its working fine.

Screencast: http://www.screencast.com/t/bpRdDpDo

Hence reopened this issue.

Please have a look screencast and let me know If I have missed anything to verify this issue.
Comment 5 adrianknight89 2016-11-28 15:25:16 UTC
A better fix should be https://github.com/xamarin/Xamarin.Forms/pull/483, but it needs to be merged.
Comment 6 Jon Goldberger [MSFT] 2017-01-28 00:41:16 UTC
There are a couple of other seemingly related bug reports that are not resolved in the 2.3.4-pre1.


Thought I would bring it up so you can see if the issues are related and whether they may be fixed by the pull request noted in comment 5 above.
Comment 7 Rui Marinho 2017-03-23 17:27:44 UTC
Should be fixed on 2.3.5-pre1.
Comment 8 Saurabh Paunikar 2017-07-14 11:30:19 UTC
On xamarin.form version,Used code

<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
  <Button Text="Click" Clicked="Button_OnClicked"/>
  <ContentView BackgroundColor="Transparent" InputTransparent="False"/>

Observed that button is still clickable on android. However it is working fine in iOS. Hence reopening the issue

ScreenCast link : https://www.screencast.com/t/mTWihlbTR
Comment 9 Jimmy [MSFT] 2017-07-14 16:50:05 UTC
I was also able to still reproduce this issue with Forms 2.3.5-pre6. However I tested with the build as well and the issue appears to be resolved there, so the fix for this issue will be in future release.