public final class Postcard
extends RouteMeta
| 构造器和说明 |
|---|
Postcard() |
Postcard(java.lang.String path,
java.lang.String group) |
Postcard(java.lang.String path,
java.lang.String group,
android.net.Uri uri,
android.os.Bundle bundle) |
| 限定符和类型 | 方法和说明 |
|---|---|
Postcard |
addFlags(int flags)
Add additional flags to the intent (or with existing flags
value).
|
java.lang.String |
getAction() |
android.content.Context |
getContext() |
int |
getEnterAnim() |
int |
getExitAnim() |
android.os.Bundle |
getExtras() |
int |
getFlags() |
android.os.Bundle |
getOptionsBundle() |
IProvider |
getProvider() |
java.lang.Object |
getTag() |
int |
getTimeout() |
android.net.Uri |
getUri() |
Postcard |
greenChannel()
Green channel, it will skip all of interceptors.
|
boolean |
isGreenChannel() |
java.lang.Object |
navigation()
Navigation to the route with path in postcard.
|
void |
navigation(android.app.Activity mContext,
int requestCode)
Navigation to the route with path in postcard.
|
void |
navigation(android.app.Activity mContext,
int requestCode,
NavigationCallback callback)
Navigation to the route with path in postcard.
|
java.lang.Object |
navigation(android.content.Context context)
Navigation to the route with path in postcard.
|
java.lang.Object |
navigation(android.content.Context context,
NavigationCallback callback)
Navigation to the route with path in postcard.
|
void |
setContext(android.content.Context context) |
Postcard |
setProvider(IProvider provider) |
Postcard |
setTag(java.lang.Object tag) |
Postcard |
setTimeout(int timeout)
Set timeout of navigation this time.
|
Postcard |
setUri(android.net.Uri uri) |
java.lang.String |
toString() |
Postcard |
with(android.os.Bundle bundle)
BE ATTENTION TO THIS METHOD WAS SET, NOT ADD!
|
Postcard |
withAction(java.lang.String action) |
Postcard |
withBoolean(java.lang.String key,
boolean value)
Inserts a Boolean value into the mapping of this Bundle, replacing
any existing value for the given key.
|
Postcard |
withBundle(java.lang.String key,
android.os.Bundle value)
Inserts a Bundle value into the mapping of this Bundle, replacing
any existing value for the given key.
|
Postcard |
withByte(java.lang.String key,
byte value)
Inserts a byte value into the mapping of this Bundle, replacing
any existing value for the given key.
|
Postcard |
withByteArray(java.lang.String key,
byte[] value)
Inserts a byte array value into the mapping of this Bundle, replacing
any existing value for the given key.
|
Postcard |
withChar(java.lang.String key,
char value)
Inserts a char value into the mapping of this Bundle, replacing
any existing value for the given key.
|
Postcard |
withCharArray(java.lang.String key,
char[] value)
Inserts a char array value into the mapping of this Bundle, replacing
any existing value for the given key.
|
Postcard |
withCharSequence(java.lang.String key,
java.lang.CharSequence value)
Inserts a CharSequence value into the mapping of this Bundle, replacing
any existing value for the given key.
|
Postcard |
withCharSequenceArray(java.lang.String key,
java.lang.CharSequence[] value)
Inserts a CharSequence array value into the mapping of this Bundle, replacing
any existing value for the given key.
|
Postcard |
withCharSequenceArrayList(java.lang.String key,
java.util.ArrayList<java.lang.CharSequence> value)
Inserts an ArrayList value into the mapping of this Bundle, replacing
any existing value for the given key.
|
Postcard |
withDouble(java.lang.String key,
double value)
Inserts a double value into the mapping of this Bundle, replacing
any existing value for the given key.
|
Postcard |
withFlags(int flag)
Set special flags controlling how this intent is handled.
|
Postcard |
withFloat(java.lang.String key,
float value)
Inserts a float value into the mapping of this Bundle, replacing
any existing value for the given key.
|
Postcard |
withFloatArray(java.lang.String key,
float[] value)
Inserts a float array value into the mapping of this Bundle, replacing
any existing value for the given key.
|
Postcard |
withInt(java.lang.String key,
int value)
Inserts an int value into the mapping of this Bundle, replacing
any existing value for the given key.
|
Postcard |
withIntegerArrayList(java.lang.String key,
java.util.ArrayList<java.lang.Integer> value)
Inserts an ArrayList value into the mapping of this Bundle, replacing
any existing value for the given key.
|
Postcard |
withLong(java.lang.String key,
long value)
Inserts a long value into the mapping of this Bundle, replacing
any existing value for the given key.
|
Postcard |
withObject(java.lang.String key,
java.lang.Object value)
Set object value, the value will be convert to string by 'Fastjson'
|
Postcard |
withOptionsCompat(ActivityOptionsCompat compat)
Set options compat
|
Postcard |
withParcelable(java.lang.String key,
android.os.Parcelable value)
Inserts a Parcelable value into the mapping of this Bundle, replacing
any existing value for the given key.
|
Postcard |
withParcelableArray(java.lang.String key,
android.os.Parcelable[] value)
Inserts an array of Parcelable values into the mapping of this Bundle,
replacing any existing value for the given key.
|
Postcard |
withParcelableArrayList(java.lang.String key,
java.util.ArrayList<? extends android.os.Parcelable> value)
Inserts a List of Parcelable values into the mapping of this Bundle,
replacing any existing value for the given key.
|
Postcard |
withSerializable(java.lang.String key,
java.io.Serializable value)
Inserts a Serializable value into the mapping of this Bundle, replacing
any existing value for the given key.
|
Postcard |
withShort(java.lang.String key,
short value)
Inserts a short value into the mapping of this Bundle, replacing
any existing value for the given key.
|
Postcard |
withShortArray(java.lang.String key,
short[] value)
Inserts a short array value into the mapping of this Bundle, replacing
any existing value for the given key.
|
Postcard |
withSparseParcelableArray(java.lang.String key,
android.util.SparseArray<? extends android.os.Parcelable> value)
Inserts a SparceArray of Parcelable values into the mapping of this
Bundle, replacing any existing value for the given key.
|
Postcard |
withString(java.lang.String key,
java.lang.String value)
Inserts a String value into the mapping of this Bundle, replacing
any existing value for the given key.
|
Postcard |
withStringArrayList(java.lang.String key,
java.util.ArrayList<java.lang.String> value)
Inserts an ArrayList value into the mapping of this Bundle, replacing
any existing value for the given key.
|
Postcard |
withTransition(int enterAnim,
int exitAnim)
Set normal transition anim
|
public Postcard()
public Postcard(java.lang.String path,
java.lang.String group)
public Postcard(java.lang.String path,
java.lang.String group,
android.net.Uri uri,
android.os.Bundle bundle)
public android.os.Bundle getOptionsBundle()
public int getEnterAnim()
public int getExitAnim()
public IProvider getProvider()
public boolean isGreenChannel()
public java.lang.Object getTag()
public Postcard setTag(java.lang.Object tag)
public android.os.Bundle getExtras()
public int getTimeout()
public Postcard setTimeout(int timeout)
timeout - timeoutpublic android.net.Uri getUri()
public Postcard setUri(android.net.Uri uri)
public java.lang.Object navigation()
public java.lang.Object navigation(android.content.Context context)
context - Activity and so on.public java.lang.Object navigation(android.content.Context context,
NavigationCallback callback)
context - Activity and so on.public void navigation(android.app.Activity mContext,
int requestCode)
mContext - Activity and so on.requestCode - startActivityForResult's parampublic void navigation(android.app.Activity mContext,
int requestCode,
NavigationCallback callback)
mContext - Activity and so on.requestCode - startActivityForResult's parampublic Postcard greenChannel()
public Postcard with(android.os.Bundle bundle)
SET, NOT ADD!
public Postcard withFlags(int flag)
Context.startActivity() and the
FLAG_RECEIVER_* flags are all for use with
Context.sendBroadcast().public Postcard addFlags(int flags)
flags - The new flags to set.withFlags(int)public int getFlags()
public Postcard withObject(java.lang.String key, java.lang.Object value)
key - a String, or nullvalue - a Object, or nullpublic Postcard withString(java.lang.String key, java.lang.String value)
key - a String, or nullvalue - a String, or nullpublic Postcard withBoolean(java.lang.String key, boolean value)
key - a String, or nullvalue - a booleanpublic Postcard withShort(java.lang.String key, short value)
key - a String, or nullvalue - a shortpublic Postcard withInt(java.lang.String key, int value)
key - a String, or nullvalue - an intpublic Postcard withLong(java.lang.String key, long value)
key - a String, or nullvalue - a longpublic Postcard withDouble(java.lang.String key, double value)
key - a String, or nullvalue - a doublepublic Postcard withByte(java.lang.String key, byte value)
key - a String, or nullvalue - a bytepublic Postcard withChar(java.lang.String key, char value)
key - a String, or nullvalue - a charpublic Postcard withFloat(java.lang.String key, float value)
key - a String, or nullvalue - a floatpublic Postcard withCharSequence(java.lang.String key, java.lang.CharSequence value)
key - a String, or nullvalue - a CharSequence, or nullpublic Postcard withParcelable(java.lang.String key, android.os.Parcelable value)
key - a String, or nullvalue - a Parcelable object, or nullpublic Postcard withParcelableArray(java.lang.String key, android.os.Parcelable[] value)
key - a String, or nullvalue - an array of Parcelable objects, or nullpublic Postcard withParcelableArrayList(java.lang.String key, java.util.ArrayList<? extends android.os.Parcelable> value)
key - a String, or nullvalue - an ArrayList of Parcelable objects, or nullpublic Postcard withSparseParcelableArray(java.lang.String key, android.util.SparseArray<? extends android.os.Parcelable> value)
key - a String, or nullvalue - a SparseArray of Parcelable objects, or nullpublic Postcard withIntegerArrayList(java.lang.String key, java.util.ArrayList<java.lang.Integer> value)
key - a String, or nullvalue - an ArrayList object, or nullpublic Postcard withStringArrayList(java.lang.String key, java.util.ArrayList<java.lang.String> value)
key - a String, or nullvalue - an ArrayList object, or nullpublic Postcard withCharSequenceArrayList(java.lang.String key, java.util.ArrayList<java.lang.CharSequence> value)
key - a String, or nullvalue - an ArrayList object, or nullpublic Postcard withSerializable(java.lang.String key, java.io.Serializable value)
key - a String, or nullvalue - a Serializable object, or nullpublic Postcard withByteArray(java.lang.String key, byte[] value)
key - a String, or nullvalue - a byte array object, or nullpublic Postcard withShortArray(java.lang.String key, short[] value)
key - a String, or nullvalue - a short array object, or nullpublic Postcard withCharArray(java.lang.String key, char[] value)
key - a String, or nullvalue - a char array object, or nullpublic Postcard withFloatArray(java.lang.String key, float[] value)
key - a String, or nullvalue - a float array object, or nullpublic Postcard withCharSequenceArray(java.lang.String key, java.lang.CharSequence[] value)
key - a String, or nullvalue - a CharSequence array object, or nullpublic Postcard withBundle(java.lang.String key, android.os.Bundle value)
key - a String, or nullvalue - a Bundle object, or nullpublic Postcard withTransition(int enterAnim, int exitAnim)
enterAnim - enterexitAnim - exitpublic Postcard withOptionsCompat(ActivityOptionsCompat compat)
compat - compatpublic java.lang.String toString()
public java.lang.String getAction()
public Postcard withAction(java.lang.String action)
public android.content.Context getContext()
public void setContext(android.content.Context context)