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 voidonAttach(Context context)ViewonCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)voidonDetach()voidonNetworkAvailable()Called when network connectivity is availablevoidonNetworkUnavailable()Called when network connectivity is unavailable.voidonPause()voidonResume()voidrefreshRequests()This will fetch the list of Requests from the server.voidsetRequestLoadingListener(RequestLoadingListener listener)Sets theRequestLoadingListenerfor 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 theRequestLoadingListenerfor 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:NetworkAwareCalled when network connectivity is available- Specified by:
onNetworkAvailablein interfaceNetworkAware
-
onNetworkUnavailable
public void onNetworkUnavailable()
Description copied from interface:NetworkAwareCalled when network connectivity is unavailable.- Specified by:
onNetworkUnavailablein interfaceNetworkAware
-
-