![]() This is easily achieved by forwarding your results.Īnd if we wanted to get the result from Activity C passed by to A, for the scenario I have described above. For example, I earn 10 points on screen A, I click through to screen B to check my points balance to see if I have enough points to buy a new weapon? Yay, I do! So I click through to Screen C to buy a fancy new sword, which I would like to use back in Screen A. This is easy enough when you are just passing information back and forth between two screens (activities), but needs a slight tweak if you need to pass data between more than 2 activities. When another app tries to share any of these things by constructing an intent and passing it to startActivity(), your application is listed as an option in the. And as you move from screen to screen in your app, you may need to share information between the various activities e.g the username, current score etc. Bitmap implements Parcelable, so you could always pass it with the intent: Intent intent new Intent (this, NewActivity.class) intent.putExtra ('BitmapImage', bitmap) and retrieve it on the other end: Intent intent getIntent () Bitmap bitmap (Bitmap) intent.getParcelableExtra ('BitmapImage') Share. Android applications are made up of one or more activities. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |