gpt4 book ai didi

android - KeyboardView 在 android 中已弃用

转载 作者:行者123 更新时间:2023-12-03 14:27:15 25 4
gpt4 key购买 nike

KeyboardView android 团队在 API 级别 29 中已正式弃用,我无法找到替代方法。请让我知道是否有任何替代方案?

最佳答案

Google 建议的唯一解决方案是复制 KeyboardView.javaKeyboard.java文件从 Android AOSP 到您的本地项目。通过一些定制,我设法让它像旧的 一样工作。已弃用 KeyboardViewKeyboard Android 的类(class)。
您还将获得 的本地副本com.android.internal.R from here 中的属性(可样式化)
你可以注意到,它被注释为

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

This class was deprecated in API level 29. This class is deprecatedbecause this is just a convenient UI widget class that applicationdevelopers can re-implement on top of existing public APIs. If youhave already depended on this class, consider copying theimplementation from AOSP into your project or re-implementing asimilar widget by yourselves

关于android - KeyboardView 在 android 中已弃用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60316785/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com