이 글에서는 프래그먼트의 효율적인 생성 방법에 대해 이야기해보겠습니다. 1. 직접 생성자 호출 MyFragment fragment = new MyFragment(); Fragment의 인스턴스를 직접 생성하기 위해 기본 생성자를 호출한다. 가장 기본적이고 간단한 방법이지만, 안드로이드 시스템이 Fragment를 재생성할 때 모든 데이터를 잃어버린다. 2. newInstance() : 정적 팩토리 메소드 public static MyFragment newInstance(String param1) { MyFragment fragment = new MyFragment(); // Fragment 인스턴스 생성 Bundle args = new Bundle(); args.putString("param1", para..