Q:

On fragment delay method not working?

I used delay method on fragment in onCreateView method, but its working only one time, when second time i goto again fragment this delay method is not calling
public class SearchFragment extends Fragment {    
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.search_layout, container, false);

    autoMatedClicker();
    return rootView;
}

private void autoMatedClicker() {
    new Handler().postDelayed(new Runnable() {
        @Override
        public void run()
        {
            citySelectionList();
        }
    }, 50);
}

A:

You could call the autoMatedClicker() function of the fragment in the onResume() function of the fragment. Also note that the fragments onResume() will be called only when the parent activity's onResume() is called.

