Hi Pranav,
I guess you implemented your logic like this:
Button previous = (Button) findViewById(.....);
previous.setOnClickListener(new OnClickListener(){
public void onClick(View v) {
Intent i = new Intent();
i.setClassName(the name of the previous activiy.....);
startActivity(i);
}});
Try the below way:
Button next = (Button) findViewByid(.....);
next.setOnClickListener(new OnClickListener(){
public void onClick(View v) {
Intent i = new Intent();
i.setClassName(the name of the next activity.....);
i.putExtra();....... //to pass this activity's data to next
startActivity(i);
}});
Button previous = (Button) findViewById(.....);
previous.setOnClickListener(new OnClickListener(){
public void onClick(View v) {
finish();
}});
What you need to do is passing the current activity's data to next
Activity; When you press the Prev button, you will find Android keeps
the inputed strings in the EditText and other editable views
automatically.......
Hope this can help you.
2009/12/31 android09 <[email protected]>
> Hi Neilz,
>
> Thank you for reply me with the proper and useful idea. I tried to
> hold the first activity data but it gives error while loading the
> data. It is not allows me to get data back.
>
> Can you understand me by the code? How can i hold the first activity's
> data when i start another activity and get back to previous. I also
> tried with the onPause() and onResume() methods. How can i do that
> with the code? Please help me.
>
> Thank you.
> Regards,
> ---------------
> Pranav
>
> --
> 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]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>
--
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