Which function will be called when the fragment
resume.
I have read this question here setTitle when Fragment is visible again , but i must use the add()
function. What should i do? onResume
function is not called!
EDIT: In MainActivity:
getSupportFragmentManager().beginTransaction().replace(R.id.container,fragmentA).commit();
when click a button in fragment A, the fragment B will be show:
onClick(View v){
getSupportFragmentManager().beginTransaction().add(R.id.container,fragmentB).commit();
}
And when i press back button, it resume to fragment A, but onResume() function in A is not called.