Package com.zendesk.sdk.requests
Class ViewRequestFragment
- java.lang.Object
-
- Fragment
-
- com.zendesk.sdk.requests.ViewRequestFragment
-
- All Implemented Interfaces:
- ActionHandler, ActionRefreshComments.ActionRefreshCommentsListener
public class ViewRequestFragment extends Fragment implements ActionRefreshComments.ActionRefreshCommentsListener
ViewRequestFragment is used to present the comments of a given request. Interaction with the fragment is currently only supported via code and not through XML.
The currently recommended approach is to use @link{com.zendesk.sdk.requests.ViewRequestFragment#newInstance}
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.StringEXTRA_REQUEST_IDstatic java.lang.StringEXTRA_REQUEST_SUBJECT
-
Constructor Summary
Constructors Constructor and Description ViewRequestFragment()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static ViewRequestFragmentnewInstance(java.lang.String requestId)Create an instance of a View Request fragment, loading of the request is automatic when onResume is called as part of the fragment lifecycle.static ViewRequestFragmentnewInstance(java.lang.String requestId, java.lang.String subject)Create an instance of a View Request fragment, loading of the request is automatic when onResume is called as part of the fragment lifecycle.static ViewRequestFragmentnewInstance(java.lang.String requestId, java.lang.String subject, SubmissionListener listener)Create an instance of a View Request fragment, loading of the request is automatic when onResume is called as part of the fragment lifecycle.voidonActivityResult(int requestCode, int resultCode, Intent data)voidonAttach(Context context)voidonCreate(Bundle savedInstanceState)ViewonCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)voidonDestroy()voidonDetach()voidonPause()voidonResume()voidrefreshComments(ActionRefreshComments.ActionRefreshCommentsData data)voidsetSubmissionListener(SubmissionListener submissionListener)
-
-
-
Field Detail
-
EXTRA_REQUEST_ID
public static final java.lang.String EXTRA_REQUEST_ID
- See Also:
- Constant Field Values
-
EXTRA_REQUEST_SUBJECT
public static final java.lang.String EXTRA_REQUEST_SUBJECT
- See Also:
- Constant Field Values
-
-
Method Detail
-
newInstance
public static ViewRequestFragment newInstance(java.lang.String requestId)
Create an instance of a View Request fragment, loading of the request is automatic when onResume is called as part of the fragment lifecycle.- Parameters:
requestId- request id which is to be loaded- Returns:
- instance of a ViewRequestFragment
-
newInstance
public static ViewRequestFragment newInstance(java.lang.String requestId, java.lang.String subject)
Create an instance of a View Request fragment, loading of the request is automatic when onResume is called as part of the fragment lifecycle.- Parameters:
requestId- request id which is to be loadedsubject- subject to be set within the Actionbar on presenting of the fragment- Returns:
- instance of a ViewRequestFragment
-
newInstance
public static ViewRequestFragment newInstance(java.lang.String requestId, java.lang.String subject, SubmissionListener listener)
Create an instance of a View Request fragment, loading of the request is automatic when onResume is called as part of the fragment lifecycle.- Parameters:
requestId- request id which is to be loadedsubject- subject to be set within the Actionbar on presenting of the fragmentlistener- aSubmissionListenerthat can be used to subscribe to the lifecycle events of comment submission- Returns:
- an instance of a ViewRequestFragment
-
onCreateView
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
-
onCreate
public void onCreate(Bundle savedInstanceState)
-
onResume
public void onResume()
-
onPause
public void onPause()
-
onAttach
public void onAttach(Context context)
-
onDetach
public void onDetach()
-
onDestroy
public void onDestroy()
-
onActivityResult
public void onActivityResult(int requestCode, int resultCode, Intent data)
-
setSubmissionListener
public void setSubmissionListener(SubmissionListener submissionListener)
-
refreshComments
public void refreshComments(ActionRefreshComments.ActionRefreshCommentsData data)
- Specified by:
refreshCommentsin interfaceActionRefreshComments.ActionRefreshCommentsListener
-
-