belongs to Maven artifact com.android.support:support-compat:28.0.0-alpha1
RemoteInput.Builder
public
static
final
class
RemoteInput.Builder
extends Object
java.lang.Object | |
↳ | android.support.v4.app.RemoteInput.Builder |
Builder class for RemoteInput
objects.
Summary
Public constructors | |
---|---|
RemoteInput.Builder(String resultKey)
Create a builder object for |
Public methods | |
---|---|
RemoteInput.Builder
|
addExtras(Bundle extras)
Merge additional metadata into this builder. |
RemoteInput
|
build()
Combine all of the options that have been set and return a new
|
Bundle
|
getExtras()
Get the metadata Bundle used by this Builder. |
RemoteInput.Builder
|
setAllowDataType(String mimeType, boolean doAllow)
Specifies whether the user can provide arbitrary values. |
RemoteInput.Builder
|
setAllowFreeFormInput(boolean allowFreeFormTextInput)
Specifies whether the user can provide arbitrary text values. |
RemoteInput.Builder
|
setChoices(CharSequence[] choices)
Specifies choices available to the user to satisfy this input. |
RemoteInput.Builder
|
setLabel(CharSequence label)
Set a label to be displayed to the user when collecting this input. |
Inherited methods | |
---|---|
From
class
java.lang.Object
|
Public constructors
RemoteInput.Builder
RemoteInput.Builder (String resultKey)
Create a builder object for RemoteInput
objects.
Parameters | |
---|---|
resultKey |
String : the Bundle key that refers to this input when collected from the user
|
Public methods
addExtras
RemoteInput.Builder addExtras (Bundle extras)
Merge additional metadata into this builder.
Values within the Bundle will replace existing extras values in this Builder.
Parameters | |
---|---|
extras |
Bundle |
Returns | |
---|---|
RemoteInput.Builder |
See also:
build
RemoteInput build ()
Combine all of the options that have been set and return a new
RemoteInput
object.
Returns | |
---|---|
RemoteInput |
getExtras
Bundle getExtras ()
Get the metadata Bundle used by this Builder.
The returned Bundle is shared with this Builder.
Returns | |
---|---|
Bundle |
setAllowDataType
RemoteInput.Builder setAllowDataType (String mimeType, boolean doAllow)
Specifies whether the user can provide arbitrary values.
Parameters | |
---|---|
mimeType |
String : A mime type that results are allowed to come in.
Be aware that text results (see setAllowFreeFormInput(boolean)
are allowed by default. If you do not want text results you will have to
pass false to setAllowFreeFormInput . |
doAllow |
boolean : Whether the mime type should be allowed or not. |
Returns | |
---|---|
RemoteInput.Builder |
this object for method chaining |
setAllowFreeFormInput
RemoteInput.Builder setAllowFreeFormInput (boolean allowFreeFormTextInput)
Specifies whether the user can provide arbitrary text values.
Parameters | |
---|---|
allowFreeFormTextInput |
boolean : The default is true .
If you specify false , you must either provide a non-null
and non-empty array to setChoices(CharSequence[]) , or enable a data result
in setAllowDataType . Otherwise an
IllegalArgumentException is thrown. |
Returns | |
---|---|
RemoteInput.Builder |
this object for method chaining |
setChoices
RemoteInput.Builder setChoices (CharSequence[] choices)
Specifies choices available to the user to satisfy this input.
Parameters | |
---|---|
choices |
CharSequence : an array of pre-defined choices for users input.
You must provide a non-null and non-empty array if
you disabled free form input using setAllowFreeFormInput(boolean) . |
Returns | |
---|---|
RemoteInput.Builder |
this object for method chaining |
setLabel
RemoteInput.Builder setLabel (CharSequence label)
Set a label to be displayed to the user when collecting this input.
Parameters | |
---|---|
label |
CharSequence : The label to show to users when they input a response. |
Returns | |
---|---|
RemoteInput.Builder |
this object for method chaining |
Annotations
Interfaces
- ActionBarDrawerToggle.Delegate
- ActionBarDrawerToggle.DelegateProvider
- ActivityCompat.OnRequestPermissionsResultCallback
- ActivityCompat.PermissionCompatDelegate
- FragmentManager.BackStackEntry
- FragmentManager.OnBackStackChangedListener
- LoaderManager.LoaderCallbacks
- NotificationCompat.Action.Extender
- NotificationCompat.Extender
- SharedElementCallback.OnSharedElementsReadyListener
- TaskStackBuilder.SupportParentable
Classes
- ActionBarDrawerToggle
- ActivityCompat
- ActivityManagerCompat
- ActivityOptionsCompat
- AlarmManagerCompat
- AppLaunchChecker
- AppOpsManagerCompat
- BundleCompat
- DialogFragment
- Fragment
- Fragment.SavedState
- FragmentActivity
- FragmentContainer
- FragmentController
- FragmentHostCallback
- FragmentManager
- FragmentManager.FragmentLifecycleCallbacks
- FragmentManagerNonConfig
- FragmentPagerAdapter
- FragmentStatePagerAdapter
- FragmentTabHost
- FragmentTransaction
- FrameMetricsAggregator
- JobIntentService
- ListFragment
- LoaderManager
- NavUtils
- NotificationCompat
- NotificationCompat.Action
- NotificationCompat.Action.Builder
- NotificationCompat.Action.WearableExtender
- NotificationCompat.BigPictureStyle
- NotificationCompat.BigTextStyle
- NotificationCompat.Builder
- NotificationCompat.CarExtender
- NotificationCompat.CarExtender.UnreadConversation
- NotificationCompat.CarExtender.UnreadConversation.Builder
- NotificationCompat.DecoratedCustomViewStyle
- NotificationCompat.InboxStyle
- NotificationCompat.MessagingStyle
- NotificationCompat.MessagingStyle.Message
- NotificationCompat.Style
- NotificationCompat.WearableExtender
- NotificationCompatExtras
- NotificationCompatSideChannelService
- NotificationManagerCompat
- RemoteInput
- RemoteInput.Builder
- ServiceCompat
- ShareCompat
- ShareCompat.IntentBuilder
- ShareCompat.IntentReader
- SharedElementCallback
- TaskStackBuilder
Exceptions