You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The HashBundle class is based on Android's Bundle, using HashMap like the Bundle did previously. But the internal mapping does not have much importance. Depending on the data being stored, HashMap vs. ArrayMap does not provide much difference. What matters is that HashBundle hash much more consistent tool collection compared to Bundle. It also fixes a few Parcel issues when parsing it between processes and it supports JSONParcel so that it can be added to any persistent storage.
Example
// Create a new bundleHashBundlebundle = newHasBundle();
// Add a value to itbundle.putBoolean("key", true);
// Use the valueif (bundle.getBoolean("key", false)) {
}
It is also possible to wrap a normal Bundle. This allows you to use the tool collection on a Bundle, like adding it to a JSONParcel, but without copying the data from one map to another.