0

Friend's I have a problem when click the back button either in device or customised back button in header,it never back to show the list content,it simply shows the blank screen.

For example - -

I have list view - list1,in it's onclick event i move to next listview -list2, and from list2 -onclick event i move to webview there i have back button in my titlebar,when i click it throws null pointer exception even from device back button also getting same,and the list show empty. where my webview is in New Activity.

Here my code for back button onClick, { finish(); } How can i resolve it.

Thanks in advance.

3
  • Cant guess. Post some code snippet plz.
    – Praveen
    Aug 24, 2010 at 12:28
  • do you have the back button in your activity that contains your webview ? or that back button is in the main activity?
    – Jorgesys
    Aug 24, 2010 at 15:53
  • the back button is in common title bar, it's in header xml layout.
    – MGSenthil
    Aug 24, 2010 at 17:03

1 Answer 1

0

override this method "onBackPressed"

public void onBackPressed(){

}

and also call this method at back button click...it will bring you to previous activity

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.