Package com.zopim.android.sdk.prechat
Class ZopimChatFragment
- java.lang.Object
-
- Fragment
-
- com.zopim.android.sdk.prechat.ZopimChatFragment
-
public class ZopimChatFragment extends Fragment
Definition of the chat fragment. Handles chat loading state and inspectsChatApi.getConfig()
configuration before proceeding to the next view. This fragment will use default chat configuration if inflated through XML. To provide chat session configuration during chat start useZopimChatFragment.newInstance(com.zopim.android.sdk.api.ZopimChat.SessionConfig)
.Host activity must implement
ChatListener
interface to get notified whenChatApi
chat is loaded and initialized.
-
-
Constructor Summary
Constructors Constructor and Description ZopimChatFragment()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static ZopimChatFragment
newInstance(ZopimChat.SessionConfig config)
Creates a new instance of theZopimChatFragment
and configures chat session.void
onActivityCreated(Bundle savedInstanceState)
void
onAttach(Activity activity)
View
onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
void
onDetach()
boolean
onOptionsItemSelected(MenuItem item)
void
onPause()
void
onSaveInstanceState(Bundle outState)
void
onStart()
void
onStop()
void
onViewCreated(View view, Bundle savedInstanceState)
void
onViewStateRestored(Bundle savedInstanceState)
-
-
-
Method Detail
-
newInstance
public static ZopimChatFragment newInstance(ZopimChat.SessionConfig config)
Creates a new instance of theZopimChatFragment
and configures chat session. Used to create a customized chat session configuration which will override the global one provided at initialization time viaZopimChatApi
- Parameters:
config
- for the chat to be started- Returns:
- a new instance of
ZopimChatFragment
-
onAttach
public void onAttach(Activity activity)
-
onCreateView
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
-
onViewCreated
public void onViewCreated(View view, Bundle savedInstanceState)
-
onActivityCreated
public void onActivityCreated(Bundle savedInstanceState)
-
onViewStateRestored
public void onViewStateRestored(Bundle savedInstanceState)
-
onStart
public void onStart()
-
onPause
public void onPause()
-
onStop
public void onStop()
-
onSaveInstanceState
public void onSaveInstanceState(Bundle outState)
-
onDetach
public void onDetach()
-
onOptionsItemSelected
public boolean onOptionsItemSelected(MenuItem item)
-
-