public final class WindowAnimationFrameStats
extends FrameStats implements Parcelable
| java.lang.Object | ||
| android.view.FrameStats | ||
| android.view.WindowAnimationFrameStats | ||
该类包含窗口动画帧统计信息。 例如,当应用程序从一个活动转换到另一个活动时,通常会执行窗口动画。 帧统计数据是从getStartTimeNano()到getEndTimeNano()的时间间隔的快照。
关键的想法是,为了提供流畅的用户体验,系统应该通过调用getRefreshPeriodNano()以特定的时间间隔运行窗口动画。 如果系统在每个刷新周期都不显示帧,则用户将看到不规则的窗口转换。 通过调用getFramePresentedTimeNano(int)实际显示帧的时间。
Inherited constants |
|---|
android.view.FrameStats
|
android.os.Parcelable
|
Fields |
|
|---|---|
public static final Creator<WindowAnimationFrameStats> |
CREATOR |
公共方法(Public methods) |
|
|---|---|
int |
describeContents() 描述此Parcelable实例的封送表示中包含的特殊对象的种类。 |
String |
toString() 返回对象的字符串表示形式。 |
void |
writeToParcel(Parcel parcel, int flags) 将此对象平铺到一个包裹中。 |
继承方法(Inherited methods) |
|
|---|---|
android.view.FrameStats
|
|
java.lang.Object
|
|
android.os.Parcelable
|
|
int describeContents ()
描述此Parcelable实例的封送表示中包含的特殊对象的种类。 例如,如果对象在writeToParcel(Parcel, int)的输出中包含writeToParcel(Parcel, int) ,则此方法的返回值必须包含CONTENTS_FILE_DESCRIPTOR位。
| 返回(Returns) | |
|---|---|
int |
a bitmask indicating the set of special object types marshaled by this Parcelable object instance. |
String toString ()
返回对象的字符串表示形式。 通常, toString方法将返回一个字符串,用于“文本地表示”此对象。 结果应该是一个简洁但内容丰富的表述,对于一个人来说很容易阅读。 建议所有子类重写此方法。
类Object的toString方法返回一个字符串,其中包含对象为实例的类的名称,符号字符“ @ ”以及对象的哈希代码的无符号十六进制表示形式。 换句话说,这个方法返回一个字符串,其值等于:
getClass().getName() + '@' + Integer.toHexString(hashCode())
| 返回(Returns) | |
|---|---|
String |
a string representation of the object. |
void writeToParcel (Parcel parcel, int flags)
将此对象平铺到一个包裹中。
| 参数(Parameters) | |
|---|---|
parcel |
Parcel: The Parcel in which the object should be written. |
flags |
int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. |