public class LessonFinishFragment extends Fragment {
public static LessonFinishFragment getInstance() {
if (chatRoomInstance == null) {
chatRoomInstance = new LessonFinishFragment();
}
return chatRoomInstance;
}
}
在class类里面调用
LessonFinishFragment chatRoomFragment =LessonFinishFragment.getInstance();