how to get a fragment added in an XML layout February 15, 2023 by Tarik You can get the fragment instance as follows: getSupportFragmentManager().findFragmentById(R.id.yourFragmentId)