Sequenceablepublic class Insets extends Object implements Sequenceable
A positive value indicates that the bound approaches the rectangle center, while a negative value indicates that the bound moves away from the rectangle center.
Sequenceable.Producer<T>| 限定符和类型 | 字段 | 说明 |
|---|---|---|
int |
bottomValue |
Indicates the bottom value.
|
int |
leftValue |
Indicates the left value.
|
static Insets |
NULL_INSET |
Indicates the blank Insets instance.
|
int |
rightValue |
Indicates the right value.
|
int |
topValue |
Indicates the top value.
|
| 构造器 | 说明 |
|---|---|
Insets(int leftValue,
int topValue,
int rightValue,
int bottomValue) |
A constructor used to create an
Insets instance. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
boolean |
hasFileDescriptor() |
Checks whether the implementation class of this
Sequenceable contains FileDescriptor object data. |
boolean |
marshalling(Parcel parcel) |
Marshals this
Sequenceable object into a Parcel. |
static Insets |
setValue(int leftValue,
int topValue,
int rightValue,
int bottomValue) |
Creates an
Insets instance by specifying the offset values for the four bounds. |
static Insets |
setValue(Rect rect) |
Creates an
Insets instance based on the specified rectangle. |
boolean |
unmarshalling(Parcel parcel) |
Unmarshals this
Sequenceable object from a Parcel. |
public static final Insets NULL_INSET
public final int bottomValue
public final int leftValue
public final int rightValue
public final int topValue
public Insets(int leftValue,
int topValue,
int rightValue,
int bottomValue)
Insets instance.leftValue - Indicates the offset value for the left bound.topValue - Indicates the offset value for the top bound.rightValue - Indicates the offset value for the right bound.bottomValue - Indicates the offset value for the bottom bound.public static Insets setValue(int leftValue, int topValue, int rightValue, int bottomValue)
Insets instance by specifying the offset values for the four bounds.leftValue - Indicates the offset value for the left bound.topValue - Indicates the offset value for the top bound.rightValue - Indicates the offset value for the right bound.bottomValue - Indicates the offset value for the bottom bound.Insets object.public static Insets setValue(Rect rect)
Insets instance based on the specified rectangle.rect - Indicates the rectangle to use.Insets object.public boolean hasFileDescriptor()
SequenceableSequenceable contains FileDescriptor object data.
If the custom Sequenceable class contains any FileDescriptor data, you should override this
method.
This method return false by default.
hasFileDescriptor 在接口中 Sequenceabletrue if it contains FileDescriptor data; returns false otherwise.public boolean marshalling(Parcel parcel)
SequenceableSequenceable object into a Parcel.marshalling 在接口中 Sequenceableparcel - Indicates the Parcel object to which the Sequenceable
object will be marshaled..true if the marshalling is successful; returns false otherwise.public boolean unmarshalling(Parcel parcel)
SequenceableSequenceable object from a Parcel.unmarshalling 在接口中 Sequenceableparcel - Indicates the Parcel object into which the Sequenceable
object has been marshaled.true if the unmarshalling is successful; returns false otherwise.