开发者

Facing problem when using back button in title bar

开发者 https://www.devze.com 2023-01-12 16:57 出处:网络
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.

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开发者_Go百科 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.


override this method "onBackPressed"

public void onBackPressed(){

}

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

0

精彩评论

暂无评论...
验证码 换一张
取 消