简体   繁体   English

禁用Android键盘上的设置按钮

[英]Disable Setting button on android keyboard

I want to disable these buttons on my android keyboard tablet : 我想在我的Android键盘平板电脑上禁用这些按钮:

在此处输入图片说明

Because, if the user press these buttons, they can quit my application, and normally, they can't 因为,如果用户按下这些按钮,则它们可以退出我的应用程序,通常,它们不能

I develop with Visual Studio 2015 Xamarin in MVVMCross 我在MVVMCross中使用Visual Studio 2015 Xamarin开发

How can i do that ? 我怎样才能做到这一点 ?

Thank you 谢谢

You can't disable these buttons as far as I know. 据我所知,您不能禁用这些按钮。 And even if you could, a user can always install other keyboards that you don't have control over. 即使可以,用户也可以安装其他您无法控制的键盘。

Modifier keys are not triggering the EditorAction event of an EditText control, so those won't help you (only for Done and Del, for example). 修饰键不会触发EditText控件的EditorAction事件,因此这些修饰键将无济于事(例如,仅适用于Done和Del)。 The OnKeyUp or OnKeyDown event won't help you either. OnKeyUp或OnKeyDown事件也无法帮助您。

One solution could be to implement a keyboard like banking apps often do, however that would be a hassle for a complete keyboard (most banking apps only show digits for a PIN-code). 一种解决方案可能是像银行应用程序通常那样实现键盘,但是这对于完整的键盘来说很麻烦(大多数银行应用程序仅显示PIN码的数字)。 It depends on the specific use case and context of your app if this would work for you. 如果这适合您,则取决于特定的用例和应用程序的上下文。

But really think about why you would want to prevent the user from quitting the app. 但请真正考虑一下为什么要阻止用户退出该应用程序。 If it is needed for an enterprise or school, there are solutions with Mobile Device Management that should work. 如果企业或学校需要,则可以使用移动设备管理解决方案。 An app for taking exams for example, would require this. 例如,用于考试的应用程序将需要此功能。

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

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