简体   繁体   English

编辑文本在 xamarin Android 中自动失去焦点

[英]Edit text is loosing focus automatically in xamarin Android

We are working in a xamarin forms application.我们正在使用 xamarin forms 应用程序。 In which we have a list view where it has two editor, when we are tapping the second editor the focus is switched automatically to the first editor.我们有一个列表视图,其中有两个编辑器,当我们点击第二个编辑器时,焦点会自动切换到第一个编辑器。 It works fine in iOS but the issue is mainly in Android devices which are not Samsung.它在 iOS 中运行良好,但问题主要出现在非三星的 Android 设备中。 It works as expected in Samsung device.它在三星设备中按预期工作。 Please help请帮忙

It is a known bug in Xamarin.Forms.这是 Xamarin.Forms 中的一个已知错误。 I have already reported it here .我已经在这里报告了。 You can subscribe to the issue and comment, so that they can fix it quickly.您可以订阅问题并发表评论,以便他们快速修复。 13 days ago they have moved the issue into Ready for work , which means that a fix will come no sooner that 3 months . 13 天前,他们已将问题转移到Ready for work ,这意味着修复将不会早于3 个月

In the meantime, you can "fix" it with replacing the ListView with CollectionView .同时,您可以通过将ListView替换为CollectionView来“修复”它。 At least in my experience, the CollectionView doesn't break the focusing this way.至少根据我的经验, CollectionView不会以这种方式打破焦点。 If you are still experiencing some focusing issues, the best will be to create a repro project and report the issue, as I have.如果您仍然遇到一些焦点问题,最好像我一样创建一个重现项目并报告问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM