Bug 59506 - InputTransparent on Android not applying to children
Summary: InputTransparent on Android not applying to children
Alias: None
Product: Forms
Classification: Xamarin
Component: Android ()
Version: 2.4.0
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2017-09-15 00:59 UTC by Matthew Percy
Modified: 2018-01-19 18:27 UTC (History)
4 users (show)

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

Test project (6.06 MB, application/x-7z-compressed)
2017-09-15 00:59 UTC, Matthew Percy

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 Matthew Percy 2017-09-15 00:59:28 UTC
Created attachment 24760 [details]
Test project

Not sure if this is in any way related to the following bugs: 

It seems on Android, InputTransparent="true" isn't preventing TapGestureRecognizer Tapped events on child views/layouts. I've attached a sample project that shows the behaviour.

InputTransparent seems to work as expected in iOS.

From the sample layout code:
            <StackLayout AbsoluteLayout.LayoutBounds="0,0,1,1" AbsoluteLayout.LayoutFlags="All" BackgroundColor="Blue">
                <StackLayout HeightRequest="150" HorizontalOptions="FillAndExpand" VerticalOptions="Fill" BackgroundColor="Yellow">
                        <TapGestureRecognizer Tapped="TouchUnder1"/>
                    <TapGestureRecognizer Tapped="TouchUnder2"/>
            <StackLayout AbsoluteLayout.LayoutBounds="0,0,1,1" AbsoluteLayout.LayoutFlags="All" InputTransparent="True" BackgroundColor="Red" >
                <StackLayout HeightRequest="150" HorizontalOptions="FillAndExpand" VerticalOptions="Fill" BackgroundColor="Aqua">
                        <TapGestureRecognizer Tapped="AboveTouched1"/>
                    <TapGestureRecognizer Tapped="AboveTouched2"/>

On Android, tapping the top 150dp results in AboveTouched1 being called, and the lower part of the layout results in TouchUnder2 being called.

On iOS, tapping the top 150dp results in TouchUnder1 being called, and the lower part of the layout results in TouchUnder2 being called (as expected).

Please let me know if you need any additional information, happy to provide it.
Comment 1 Paul DiPietro [MSFT] 2017-09-15 02:44:09 UTC
Also apparent on 2.4.0-pre2; I'll set this to confirmed until further investigation is done to determine if the issue is related to the one(s) mentioned.
Comment 2 E.Z. Hart [MSFT] 2018-01-19 18:27:18 UTC
This was fixed in 2.5.