destroy fragment android kotlin code example
Example: destory fragment
getSupportFragmentManager().beginTransaction().remove(yourFragment).commitAllowingStateLoss();
getSupportFragmentManager().beginTransaction().remove(yourFragment).commitAllowingStateLoss();