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.String
EXTRA_REQUEST_ID
static java.lang.String
EXTRA_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 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.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.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.void
onActivityResult(int requestCode, int resultCode, Intent data)
void
onAttach(Context context)
void
onCreate(Bundle savedInstanceState)
View
onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
void
onDestroy()
void
onDetach()
void
onPause()
void
onResume()
void
refreshComments(ActionRefreshComments.ActionRefreshCommentsData data)
void
setSubmissionListener(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
- aSubmissionListener
that 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:
refreshComments
in interfaceActionRefreshComments.ActionRefreshCommentsListener
-
-