Code example for ListFragment

Methods: getActivity, getText

0
            Toast.makeText(getActivity(), message, Toast.LENGTH_LONG).show();
        } 
    } 
 
	protected void toastLong(int message) {
        if (getActivity()!=null) {
            Toast.makeText(getActivity(), getText(message), Toast.LENGTH_LONG)
				.show();
        } 
    } 
     
	protected void toastShort(int message) {
        if (getActivity()!=null) {
            Toast.makeText(getActivity(), getText(message), Toast.LENGTH_SHORT)
				.show();
        } 
    } 
     
	protected void toastShort(CharSequence message) {
        if (getActivity()!=null) {
            Toast.makeText(getActivity(), message.toString(), Toast.LENGTH_SHORT)