It is not deprecated at the present time. For example, it is not marked as deprecated in the documentation.不建议使用单参数 FragmentStatePagerAdapter 构造函数.但是,如果您阅读该构造函数的文档,您将找到:The single-parameter FragmentStatePagerAdapter constructor is deprecated. However, if you read the documentation for that constructor, you will find:因此,将 FragmentStatePagerAdapter(fm)替换为 FragmentStatePagerAdapter(fm,FragmentStatePagerAdapter.BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT),以保留原始一参数构造函数的功能.So, replace FragmentStatePagerAdapter(fm) with FragmentStatePagerAdapter(fm, FragmentStatePagerAdapter.BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT), to retain the functionality from the original one-parameter constructor. 这篇关于不建议使用"FragmentStatePagerAdapter(androidx.fragment.app.FragmentManager)"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!