开发者

how to pass parameter from many activity to one activity

开发者 https://www.devze.com 2023-02-10 17:36 出处:网络
hey everyone, i am new in android i have five activity\'s and one result activity i want to send some data/parameter to result activity

hey everyone, i am new in android

i have five activity's and one result activity i want to send some data/parameter to result activity

first_activity,

sec_activity,

third_activity,

four_activity,

five_activityeach

each have some data like name and age

onclicking, i want the data to be saved/send 开发者_如何学Pythonto result_activity. thnks


Why are they all separate activities in the first place? Should they be a part of a single-activity wizard instead? Here is a recent blog post of mine that goes into somewhat more details.


Put all your data from each activity to SharedPreferences, then acces it from your final activity. Here are some examples: http://developer.android.com/guide/topics/data/data-storage.html#pref


You do it throught Intents and use the putExtras methods


Expanding on what Marcos said, here'e a good place to start with Intents.

http://developer.android.com/guide/topics/intents/intents-filters.html

0

精彩评论

暂无评论...
验证码 换一张
取 消