Package org.robolectric.shadows
Class InputDeviceBuilder
java.lang.Object
org.robolectric.shadows.InputDeviceBuilder
Builder for
InputDevice
.
This exposes the setters for public InputDevice attributes. Its implemented by wrapping the hidden android.view.InputDevice.Builder. Tests building against the android platform source should just use that API instead.
Only supported when running on SDKs >= 34
-
Method Summary
Modifier and TypeMethodDescriptionaddMotionRange
(int axis, int source, float min, float max, float flat, float fuzz, float resolution) build()
static InputDeviceBuilder
setControllerNumber
(int controllerNumber) setDescriptor
(String descriptor) setExternal
(boolean external) setHasMicrophone
(boolean hasMicrophone) setHasVibrator
(boolean hasVibrator) setId
(int id) setKeyboardType
(int keyboardType) setKeyCharacterMap
(KeyCharacterMap keyCharacterMap) setProductId
(int productId) setSources
(int sources) setVendorId
(int vendorId)
-
Method Details
-
newBuilder
-
setId
- See Also:
-
setControllerNumber
- See Also:
-
setName
- See Also:
-
setVendorId
- See Also:
-
setProductId
- See Also:
-
setDescriptor
- See Also:
-
setExternal
- See Also:
-
setSources
- See Also:
-
setKeyboardType
- See Also:
-
setKeyCharacterMap
- See Also:
-
setHasVibrator
- See Also:
-
setHasMicrophone
- See Also:
-
addMotionRange
public InputDeviceBuilder addMotionRange(int axis, int source, float min, float max, float flat, float fuzz, float resolution) - See Also:
-
build
-