Bug 25948 - [Android] ViewCell Entry fields in a ListView with StackLayout lose focus and do not bring up keyboard
Summary: [Android] ViewCell Entry fields in a ListView with StackLayout lose focus and...
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.3.0
Hardware: PC Mac OS
: High normal
Target Milestone: 1.3.5
Assignee: Bugzilla
Depends on:
Reported: 2015-01-12 17:09 UTC by Dominic N [MSFT]
Modified: 2015-02-18 03:53 UTC (History)
12 users (show)

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

Test project demonstrating issue (132.71 KB, application/zip)
2015-01-12 17:09 UTC, Dominic N [MSFT]

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 Dominic N [MSFT] 2015-01-12 17:09:07 UTC
Created attachment 9328 [details]
Test project demonstrating issue

## Overview: 

We have a report of an issue in Xamarin.Forms for Android. A ViewCell Entry field in a ListView with a StackLayout loses focus immediately when touched. It also does not bring up a keyboard when pressed. This occurs in Forms 1.3 and 1.3.1.

## Steps to reproduce:

1. Run the attached sample project on an Android device
2. Touch on an Entry. Note that it loses focus and will never bring up a keyboard

## Expected results:

Entry remains in focus and softkeyboard shows on screen.

## Actual results: 

Entry does not retain focus or pull up keyboard.

## Additional information: 

Setting WindowSoftInputMode = Android.Views.SoftInput.AdjustPan on the main activity in the Android app serves as a workaround with this test project in 1.2.3, but it seems like there's a regression in 1.3 and 1.3.1 as the workaround no longer works.
Comment 2 Atin 2015-01-13 03:47:17 UTC
I have tried to reproduce this issue with attached test case provided in bug description and able to reproduce this issue   ViewCell Entry field in a ListView with a StackLayout loses focus immediately when touched. 

Hence marking this as Confirmed.

Supplement info:
Application output: https://gist.github.com/Mohit-Kheterpal/78cfb575f1bef4521a56
ide logs: https://gist.github.com/Mohit-Kheterpal/869e2ab348e94de3e5c4
adblogcat: https://gist.github.com/Mohit-Kheterpal/7e5f5f797eb584d93867

Environment info:=== Xamarin Studio ===

Version 5.7 (build 661)
Installation UUID: 3dbf10c4-ed30-4e55-8a8b-1704777c7b5f
	Mono 3.12.0 ((detached/a813491)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 312000068

=== Apple Developer Tools ===

Xcode 5.1.1 (5085)
Build 5B1008

=== Xamarin.Mac ===

Version: (Enterprise Edition)

=== Xamarin.iOS ===

Version: (Enterprise Edition)
Hash: 7c4c2c5
Build date: 2015-01-08 22:29:16-0500

=== Xamarin.Android ===

Version: (Enterprise Edition)
Android SDK: /Users/apprpject/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)
		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)

=== Build Information ===

Release ID: 507000661
Git revision: b70bab61da996da29045ea8ee8aed1a6faedbe78
Build date: 2015-01-05 16:31:31-05
Xamarin addins: 82f6c71490562d6cd125a09287f441902fdac3d7

=== Operating System ===

Mac OS X 10.8.5
Darwin localhost 12.5.0 Darwin Kernel Version 12.5.0
    Sun Sep 29 13:33:47 PDT 2013
    root:xnu-2050.48.12~1/RELEASE_X86_64 x86_64
Comment 4 Nathan B. Evans 2015-02-05 02:53:30 UTC
We are also experiencing this issue and we consider it a major regression, the worst we have experienced in any Forms release, and it is a show-stopper for us.

We have a Entry control, held inside a custom ViewCell held in a ListView.

Editor control is also affected.

We have experimented with various desperate hacks and workarounds with custom renderers but have found nothing that even remotely changes the behaviour.

This must be fixed as a urgent and high priority case.
Comment 5 Nathan B. Evans 2015-02-05 02:55:26 UTC
We were also using the AdjustPan fix on 1.2. But even removing/adding/adjusting this flag makes no difference on 1.3.

Tapping on the affected Entry fields simply results in no behaviour at all. Not even a "touch" sound effect is emitted by the device.

Interestingly if you have some text in the clipboard on the device and touch-hold on the Entry field then you do get the little "Paste" bubble appear and so you can paste text into the Entry.
Comment 6 cfahrenholz 2015-02-06 02:41:58 UTC
I can confirm this behavior for Xamarain Forms 1.3 (I have not tried 1.2.).
Additional information: It seems the Picker control works as expected inside a custom ViewCell in a ListView.
Comment 7 cfahrenholz 2015-02-06 02:45:38 UTC
I am using a Grid instead of a StackLayout for my ViewCell content.
Comment 8 Nathan B. Evans 2015-02-06 02:49:09 UTC
I have tested the behaviour with even just a ContentView... same thing.
Comment 9 Jason Smith [MSFT] 2015-02-13 15:41:58 UTC
Should be fixed in 1.3.5-pre1
Comment 10 Parmendra Kumar 2015-02-18 03:53:26 UTC
I have checked this issue with Xamarin.Forms version and now its working fine at my end.

Environment info:

Xamarin Studio 5.7.1 (build 17)
Xamarin.iOS: (Business Edition)
Xamarin.Mac : (Business Edition)
 Xamarin.Android : (Business Edition)
Operating System Mac OS X 10.9.4

Hence I am closing this issue.