On Nov 13, 4:11 pm, abhi <[email protected]> wrote:
> Currently, I am starting a Child activity from a Parent activity in
> the following manner:
>
> public class Parent extends Activity {
>
>        private int message;
>        public Parent()
>         {
>               message = 0;
>          }
>
>         @Override
>         public void onCreate(Bundle savedInstanceState) {
>                 super.onCreate(savedInstanceState);
>                  //Start child activity
>                 Intent child = new Intent(Parent.this,Child.class);
>                 startActivityForResult(child, 1);
>         }
>
> }
>
> Is there a way to communicate the message member variable from the
> Parent activity to the Child activity? I'm not creating any Child
> objects above, so I'm confused as to how one is supposed to send
> messages from the Parent  to the Child activities. Any suggestions?


Hi,
Everything you pass to the child, must be passed inside the Intent.
Use putExtra() and get*Extra().

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to