Android中不推荐使用KeyboardView [英] KeyboardView is deprecated in android

查看:490
本文介绍了Android中不推荐使用KeyboardView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

KeyboardView 已被API级别29的android团队弃用,而我无法找到替代方法.请让我知道是否有其他选择?

KeyboardView has been deprecated official by android team in API level 29 and i didn't able to find the alternative way for this. Please let me know if there any alternative?

推荐答案

Google提出的唯一解决方案是复制

The only solution Google suggests is copying KeyboardView.java and Keyboard.java files to your local project from Android AOSP. With some customization I managed to make it work as old deprecated KeyboardView and Keyboard Android's classes.

您还将从您会注意到,它被注释为

You can notice, it is annotated as

<!-- {@deprecated Copy this definition into your own application project.} -->

Google:

该类在 API级别29 中已弃用.此类已弃用因为这只是该应用程序的一个方便的UI小部件类开发人员可以在现有的公共API之上重新实现.如果你已经依赖此类,请考虑复制从AOSP实施到您的项目中或重新实施自己也有类似的小工具

This class was deprecated in API level 29. This class is deprecated because this is just a convenient UI widget class that application developers can re-implement on top of existing public APIs. If you have already depended on this class, consider copying the implementation from AOSP into your project or re-implementing a similar widget by yourselves

这篇关于Android中不推荐使用KeyboardView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