xamarin/Xamarin.Forms

Xamarin.Forms Entry field that prevents soft keyboard from showing up on Focus

开放

#4,555 创建于 2018年11月27日

 (27 条评论) (4 个反应) (0 位负责人)C# (1,926 个派生)batch import
a/entrye/2 :clock2:good first issuehacktoberfest 🍻help wantedproposal-acceptedt/enhancement ➕up-for-grabs

仓库指标

星标
 (5,644 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

Description

Support to prevent soft keyboard on Entry field for Android, iOS, and UWP head projects in Xamarin.Forms.

Currently, Entry field in Xamarin.Forms provides no functionality to prevent soft keyboard from showing up entirely. There are solution out there that will hide it but they make things even worse since now you have keyboard popping up briefly, then disappearing from the screen.

It feels like having a way to disable keyboard from showing up entirely on an Entry field makes sense. For example, I make my own buttons, that resemble keyboard. Tapping on each of these, puts some characters in the Entry field without showing keyboard but only when Entry field receives focus.

Another example, scanning with external barcode scanners into a field when it has focus only. Here also makes no sense to show keyboard.

Steps to Reproduce

  1. Create simple View with Entry Field
  2. Focus on that Entry field
  3. Soft keyboard will show up

Expected Behavior

It would be nice to be able to disable keyboard from showing up entirely on an Entry field focus. We need this for all 3 platforms in Xamarin.Forms, on UWP, iOS and Android

Actual Behavior

This is currently impossible to do. There are solution that hide keyboard (using renderers or other methods) which makes it even worse since keyboard shows briefly, then hides. In my example on scanning above, this solution makes it ridiculous.

贡献者指南