저는 안드로이드를 처음 접했기 때문에이 쉬운 매개 변수 전달 방법을 권장하지 않습니다.간단한 getter setter로 객체를 조각으로 전달하지 않는 이유는 무엇입니까?
class DemoFragment extends Fragment{
private MyObject myObject;
public void setMyObject(MyObject myObject){
this.myObject = myObject;
}
}
DemoFragment fragmentDemo = new DemoFragment();
fragmentDemo.setMyObject(myObject);
누가 그렇게 말했습니까? –
Farhad는 관련없는 태그를 추가하지 않습니다. –
추가 할 태그가 더 좋은 경우 편집 할 수 있습니다. –