Используйте RegexOptions.Singleline, он меняет значение. включить новые строки
Regex.Replace (content, searchText, replaceText, RegexOptions.Singleline);
Используйте onCreateView(..)
вместо setupDialog(...)
для настройки пользовательского интерфейса для BottomSheetDialogFragment
. Как ниже
@Override
public View onCreateView(LayoutInflater inflater,
@Nullable ViewGroup container,
@Nullable Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.include_modal_content, container,
false);
// get the views and attach the listener
return view;
}