public class Slider extends RPCRequest
If connecting to SDL Core v.6.0+, the slider can be canceled programmatically using the `cancelID`. On older versions of SDL Core, the slider will persist until the user has interacted with the slider or the specified timeout has elapsed.
Function Group: Base
HMILevel needs to be FULL
Parameter List
| Param Name | Type | Description | Req. | Notes | Version Available |
|---|---|---|---|---|---|
| numTicks | Integer | Number of selectable items on a horizontal axis. | Y | Minvalue=2; Maxvalue=26 | SmartDeviceLink 2.0 |
| position | Integer | Initial position of slider control (cannot exceed numTicks), | Y | Minvalue=1; Maxvalue=26 | SmartDeviceLink 2.0 |
| sliderHeader | String | Text header to display | N | Maxlength=500 | SmartDeviceLink 2.0 |
| sliderFooter | Integer | Text footer to display (meant to display min/max threshold descriptors). For a static text footer, only one footer string shall be provided in the array. For a dynamic text footer, the number of footer text string in the array must match the numTicks value.For a dynamic text footer, text array string should correlate with potential slider position index.If omitted on supported displays, no footer text shall be displayed. |
N | Maxlength=500; Minvalue=1; Maxvalue=26 | SmartDeviceLink 2.0 |
| timeout | String | App defined timeout. Indicates how long of a timeout from the last action (i.e. sliding control resets timeout). If omitted, the value is set to 10000. | N | Minvalue=0; Maxvalue=65535; Defvalue= 10000 | SmartDeviceLink 2.0 |
| cancelID | Integer | An ID for this specific slider to allow cancellation through the `CancelInteraction` RPC. | N | SmartDeviceLink 6.0 |
Response
Non-default Result Codes:
SAVED
INVALID_DATA
OUT_OF_MEMORY
TOO_MANY_PENDING_REQUESTS
APPLICATION_NOT_REGISTERED
GENERIC_ERROR
DISALLOWED
UNSUPPORTED_RESOURCE
REJECTED
ABORTED
| Modifier and Type | Field and Description |
|---|---|
static String |
KEY_CANCEL_ID |
static String |
KEY_NUM_TICKS |
static String |
KEY_POSITION |
static String |
KEY_SLIDER_FOOTER |
static String |
KEY_SLIDER_HEADER |
static String |
KEY_TIMEOUT |
onResponseListenerfunction, KEY_CORRELATION_ID, KEY_FUNCTION_NAME, KEY_NOTIFICATION, KEY_PARAMETERS, KEY_REQUEST, KEY_RESPONSE, messageType, parametersKEY_BULK_DATA, KEY_PROTECTED, store| Constructor and Description |
|---|
Slider()
Constructs a new Slider object
|
Slider(Hashtable<String,Object> hash)
Constructs a new Slider object indicated by the Hashtable parameter
|
Slider(Integer numTicks,
Integer position,
String sliderHeader)
Constructs a new Slider object \
|
| Modifier and Type | Method and Description |
|---|---|
Integer |
getCancelID()
Gets an Integer value representing the cancel ID
|
Integer |
getNumTicks()
Gets a number of selectable items on a horizontal axis
|
Integer |
getPosition()
Gets an Initial position of slider control
|
List<String> |
getSliderFooter()
Gets a text footer to display
|
String |
getSliderHeader()
Gets a text header to display
|
Integer |
getTimeout()
Gets an App defined timeout
|
Slider |
setCancelID(Integer cancelID)
Sets the cancel ID
|
Slider |
setNumTicks(Integer numTicks)
Sets a number of selectable items on a horizontal axis
|
Slider |
setPosition(Integer position)
Sets an Initial position of slider control
|
Slider |
setSliderFooter(List<String> sliderFooter)
Sets a text footer to display
|
Slider |
setSliderHeader(String sliderHeader)
Sets a text header to display
|
Slider |
setTimeout(Integer timeout)
Sets an App defined timeout
|
getCorrelationID, getOnRPCResponseListener, setCorrelationID, setOnRPCResponseListenergetBoolean, getDouble, getFloat, getFunctionID, getFunctionName, getInteger, getLong, getMessageType, getObject, getParameters, getString, setFunctionName, setParametersclone, deserializeJSON, equals, format, formatObject, getBulkData, getMessageTypeName, getStore, getStoreValue, getValue, getValueForString, hashCode, hasKey, isPayloadProtected, serializeJSON, serializeJSON, setBulkData, setPayloadProtected, setValuepublic static final String KEY_NUM_TICKS
public static final String KEY_SLIDER_HEADER
public static final String KEY_SLIDER_FOOTER
public static final String KEY_POSITION
public static final String KEY_TIMEOUT
public static final String KEY_CANCEL_ID
public Slider()
public Slider(Hashtable<String,Object> hash)
hash - The Hashtable to usepublic Slider(@NonNull
Integer numTicks,
@NonNull
Integer position,
@NonNull
String sliderHeader)
numTicks - Number of selectable items on a horizontal axis.position - Initial position of slider control (cannot exceed numTicks)sliderHeader - Text header to displaypublic Slider setNumTicks(@NonNull Integer numTicks)
numTicks - an Integer value representing a number of selectable items on
a horizontal axis
Notes: Minvalue=2; Maxvalue=26public Integer getNumTicks()
public Slider setPosition(@NonNull Integer position)
position - an Integer value representing an Initial position of slider
control
Notes: Minvalue=1; Maxvalue=26public Integer getPosition()
public Slider setSliderHeader(@NonNull String sliderHeader)
sliderHeader - a String value
Notes: Maxlength=500public String getSliderHeader()
public Slider setSliderFooter(List<String> sliderFooter)
sliderFooter - a Listpublic List<String> getSliderFooter()
public Slider setTimeout(Integer timeout)
timeout - an Integer value representing an App defined timeout
Notes: Minvalue=0; Maxvalue=65535; Defvalue=10000public Integer getTimeout()
public Integer getCancelID()