DeviceTypes.ValidDeviceType(Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Checks whether a value is within the accepted device-type range.
[Android.Runtime.Register("validDeviceType", "(I)Z", "", ApiSince=30)]
public static bool ValidDeviceType(int deviceType);
[<Android.Runtime.Register("validDeviceType", "(I)Z", "", ApiSince=30)>]
static member ValidDeviceType : int -> bool
Parameters
- deviceType
- Int32
The integer device-type value to check.
Returns
true if the value is within the platform's accepted range; otherwise, false.
- Attributes
Remarks
On Android 11 (API level 30) through Android 17 (API level 37), this method accepts values from -7 through 52, inclusive. It performs a range check, not an enum-membership check: the unused value 9 also passes. The range can change in later Android versions. The control builders replace an out-of-range value with the unknown device type.