Bug 25659 - [Android] Unable to focus Entry inside ListView
Summary: [Android] Unable to focus Entry inside ListView
Status: VERIFIED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.3.0
Hardware: PC Windows
: Normal normal
Target Milestone: 1.3.5
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-12-30 17:39 UTC by Ryan
Modified: 2015-02-18 04:03 UTC (History)
9 users (show)

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

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 Ryan 2014-12-30 17:39:24 UTC
Clicking on the Entry in the ListView does not focus the Entry and is thus not editable.  Neither of the following snippets worked as I thought they would.

<ListView ItemsSource="{Binding Items}">
    <ListView.ItemTemplate>
        <DataTemplate>
            <ViewCell>
                <StackLayout HorizontalOptions="StartAndExpand" Orientation="Horizontal">   
                    <Entry Text="Something" />
                </StackLayout>
            </ViewCell>
        </DataTemplate>
    </ListView.ItemTemplate>
</ListView>

<ListView ItemsSource="{Binding ListItems}">
    <ListView.ItemTemplate>
        <DataTemplate>
            <EntryCell Placeholder="Something" Keyboard="Default" />
        </DataTemplate>
    </ListView.ItemTemplate>
</ListView>
Comment 1 Ram Chandra 2014-12-31 06:39:06 UTC
I have checked this issue but I am unable to reproduce this behavior.

When I use the code mentioned in bug description I am able to select the text box and able to edit the values of text box.

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

Could you please provide sample application and environment info. So that we can reproduce this issue at our end.

You can get build information from here:
Xamarin Studio=> About Xamarin Studio => Show Details => Copy Information

Environment Info:

=== Xamarin Studio ===

