onCreate 내에서 호출 할 메서드가 있고 그 메서드가 완료되면 두 번째 메서드가 호출됩니다. 이것은 쉬운 방법이 있다면 알려주는 것이 최선의 방법이 아닐 수도 있습니다!onCreate 내에서 메소드를 실행/호출하려면 어떻게해야합니까?
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.fragment_view_my_tickets);
//I want to execute firstMethod from in here
}
public void firstMethod(){
//code I want to execute on create
//Only when this is finished- I want to execute secondMethod
}
public void secondMethod(){
//only executed when firstMethod is finished
}
게시자가 특별한 이유가 있습니까? 또한 문제는 무엇입니까? – codeMagic
firstMethod 및 secondMethod에서 이러한 메소드가 반환하거나 정확히 수행 할 수있는 것을 설명 할 수 있다고 말할 때 둘 다 무효화되는 것입니까? –