android startActivityForResult()替代方案Activity Result Api
减少样板代码,解耦,灵活,易测试的目的步骤1.在app下的build.gradle中加入依赖:implementation'androidx.activity:activity:1.2.0-beta01'implementation'androidx.fragment:fragment:1.3.0-beta01'2.定义协议新建一个Contract类,继承自ActivityResultContra