Created
September 15, 2016 09:40
-
-
Save Athosone/cb61cee00f499857e885fd69aef1e848 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
: public enum BundleData | |
{ | |
ItemPosition, | |
UserName | |
} | |
public static class Extensions | |
{ | |
public static int GetBundleData(this Intent intent, BundleData data, int defaultValue) | |
=> intent.Extras.GetInt(data.ToString(), defaultValue); | |
public static void SetBundleData(this Intent intent, BundleData data, int value) | |
=> intent.PutExtra(data.ToString(), value); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment