Bug 24941 - Android - ViewPager does not work as custom renderer inside ScrollView
Summary: Android - ViewPager does not work as custom renderer inside ScrollView
Status: VERIFIED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.3.0
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-11-30 19:29 UTC by Geoff Armstrong
Modified: 2015-06-08 09:57 UTC (History)
5 users (show)

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


Attachments
Two test projects, one straight Android, one XF with Android custom renderer. (74 bytes, text/plain)
2014-11-30 19:31 UTC, Geoff Armstrong
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:
VERIFIED FIXED

Description Geoff Armstrong 2014-11-30 19:29:50 UTC
When I use ViewRenderer to use a ViewPager as a custom renderer, the result does not get the touch events necessary to implement the swiping that characterizes a ViewPager.

I've attached two projects.

One is a plain Android project that implements a very simple ViewPager with some extra text inside a ScrollView.

The other is a Xamarin Forms project that implements a very simple ViewPager custom renderer inside an XF ScrollView.

On the first, the ViewPager buttons can be swiped left and right just fine.

On the second, the ViewPager buttons are frozen in place.

Tested on XF 1.2.3 as well as 1.3.0pre1.
Comment 1 Geoff Armstrong 2014-11-30 19:31:07 UTC
Created attachment 8911 [details]
Two test projects, one straight Android, one XF with Android custom renderer.
Comment 2 Rajneesh Kumar 2014-12-01 04:59:59 UTC
I have checked this issue and able to reproduce this. To reproduce this issue I have followed the instruction provided in bug description.
Steps I followed:

1. Download attached samples and open "TestViewPagerInScrollView" in XS.
2. Build and deploy it on emulator, it deploy successfully.
3. Try to swiped the button 'Left' and 'Right'.
4. Observed that they swiped from left to right and vice versa.
5. Now close solution and open "TestXFViewPagerInScrollView".
6. Build and deploy it on emulator, try to swiped the button 'Left' and 'Right'.
7. Observed that user is not able to swipe button left to right and vice versa.

For TestViewPagerInScrollView:
Screencast: http://www.screencast.com/t/fyIxKEZp2Lu
App O/P:  https://gist.github.com/Rajneesh360Logica/b773a626fbc143228fb1
Build O/P: https://gist.github.com/Rajneesh360Logica/e8c1c000a750ec38c42a

For TestXFViewPagerInScrollView:
Screencast: http://www.screencast.com/t/blg6UoOV
App O/P:  https://gist.github.com/Rajneesh360Logica/6521b54645b9442298e0
Build O/P: https://gist.github.com/Rajneesh360Logica/3673fd50dc7913da7840

Additional Information: Getting same behavior on device .

SX Logs: http://www.screencast.com/t/lFkcBU1lxv51

Environment Info:

=== Xamarin Studio ===
Version 5.5.4 (build 15)
Installation UUID: 011d70a5-dede-428b-ab04-ef451c2e539d
Runtime:
	Mono 3.10.0 ((detached/92c4884)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 310000031

=== Xamarin.Android ===
Version: 4.20.0.28 (Business Edition)
Android SDK: /Users/MM/Desktop/android-sdk-macosx
	Supported Android versions:
		2.1    (API level 7)
		2.2    (API level 8)
		2.3    (API level 10)
		3.1    (API level 12)
		3.2    (API level 13)
		4.0    (API level 14)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
Java SDK: /usr
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

=== Apple Developer Tools ===

Xcode 6.1 (6604)
Build 6A1052d

=== Xamarin.iOS ===

Version: 8.4.0.43 (Business Edition)
Hash: 840a925
Branch: 
Build date: 2014-11-16 21:03:22-0500

=== Xamarin.Mac ===

Version: 1.10.0.18 (Business Edition)

=== Build Information ===

Release ID: 505040015
Git revision: f93940a35458a18052f1a25e106e62ca970d9c40
Build date: 2014-11-19 15:32:41-05
Xamarin addins: dc23cbd91a3a0e1d326328e1229e86c942a49ec8

=== Operating System ===

Mac OS X 10.9.5
Darwin MacMini.local 13.4.0 Darwin Kernel Version 13.4.0
    Sun Aug 17 19:50:11 PDT 2014
    root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64
Comment 3 Rui Marinho 2015-06-02 13:53:56 UTC
This is fixed in Xamarin Forms 1.4.2 version
Comment 4 Rajneesh Kumar 2015-06-08 09:22:29 UTC
I have checked this issue with the following builds:

Xamarin.Forms Version: 1.4.3.6358-pre2

Xamarin Studio Version 5.9.4 (build 3)
Installation UUID: 011d70a5-dede-428b-ab04-ef451c2e539d
Runtime:
Mono 4.0.2 ((detached/198235d)
GTK+ 2.24.23 (Raleigh theme)
Package version: 400020004
Xamarin.Android Version: 5.1.4.8 (Business Edition)
java version "1.7.0_65"
Build Information 
Release ID: 509040003
Git revision: 71a8c576686882a0ad224f735d9f04a6c08119c8
Build date: 2015-06-04 02:45:11-04
Xamarin addins: 456e0954631a1a80bc90389e99c6d16cd8f09ad3
Operating System Mac OS X 10.9.5
Darwin MacMini.local 13.4.0 Darwin Kernel Version 13.4.0
Sun Aug 17 19:50:11 PDT 2014
root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64

Now, I observed that user is able to swipe button left to right and vice versa. Here is the screencast foe the same: http://www.screencast.com/t/tKTAeiOc6

This issue has been fixed, hence I am closing this issue.

Thanks..!