Package com.zendesk.sdk.requests
Class RequestListFragment
- java.lang.Object
-
- ListFragment
-
- com.zendesk.sdk.requests.RequestListFragment
-
- All Implemented Interfaces:
- NetworkAware
public class RequestListFragment extends ListFragment implements NetworkAware
A fragment which will list the currently open requests for a given user.The list of requests that will be retrieved will be for the user that has been configured in
com.zendesk.sdk.network.impl.ZendeskConfig#init(android.content.Context, String, String, String)
Attempting to use this fragment without having specified authentication in
com.zendesk.sdk.network.impl.ZendeskConfig#init(android.content.Context, String, String, String)
will result in anIllegalStateException
-
-
Constructor Summary
Constructors Constructor and Description RequestListFragment()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description void
onAttach(Context context)
View
onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
void
onDetach()
void
onNetworkAvailable()
Called when network connectivity is availablevoid
onNetworkUnavailable()
Called when network connectivity is unavailable.void
onPause()
void
onResume()
void
refreshRequests()
This will fetch the list of Requests from the server.void
setRequestLoadingListener(RequestLoadingListener listener)
Sets theRequestLoadingListener
for this Fragment.
-
-
-
Method Detail
-
onCreateView
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
-
onResume
public void onResume()
-
onPause
public void onPause()
-
onAttach
public void onAttach(Context context)
-
onDetach
public void onDetach()
-
refreshRequests
public void refreshRequests()
This will fetch the list of Requests from the server.This method will fetch the list of Requests from the server and set the state of the UI to indicate that loading is occurring. After the requests have been retrieved they will be displayed in this fragment's listview.
-
setRequestLoadingListener
public void setRequestLoadingListener(RequestLoadingListener listener)
Sets theRequestLoadingListener
for this Fragment.- Parameters:
listener
- The listener to notify of the loading events of requests in this fragment.
-
onNetworkAvailable
public void onNetworkAvailable()
Description copied from interface:NetworkAware
Called when network connectivity is available- Specified by:
onNetworkAvailable
in interfaceNetworkAware
-
onNetworkUnavailable
public void onNetworkUnavailable()
Description copied from interface:NetworkAware
Called when network connectivity is unavailable.- Specified by:
onNetworkUnavailable
in interfaceNetworkAware
-
-