Hi,

Take a look at Activity lifecycle chart:

http://developer.android.com/guide/topics/fundamentals.html#actlife

(scroll down a bit to see the chart)

You may need to override onStart or onRestart, and fetch data there.

If you still need to change how your activities behave, take a look at various Intent flags that can be used with startActivity. The flag constants all start with FLAG_ACTIVIVITY_, and are documented starting here:

http://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_CLEAR_TOP

-- Kostya

22.11.2010 17:35, umakantpatil пишет:
Thanks paul.
That is the solution currently i have with me. But i dont want that
because:

Each activity fetches valued from db and renders them.
So when i move within the activities. Each time it doesn't fetch data
from and and re-render it. It just brings the activity to the front.
But If i keep closing the activity then each time it will fetch data
and render it.


On Nov 22, 7:20 pm, paulb<pbizan...@gmail.com>  wrote:
Can you close the activities after you activate the next one? Then,
you will only ever have open one activity.







On Tue, Nov 23, 2010 at 12:50 AM, umakantpatil<umakantpat...@gmail.com>  wrote:
In short,
question is how to close B activity from activity A. ?
On Nov 22, 6:34 pm, umakantpatil<umakantpat...@gmail.com>  wrote:
I have app which has around 5 activities.
When App is loaded I open Activity A and IF user opens then menu and
click on button 2 then Activity B is opened, If users clicks button 3
from menu then Activity C is opened. Its just like instead of tab i m
using menu.
Now the problem is. If i m at Activity A and I click back button I
finish() the Activity A. But Activity B is shown. Now when again click
back on B then Activity C is shown.
What I want. If I'm at activity A and press back button then need to
close all other activities too.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com

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

Reply via email to