Bundle: create a bundle and set the data here.Direct: put our data into intents directly. Intent in android is an action description.For more information look here. This method is the most elegant one because it uses all the android features. In this case we create several method to hold the data. Otherwise, we can use the singleton pattern that ensures we have only one instance of this class in all our JVM. In this case we can create several static method to hold the data we want to share. Exploiting the Android feature that an app runs in a single process we can use a static class to exchange data between activities. This is the easiest way to achieve our goal.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |