KeyboardView is deprecated in android

后端 未结 1 1585
南旧
南旧 2020-12-16 17:40

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 a

相关标签:
1条回答
  • 2020-12-16 18:04

    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 will also have your local copy of com.android.internal.R attributes (stylable) from from here

    You can notice, it is annotated as

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

    Google:

    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

    0 讨论(0)
提交回复
热议问题