Hi,
I think I may have the answer to this:

have a further search about the onPause(), and onDestroy()
eg;
@Override
        protected void onPause() {
          super.onPause();
          locationManager.removeUpdates(this);
        }

Hope this helps,
Fred

On 06/06/2011, kaushik p <[email protected]> wrote:
> How can the activity be accessed in the onclick() of the button , ??
> finish() inside the onclick is not working  .
>
> close.setOnClickListener(new View.OnClickListener()
> {
> public void onClick(View v)
> {
> finish();
>          Intent Newbtn1 = new Intent(v.getContext(),help.class);
> startActivityForResult(Newbtn1,0);
>          }
>                 });
>
>
> when i do this, the intent is working rather than the finish (); each time .
> Please help me to resolve this .
> On Mon, Jun 6, 2011 at 4:17 AM, Dianne Hackborn <[email protected]> wrote:
>
>> When you get the back button, call finish() on your activity.  That's all
>> the default implementation does.
>>
>> On Sun, Jun 5, 2011 at 12:09 PM, kaushik p <[email protected]> wrote:
>>
>>> Hi all
>>>
>>> can anyone please help me implementing the back button in my app
>>> exclusively?? I am building an app to help illiterate ppl , so they do
>>> not
>>> know how to use the android back button ,i need to exclusively put it on
>>> the
>>> screen .
>>>
>>> However i want to use  my back button exactly ia the  way, natural back
>>> button works. For example , it should be like i click my back button on
>>> the
>>> screen then it should trigger the natural back button click .
>>>
>>>
>>> --
>>> Thanks&Regards
>>> Kaushik Pendurthi
>>>
>>> http://kaushikpendurthi.blogspot.com/
>>>
>>> --
>>> 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
>>
>>
>>
>>
>> --
>> Dianne Hackborn
>> Android framework engineer
>> [email protected]
>>
>> Note: please don't send private questions to me, as I don't have time to
>> provide private support, and so won't reply to such e-mails.  All such
>> questions should be posted on public forums, where I and others can see
>> and
>> answer them.
>>
>>  --
>> 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
>
>
>
>
> --
> Thanks&Regards
> Kaushik Pendurthi
>
> http://kaushikpendurthi.blogspot.com/
>
> --
> 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

-- 
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