Google 致力于为黑人社区推动种族平等。查看具体举措

DateValidatorPointBackward

public class DateValidatorPointBackward
extends Object implements CalendarConstraints.DateValidator

java.lang.Object
   ↳ com.google.android.material.datepicker.DateValidatorPointBackward


A CalendarConstraints.DateValidator that enables only dates before a given point. Defaults to the current moment in device time backwards using now(), but can be set to any point, as UTC milliseconds, using before(long).

Summary

Inherited constants

From interface android.os.Parcelable

Fields

public static final Creator<DateValidatorPointBackward> CREATOR

Part of Parcelable requirements.

Public methods

static DateValidatorPointBackward before(long point)

Returns a CalendarConstraints.DateValidator which enables only days before point, in UTC milliseconds.

int describeContents()
boolean equals(Object o)
int hashCode()
boolean isValid(long date)

Returns true if the provided date is enabled.

static DateValidatorPointBackward now()

Returns a CalendarConstraints.DateValidator enabled from the current moment in device time backwards.

void writeToParcel(Parcel dest, int flags)

Inherited methods

From class java.lang.Object
From interface com.google.android.material.datepicker.CalendarConstraints.DateValidator
From interface android.os.Parcelable

Fields

CREATOR

Creator<DateValidatorPointBackward> CREATOR

Part of Parcelable requirements. Do not use.

Public methods

before

DateValidatorPointBackward before (long point)

Returns a CalendarConstraints.DateValidator which enables only days before point, in UTC milliseconds.

Parameters
point long

Returns
DateValidatorPointBackward

describeContents

int describeContents ()

Returns
int

equals

boolean equals (Object o)

Parameters
o Object

Returns
boolean

hashCode

int hashCode ()

Returns
int

isValid

boolean isValid (long date)

Returns true if the provided date is enabled.

Parameters
date long

Returns
boolean

now

DateValidatorPointBackward now ()

Returns a CalendarConstraints.DateValidator enabled from the current moment in device time backwards.

Returns
DateValidatorPointBackward

writeToParcel

void writeToParcel (Parcel dest, 
                int flags)

Parameters
dest Parcel

flags int