I looked a lot ...
Q1. If a fragment is declared in xml, you cannot call it a replacement. Why?
Because it is a static fragment. Android will always adhere to this. Unable to remove or replace it. Any new fragment that “adds” or “replaces” with the same identifier is placed on top of each other.
Q2 If you want to place a fragment in FrameLayout (id, frame_layout), then calling add (R.id.frame_layout, fragment) will result in a "No View exist Error" error. There is a way around this by calling add (android.R.id.content, snippet). The problem is that if the R.id.frame_layout file is not the base layout for your activity?
. . , "add (id)" , . android.R.id.content buttom .
, ( ), , , ?
, . ( , ), , , . , .