Enum QueryStringPresentation
-
- All Implemented Interfaces:
-
java.io.Serializable,kotlin.Comparable
public enum QueryStringPresentation extends Enum<QueryStringPresentation>
Represents how a given navigation destination should be presented when the current location path on the backstack matches the new location path and a query string is present in either location.
Example situation: current location: /feature new location: /feature?filter=true
Another example situation: current location: /feature?filter=a new location: /feature?filter=b
-
-
Field Summary
Fields Modifier and Type Field Description private final Stringnameprivate final Integerordinalprivate final EnumEntries<QueryStringPresentation>entries
-
Enum Constant Summary
Enum Constants Enum Constant Description DEFAULTA generic default value when no specific presentation value is provided and results in generally accepted "normal" behavior — replacing the root when on the start destination and going to the start destination again, popping when the location is in the immediate backstack, replacing when going to the same destination, and pushing in all other cases.
REPLACEPops the current location off the nav stack and pushes the new location onto the nav stack. If you use query strings in your app to act as a way to filter results in a destination, this allows you to present the new (filtered) destination without adding onto the backstack.
-
Method Summary
Modifier and Type Method Description final QueryStringPresentationvalueOf(String value)Returns the enum constant of this type with the specified name. final Array<QueryStringPresentation>values()Returns an array containing the constants of this enum type, in the order they're declared. final EnumEntries<QueryStringPresentation>getEntries()Represents how a given navigation destination should be presented when the current location path on the backstack matches the new location path and a query string is present in either location. -
-
Method Detail
-
valueOf
final QueryStringPresentation valueOf(String value)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
-
values
final Array<QueryStringPresentation> values()
Returns an array containing the constants of this enum type, in the order they're declared.
This method may be used to iterate over the constants.
-
getEntries
final EnumEntries<QueryStringPresentation> getEntries()
Represents how a given navigation destination should be presented when the current location path on the backstack matches the new location path and a query string is present in either location.
Example situation: current location: /feature new location: /feature?filter=true
Another example situation: current location: /feature?filter=a new location: /feature?filter=b
-
-
-
-