Code example for Fragment

Methods: onViewCreated

0
        return inflater.inflate(R.layout.fragment, container, false);
    } 
 
    @Override 
    public void onViewCreated(View view, Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
        initUIComponents(); 
    } 
 
    @Override 
    public void onStart() { 
        super.onStart(); 
        spiceManager.start(getActivity());
        if (wordField.getText() != null) {
            spiceManager.addListenerIfPending(String.class, wordField.getText().toString(), new ReverseStringRequestListener());
        } 
    } 
 
    @Override 
    public void onStop() { 
        // Please review https://github.com/octo-online/robospice/issues/96 for the reason of that