Bug 41029 - Slider default hitbox is larger than the control
Summary: Slider default hitbox is larger than the control
Status: RESOLVED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Android ()
Version: 2.2.0
Hardware: PC Windows
: High normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-05-11 17:53 UTC by Jon Douglas [MSFT]
Modified: 2017-06-20 21:28 UTC (History)
4 users (show)

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


Attachments
Reproduction (7.03 MB, application/x-7z-compressed)
2016-05-11 17:53 UTC, Jon Douglas [MSFT]
Details
Reproduction Video (866.29 KB, video/quicktime)
2016-05-11 17:53 UTC, Jon Douglas [MSFT]
Details


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:
Status:
RESOLVED FIXED

Description Jon Douglas [MSFT] 2016-05-11 17:53:05 UTC
Created attachment 15970 [details]
Reproduction

*Description:

The default hitbox for the Slider control's ChangeListener in Android is larger than the actual control itself. Thus an event will fire whenever the hitbox is hit even if it's outside of the Slider control bounds. This is problematic as it seems to occur anywhere on a default screen instead of within the control's bounds.

*Code Sample:

<?xml version="1.0" encoding="UTF-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
	 x:Class="SliderTest.RootPage">
	<ContentPage.Content>
		<StackLayout VerticalOptions="Center">
			<Button Text="Button 1" />
			<Slider Minimum="0" Maximum="100" VerticalOptions="CenterAndExpand" ValueChanged="OnSliderValueChanged" />
			<Button Text="Button 2" />
			<Button Text="Button 3" />
		</StackLayout>
	</ContentPage.Content>
</ContentPage>

*Reproduction:

1. Open attached reproduction
2. Run/deploy the application
3. Notice that there are a few buttons and a slider
4. Tap around and see that the Slider's position circle will get bigger even if tapped outside the control

*Version Information:

Xamarin.Forms - 2.2.0.31
Comment 1 Jon Douglas [MSFT] 2016-05-11 17:53:47 UTC
Created attachment 15971 [details]
Reproduction Video
Comment 2 Jason Smith [MSFT] 2016-05-18 23:39:49 UTC
Does this occur in the AppCompat backend as well?
Comment 3 Jon Douglas [MSFT] 2016-05-19 00:11:49 UTC
This does seem to still occur the when extending FormsAppCompatActivity. This does not happen in a Xamarin.Android application extending Activity or AppCompatActivity.
Comment 4 David Ortinau [MSFT] 2017-06-20 21:28:03 UTC
Tested this repro project on 2.3.6.11-nightly and I can only get the slider to respond by interacting directly on it. Closing this as fixed.