隐藏软键的机器人,而不是应用程序中,甚至显示在用户交互机器人、应用程序、而不是、用户

2023-09-12 05:17:31 作者:放我一个人生活

注:请不要关闭这个问题是重复的其他的答案只能隐藏软键栏[底部导航栏有3个控制按钮],直到用户交互是不存在的。

你好, 我开发的涂料的应用程序,其中,用户可以类似地绘制为在MS-涂料。

要使用用户的屏幕的全屋,我想隐藏的软键栏在用户图纸或画任何东西。

所以,我知道如何隐藏软键栏,但用户的交互[上的任何互动]的软键栏出现在屏幕上。 [前棒棒糖]

有没有什么办法,我可以隐藏软键栏,他们只有在用户从应用程序退出出现。 [我想我已​​经看到这种情况发生在一些游戏]

注:地方也有人指出,操作系统显示软键栏使一些愚蠢的应用程序不会破坏用户的体验

任何铅将AP preciated。

更新: 1.这是我早先跟着链接:如何隐藏在Android手机的软键栏?

将软键栏我的意思是在屏幕底部的导航栏在点1所示的问题。

感谢。

解决方案

 公共无效hideSoftKeyboard(){
    如果(getCurrentFocus()!= NULL){
        InputMethodManager inputMethodManager =(InputMethodManager)getSystemService(INPUT_METHOD_SERVICE);
        inputMethodManager.hideSoftInputFromWindow(getCurrentFocus()getWindowToken(),0);
    }
}
 

使用这种方法来隐藏键盘使其具有焦点。

机器人YOBY动作设计工具

Note: Please don't close this question as duplicate as the other answers only hide the softkey bar [navigation bar at the bottom with 3 control buttons] till the user interaction is not there.

Hi, I am developing a paint app in which the user can draw similarly as in MS-paint.

To use the full estate of user's screen, I wish to hide the softkeys bar while the user is drawing or painting anything.

So, I know how to hide the soft-keys bar but on user interaction [on Any interaction] the soft-keys bar appear on the screen. [Before lollipop]

Is there any way that I can hide the soft-keys bar and they only appear after the user has exited from the app. [I think I have seen this happening in some of the games]

Note: somewhere it was also stated that the OS shows the soft-keys bar so that some goofy app doesn't ruin user's experience.

Any lead will be appreciated.

Updates: 1. This is the link that I had followed earlier: How to hide the soft-key bar on Android phone?

By soft-keys bar I mean the navigation bar at the bottom of the screen as shown in the question in point 1.

Thanks.

解决方案

 public void hideSoftKeyboard() {
    if (getCurrentFocus() != null) {
        InputMethodManager inputMethodManager = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
        inputMethodManager.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0);
    }
}

Use this method to hide keyboard it has focus.