Version 5.5.4 (build 15)
Installation UUID: 6ea47b0d-1852-4aaf-808d-373ff0a5002b
Runtime:
	Mono 3.10.0 ((detached/92c4884)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 310000031

=== Xamarin.Android ===

Version: 4.20.0.28 (Trial Edition)
Android SDK: /Users/jatin66/Desktop/Backup/android-sdk-macosx
	Supported Android versions:
		1.6    (API level 4)
		2.1    (API level 7)
		2.2    (API level 8)
		2.3    (API level 10)
		3.0    (API level 11)
		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.47 (Trial Edition)
Hash: 7244769
Branch: 
Build date: 2014-12-11 14:54:30-0500

=== Xamarin.Mac ===

Version: 1.10.0.18 (Trial 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.10.0
Darwin Jatin66s-iMac.local 14.0.0 Darwin Kernel Version 14.0.0
    Fri Sep 19 00:26:44 PDT 2014
    root:xnu-2782.1.97~2/RELEASE_X86_64 x86_64
Comment 2 Ram Chandra 2014-12-31 06:53:00 UTC
I have also checked this issue on windows environment but not able to reproduce this behavior.

On windows you can provide build information form here:
Visual Studio => About Microsoft Visual Studio => Copy Info

Environment Info:

Window Info:

Microsoft Visual Studio Professional 2013
Version 12.0.30723.00 Update 3
Microsoft .NET Framework
Version 4.5.50938
Installed Version: Professional
Xamarin   3.8.150.0 (10cfd178d55287f09c85f5a1e604dfe20889a40f)
Xamarin.Android   4.20.0.28 (ba9bbbdd44cfdc4bf485e8885bd2ad24fba525f7)
Xamarin.iOS   8.4.0.0 (840a925103a0bf4a856507f13d5eaee3c1579c2f)

Mac Info: 

Mac OS X 10.9.5
Xamarin Studio: 5.5.4 (build 15)
Mono 3.10.0 ((detached/92c4884)
GTK+ 2.24.23 (Raleigh theme)
Package version: 310000031
Xcode 5.1.1 (5085)
Build 5B1008
Xamarin.iOS: 8.4.0.47 (Business Edition)
=== Build Information ===

Release ID: 505040015
Git revision: f93940a35458a18052f1a25e106e62ca970d9c40
Build date: 2014-11-19 15:32:41-05
Xamarin addins: dc23cbd91a3a0e1d326328e1229e86c942a49ec8
Comment 3 Ryan 2014-12-31 11:16:03 UTC
My particular problem is on an actual android device, not an iPhone simulator.
Comment 4 Ram Chandra 2015-01-02 07:38:29 UTC
Thanks Ryan,

I have checked this issue and I am able to reproduce this behavior.

When I click on entry control in list view I observed that list view does not focus the Entry and it is not editable.

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

Debug logs: https://gist.github.com/RamChBachkheti/e018027b037031f153b7
Device logs: https://gist.github.com/RamChBachkheti/22548427b6d9bf9ba8d4

Additional Info: This is an intermittent behavior I am getting it 8/10. I am not getting this behavior with iOS project.

Environment Info:

Microsoft Visual Studio Professional 2013
Version 12.0.30723.00 Update 3
Microsoft .NET Framework
Version 4.5.50938
Installed Version: Professional
Xamarin   3.8.150.0 (10cfd178d55287f09c85f5a1e604dfe20889a40f)
Xamarin.Android   4.20.0.28 (ba9bbbdd44cfdc4bf485e8885bd2ad24fba525f7)
Xamarin.iOS   8.4.0.0 (840a925103a0bf4a856507f13d5eaee3c1579c2f)
Comment 5 Paul Charlton 2015-01-14 06:11:09 UTC
I'm also getting this error but has appeared after upgrading Forms from 1.2 to 1.3.1.  Using a Samsung SM-T210.

Sample:
    public class App
    {
        public static Page GetMainPage()
        {
            return new NavigationPage(new TestPage());
        }
    }

public class TestPage : ContentPage
{
    public TestPage()
    {
        var holder = new StackLayout
        {
            Orientation = StackOrientation.Vertical,
            HorizontalOptions = LayoutOptions.FillAndExpand,
            VerticalOptions = LayoutOptions.Center,
            Padding = new Thickness(10, 0, 10, 20),
        };
        var listview = new ListView
        {
            RowHeight = 150,
            VerticalOptions = LayoutOptions.Center,
            ItemsSource = new List<string>{"",""},
            ItemTemplate = new DataTemplate(typeof(TestFieldCell)),
        };
        holder.Children.Add(listview);

        this.Content = holder;
    }
}

public class TestFieldCell:ViewCell
{
    protected override void OnBindingContextChanged()
    {
        base.OnBindingContextChanged();

        View = new Entry();
    }
}


Info:
Microsoft Visual Studio Ultimate 2013
Version 12.0.31101.00 Update 4
Microsoft .NET Framework
Version 4.5.51641

Installed Version: Ultimate

Xamarin   3.8.150.0 (10cfd178d55287f09c85f5a1e604dfe20889a40f)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   4.20.0.28 (ba9bbbdd44cfdc4bf485e8885bd2ad24fba525f7)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS   8.4.0.0 (840a925103a0bf4a856507f13d5eaee3c1579c2f)
Visual Studio extension to enable development for Xamarin.iOS.


Thanks,
Paul.
Comment 6 Bojan Panjevic 2015-01-28 07:38:25 UTC
Confirming the issue on Android and, hopefully, raising the priority.
Issue was introduced in XF 1.3.0.6292. In hasn't been fixed in subsequent versions(1.3.1.6296 and 1.3.2.6299-pre1).

This issue is a showstopper for us as we currently target only Android platform and need this functionality on a crucial page in our app.

Env info:
Microsoft Visual Studio Premium 2013
Version 12.0.30723.00 Update 3
Microsoft .NET Framework
Version 4.5.51650

Xamarin   3.8.150.0 (10cfd178d55287f09c85f5a1e604dfe20889a40f)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   4.20.0.28 (ba9bbbdd44cfdc4bf485e8885bd2ad24fba525f7)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS   8.4.0.0 (840a925103a0bf4a856507f13d5eaee3c1579c2f)
Visual Studio extension to enable development for Xamarin.iOS.
Comment 7 gmarchewka 2015-02-05 14:36:31 UTC
when this problem will be solved. This bug is critical for my application. Before update to 1.3.0 entry in my listview was editable.

Please for more information
Comment 8 Jason Smith [MSFT] 2015-02-13 15:40:06 UTC
Should be fixed in 1.3.5-pre1
Comment 9 Ram Chandra 2015-02-18 04:03:06 UTC
I have checked this issue with following builds:

Xamarin.Forms.1.3.5.6333-pre1

Microsoft Visual Studio Professional 2013
Version 12.0.30723.00 Update 3
Microsoft .NET Framework
Version 4.5.51641
Installed Version: Professional
Xamarin   3.9.296.0 (d66d164)
Xamarin.Android   4.20.0.34 (49a04b966feb40dfdba49d57ba16249b66d606a6)
Xamarin.iOS   8.6.1.0 (3b3ef438017c7ecf486defa9e01567a5f2b3cb2a)

Observation : When I click on entry control in list view I observed that the Entry control is focused and also in edit mode. I am able to type values on entry control.

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

This issue has been fixed. Hence I am closing this issue