Why are there 2 different ComponentActivity classes?
问题 I'm trying to handle back button presses in my fragments by registering an OnBackPressedCallback via addOnBackPressedCallback to receive onBackPressed() callbacks without needing to override the method in your activity (described Nov 5, 2018 release notes for androidx.activity) If you look at the AppCompatActivity Docs, it claims AppCompatActivity extends from androidx.activity.ComponentActivity . The problem I'm running into is, in my codebase, AppCompatActivity extends from androidx.core