Hi, I have two frames in movie.xml, namely the container , detail_screen . The container will add movies.xml , which contains a listview, and detail_screen will have an extensible listview called movie_details.xml . Now I want to program the detail_screen fragment already presented or not. If he just needs to remove this fragment. I did this with follwing and its performance.
if (getSupportFragmentManager().findFragmentByTag("MyFragment") != null) { getSupportFragmentManager().beginTransaction().remove(getSupportFragmentManager().findFragmentByTag("MyFragment")).commit(); }
but is there any other way to determine if a fragment is represented or not in the frame layout in android programmatically. thanks in advance
source share